Commit Graph

433 Commits

Author SHA1 Message Date
Matt Enlow
f8d90f1cc6 Added populate last login time
closes #2515
- sets last_login when user is saved if user status changed to active
- added integration test in user Basic Operations
2014-03-27 12:29:43 -06:00
Hannah Wolfe
1fbe4d0be7 Merge pull request #2497 from sebgie/issue#2492
Fix delete button
2014-03-24 18:47:25 +00:00
Sebastian Gierlinger
b83fc25613 Fix delete button
closes #2492
- added when.all() to wait until all posts are deleted before deleting
tags
- added a test
2014-03-24 14:49:23 +01:00
Hannah Wolfe
13b65cecb9 Redirect feed -> rss
closes #2261

- reserved 'feed' in the list of reserved keywords for slugs
- added a 301 redirect from /feed/ to /rss/
- added a route test, and realised that standard express redirects don't get the right headers
- fixed the headers across all 301 redirects & added tests for the admin redirects
- removed the redirect from /ghost/login/ to /ghost/signin/ as this happens automatically if you're logged out, and isn't very useful if you're logged in as it just redirects again to /ghost/
2014-03-24 09:46:39 +00:00
Jason Williams
f0fedb9c30 Replace spaces in uploaded filenames with hyphens
closes #2485
- use hyphens instead of underscores when santising filenames
- updated tests
2014-03-23 20:56:02 +00:00
Hannah Wolfe
f981e71e3c Merge pull request #2469 from ErisDS/error-cleanup
logError & logWarn call console.log once
2014-03-23 15:30:41 +00:00
Hannah Wolfe
0bfcac15dd logError & logWarn call console.log once
fixes #2468
2014-03-23 15:20:20 +00:00
Fabian Becker
5abaabd100 Tag archive body_class
closes #2473
- Show tag-template class on tag pages
- Show tag-{{name}} class on tag pages
- Show archive-template only on second page of tag pages
2014-03-22 13:43:13 +00:00
Hannah Wolfe
2f159cb7df Merge pull request #2435 from halfdan/2148-rpc
Add XML-RPC ping
2014-03-20 19:14:23 +00:00
Fabian Becker
9e7469e3ea Add XML-RPC ping
closes #2148
- Added core/server/xmlrpc.js
- Hook into post::saved to ping when a published post gets saved
- Added node package to hook into http requests
2014-03-20 17:53:32 +00:00
Hannah Wolfe
c02fd70c63 Improving the showdown extensions
fixes #2381

- renamed the ghost extensions
- added new html tests
2014-03-20 17:08:13 +00:00
Hannah Wolfe
d8f724d94d Removing typography extension
issue #2312

- The typography extension is still interfering in HTML blocks, reference style links and other bits and pieces it probably shouldn't be :(
- We'll add it back when it's ready.
2014-03-20 13:22:28 +00:00
Hannah Wolfe
6c3c0a5f6c Switch Showdown to fork
fixes #2312

- showdown fork understands more html tags
2014-03-20 11:36:13 +00:00
Hannah Wolfe
5bed81563e Add shim for codemirror on touchscreens
fixes #2385

- stolen the CM shim from js-bin
- if we're on a touchscreen device, don't use CM
- if we're on a touchscreen device, show a coming soon message for uploads
2014-03-19 09:26:45 +00:00
Fabian Becker
428fb94278 Fixes random pg failures.
fixes #2075
- Updates knex to latest version
- Fixes expected value in page test
- Change fixture insertion to be sequential
- Add orderBy to insertMorePostsTags fixture helper
2014-03-17 10:54:31 +00:00
mattse
9ae0ddf54c Fixes race conditions in functional test introduced in PR#2395
fixes PR#2395
- in editor_test.js line 272, I wait until the post settings menu appears, and THEN also wait until the delete post button appears, rather than just waiting for the first condition, this can result in a race condition which has been seen.
- in editor_test.js line 229, I click on the tag, then wait until it disappears, rather than asserting the tag doesn't exist immediately.  This could potentially result in a race condition, but I have not seen it yet.
- in editr_test.js line 315, I click on the delete post button, and now wait for the modal container to appear before clicking the accept button.  This could result in a race condition, but I have not seen it yet.
2014-03-17 03:06:22 -04:00
Hannah Wolfe
caa729e86a Merge pull request #2395 from mattse/mattse#2273
Added functional tests for editor: tag editor, image uploads, post settings
2014-03-14 11:48:37 +00:00
Hannah Wolfe
7f1721d8f0 Merge pull request #2392 from mattse/issue#2273
Added functional test for uploading image/cover in settings
2014-03-14 11:47:51 +00:00
mattse
1d5a8ce718 Added functional tests for editor: tag editor, image uploads, post settings
references #2273
- test tag creation and tag deletion
- tests image uploader appears after typing `![]()` in editor
- tests image URL matches url inside `![](url)`
- tests all input elements of post settings menu
2014-03-14 03:11:26 -04:00
Hannah Wolfe
60e316581a Merge pull request #2370 from halfdan/2062-robots
Serve default robots.txt
2014-03-13 21:30:04 +00:00
Fabian Becker
c3417fe090 Serve default robots.txt
closes #2062
- Server robots.txt from theme if available
- Serve default robots.txt from /core/shared/ otherwise
- Added tests for default robots.txt
2014-03-13 21:31:41 +01:00
Johan Stenehall
4556e1df0a Rss support for tags
closes #2260
- added routes for /tag/:slug/rss and /tag/:slug/rss/:page
- added support for tag in the rss controller
- added route tests for each extra case
- fixing a tiny typo in some test descriptions
2014-03-13 00:12:41 +01:00
mattse
36d38e5c81 Added functional test for uploading image/cover in settings
references #2273
- added a test that clicks on both upload (image/cover) buttons and tests the same testing function on them since both modals are exactly the same
- the testing function checks for the '.js-drop-zone.image-uploader' selector, then clicks accept, and tests that a blank success notification appears
- shifted the test email test validation upwards so the ordering of tests matches the ordering of the UI elements
2014-03-12 17:41:59 -04:00
Dan Schnau
b13db3a9d2 Do not cache 404 pages
closes #2334

- remove call to set cache-control in 404 response header
- update unit tests to expect this

Fix up unit tests
2014-03-06 20:06:07 -05:00
John O'Nolan
161afbf3c4 Update system emails to come from ghost@blog.url
Closes #2145
2014-03-06 12:03:00 +01:00
Hannah Wolfe
2c524c1d8e Merge pull request #2321 from polygonix/2320-detect-tag-hbs 2014-03-05 19:49:29 +00:00
Mark Stacey
65b0968f40 Change validation for posts 'page' attribute.
issue #2305
- changed validation for 'page' to expect '0' or '1', rather than 'true' or
  'false'
- Added a 'can change a post to static page' test
- Added a 'can change a static page to a post' test
2014-03-04 17:59:00 -03:30
Jonathan Johnson
e4bb6d08cc Update validator to 3.4.0
Closes #1379

- Convert to new api usage for both server-side and client-side
- Provide way require a negative response for boolean methods in
  default-settings.json
- Add field validation functional tests
  - Settings (General)
    - Title length validation
    - Description length validation
    - postsPerPage, numeric, min, max
  - Settings (User)
    - Bio Length validation
    - Location length validation
    - Url validation
  - Login
    - Email validation
  - Editor
    - Title required validation
2014-03-04 13:54:24 -07:00
Fabian Becker
cd74b0e232 Switch to bower for client assets.
fixes #2272
- Remove libraries from shared/vendor
- Remove libraries from client/assets/vendor
- Add bower to package.json and postinstall
- Add bower.json with dependencies
- Add scripts from bower_components to concat/uglify
- Fix tests
- Serve jquery from /ghost/built/theme/
2014-03-04 20:09:26 +00:00
Fabian Becker
f6021210c6 Add test for tag.hbs template.
refs #2321
2014-03-04 13:06:22 +00:00
Johan Stenehall
825ba4fb82 Use tag as title on tag pages
closes #2328
- added check for tag in coreHelpers.meta_title and use if set
- added test for correct title on tag pages

Rewritting to tag - blogtitle based on comments from PR
2014-03-04 11:52:27 +01:00
Hannah Wolfe
708ba6f8b0 Merge pull request #2220 from sebgie/issue#1401
Add validation from schema.js
2014-02-28 23:04:04 +00:00
Sebastian Gierlinger
7155d95f9d Add JSON API tests & cleanup
first 10 % of #2124
- added initial version of JSON API tests
- renamed error.errorCode to error.code
- renamed tags.all to tags.browse for consistency
2014-02-28 22:26:03 +00:00
Hannah Wolfe
ea7385abbc Merge pull request #2243 from hswolff/custom-page-templates
Custom Page Templates
2014-02-28 19:58:35 +00:00
Gabor Javorszky
667888aeb3 Implements Initial lifecycle and App UI start
Closes #2083

* Added hbs template for apps listing
* Added settings to read the activeApps
* Added viewcontrol to activate / deactivate apps
* Added API handler to store activeApps (by `name` in the `package.json` file)
* On button click it turns the button into "Working" and changes class to `button` (grey one)
* On success, rerenders the pane, adds success notification about apps being saved
* On error, rerenders the pane, adds error notification with error message

Missing:
* tests: couldn't figure out how to add mock apps with mock package.json data
* actually registering, etc, re #2140
* icon from the sidebar
2014-02-28 14:06:36 +00:00
Hannah Wolfe
c64148f361 Merge pull request #2256 from caerphoto/1795-typography
Add support for typographically-correct punctuation
2014-02-28 10:49:06 +00:00
Andy
b49f10c33d Add support for typographically-correct punctuation
Closes #1795
- Added typography.js Showdown extension
- Updated RSS test to support new typographic quotes
2014-02-28 09:44:08 +00:00
Hannah Wolfe
36102d4f9f Merge pull request #2246 from knunery/issue#1432
Fixes client side bio character counter.
2014-02-27 16:02:13 +00:00
Hannah Wolfe
895180fbf0 Merge pull request #2252 from jondavidjohn/from-address-default
Change fallback from address to webmaster@[blog.url]
2014-02-27 15:56:46 +00:00
Fabian Becker
12f8f99088 Implements the #has Block helper
closes #2115
- Added new #has block helper
- Added several tests for #has helper
2014-02-27 11:16:21 +00:00
Hannah Wolfe
310fcab7ed Cleanup naming & order in admin controller
no issue

 There seemed to be no convention or order to the functions in the admin controller, so I have:
 - organised them
 - reordered them
 - added a small doc-block
 - reordered some routes
 - updated tests accordingly
2014-02-25 10:51:12 +00:00
Hannah Wolfe
aa15b464c8 /ghost/reset/* should not redirect to signin
fixes #2257
2014-02-25 10:44:16 +00:00
Hannah Wolfe
ccaceb7310 Renamed client-side admin url helper
fixes #2254

- includes test
2014-02-25 06:44:06 +00:00
Jonathan Johnson
917eca3244 Change fallback from address to webmaster@[blog.url]
This change is needed because the previous default of the user's email
address is too often mismatched against the site domain, triggering spam filters.

Fixes #2145
- added `fromAddress()` to GhostMailer to handle this logic
- added unit tests to `mail_spec.js`
2014-02-24 20:28:37 -07:00
Hannah Wolfe
f1ecfbb491 Fixing config unit test for Windows 2014-02-24 16:39:07 +00:00
Kyle Nunery
6e1d5e8e0d Fixes client side bio character counter.
closes #1432
2014-02-23 16:16:45 -06:00
Harry Wolff
2cb02b55e1 Custom Page Templates
fixes #1969

- creates new ./server/helpers/tempalte.js method
 which returns the correct view to use when rendering

- updates fronted controller to check if a custom page template
 exists and if so then uses that to render the static page

- adds additional class name to body_class helper when
 a custom page template is being rendered

- adds tests to address all new features
2014-02-22 21:17:02 -05:00
Kyle Nunery
89cd1a3640 Updated pageUrl helper to page_url
issue #2216
2014-02-20 15:29:14 -06:00
Sebastian Gierlinger
ac7f4f05c4 Add validation from schema.js
closes #1401
- added data/validation/index.js
- added generic validation for length
- added generic validation for nullable
- added validations object to schema.js for custom validation
- removed pyramid of doom from api/db.js
2014-02-19 18:32:23 +01:00
Sebastian Gierlinger
ea6c601b01 Improvements for models
#closes #1655
- removed models as parameter for bookshelf-session
- changed to read permittedAttributes from schema.js
- changed updateTags to be executed at saved event
- added validate to execute after saving event
- added test for published_at = null (see #2015)
- fixed typo in general.hbs
2014-02-19 14:57:26 +01:00