Commit Graph

527 Commits

Author SHA1 Message Date
Jacob Gable
a9cc252b45 Invalidate cache header only for published posts
Closes #1563

- Add new updatedAttributes() functionality to base models
- Update Post.edit(...) to pass along _updatedAttributes values
- Update Post.delete to set statusChanged to true
- Add checking for statusChanged to cacheInvalidationHeader()
- Update route tests that check for cache invalidation header
2014-04-23 09:28:45 -05:00
Hannah Wolfe
9bf02c9e8c Merge pull request #2641 from alarobric/feature/2607TagParentRelation
Tag API response to use parent rather than parent_id
2014-04-23 12:47:37 +01:00
Hannah Wolfe
149a793e28 Merge pull request #2634 from alarobric/feature/2608AuthorRelation
Post API response to use author not author_id
2014-04-23 12:47:25 +01:00
Paul Connolley
dd4f8a5f6a Ensure that the character set is UTF-8 for RSS feed
When setting the Content-Type header for the RSS feeds, the character
set is omitted. However, when running the feed through the
[Feed Validator](http://feedvalidator.org), it became apparent that
there was a problem as the encoding defaults to US-ASCII. See
[RFC 3023](http://www.ietf.org/rfc/rfc3023.txt) for further information
on the default XML charset over HTTP.

I have added a test and simple update to the 'Content-Type' header.
2014-04-23 10:47:25 +01:00
Alan Richards
5877e7d211 Tag API response to use parent rather than parent_id
Closes #2607
- added toJSON method to tag model
- parent_id attribute is replaced by parent
- integration tests will expect parent as an attribute
2014-04-22 23:46:53 -07:00
Alan Richards
686aec7ab5 Post API response to use author not author_id
Closes #2608
- added toJSON method override for post model
- in the event no expanded author relation is present the id will be used
- removed author_id from expected response JSON for posts.
- updated integration tests to check for existence or not of author and author_id
2014-04-22 02:13:33 -07:00
Hannah Wolfe
16c8080636 Merge branch 'master' into ember
Conflicts:
	core/client/models/post.js
2014-04-21 18:35:38 +01:00
Hannah Wolfe
82897ed949 Merge pull request #2624 from shindakun/editbug2619
Do not redirect to editor if parameter does not equal edit.
2014-04-21 19:05:18 +02:00
Jacob Gable
cf7c8aab3b Tag API: Primary Document Format
Closes #2605

- Change tags browse() response to { tags: [...] }
- Update client side collection to use nested tags document
- Update test references to use response.tags
2014-04-20 19:48:59 -05:00
Steve
87077f2218 Do not redirect to editor if parameter does not equal edit.
Closes #2619
- If edit parameter is 'edit' redirect to editor.
- If edit parameter is anything other then undefined redirect to 404.
- Create edit post tests.
- Test redirect without trailing slash.
- Test redirect to editor.
- Test redirect to 404.
2014-04-20 00:35:56 -07:00
Sebastian Gierlinger
32ea948675 Post response move pagination -> meta
closes #2604
- moved ‚pagination‘ to ‚meta‘ property
- added response test for pagination property
- changed ‚next‘ and ‚prev‘ to be set to null and exist on every
response
- removed unnecessary call to API for RSS author
2014-04-19 17:03:20 +02:00
Sebastian Gierlinger
664b002f43 missing semicolon + console.log 2014-04-16 18:49:07 +02:00
Sebastian Gierlinger
da3630071a Added and fixed permission tests
- fixed test for db functions
- added tests for different users
2014-04-16 18:22:22 +02:00
Sebastian Gierlinger
e47e9c62d0 Add permissions to API
closes #2264
- added permissions check to db, users and posts
- added register method to users
- added doesUserExist method to users
- added user from session to internal calls
- changed permissible to overwrite canThis
- removed action map and action type from permissable method
2014-04-16 18:22:22 +02:00
Sebastian Gierlinger
61e94a6e8b Use current user in models
closes #2058
- fixed apiContext as suggested in the issue
- added user to options object for models
- added api.users.register() for public registration
- changed models to use options.user for created_by, updated_by,
author_id and published_by
- added override to session model to avoid created_by and updated_by
values
- added user (id: 1) to tests
- added user (id: 1) for registration
- added user (id: 1) for import, fixtures and default settings
- added user (id: 1) for user update
- added user (id: 1) for settings update (dbHash, installedApps, update
check)
- updated bookshelf to version 0.6.8
2014-04-16 18:20:09 +02:00
Jacob Gable
88d82ff441 canThis() improvements
- Handle passing undefined user to canThis
  - Add existence check to parseContext if statement
  - Add unit test that passes undefined to canThis
- Allow internal canThis() checks
  - Allow passing 'internal' or { internal: true } as context
  - Do not lookup user permissions unless context.user found
  - If context.internal, resolve immediately
  - Add unit tests for passing 'internal' and { internal: true }
2014-04-16 18:17:43 +02:00
Fabian Becker
b8e8f63e44 Adds additional fields to apps schema.
fixes #2356
- Adds slug, version and status fields to apps schema
- Added fields to data generator
2014-04-16 18:16:10 +02:00
Sebastian Gierlinger
c0dc8e95d2 Add new permissions to fixtures
closes #2325
- added new permissions
- added relation to user roles
- added updateFixtures to migrateUp
- removed validation per model to fix tests
2014-04-16 18:16:10 +02:00
Jacob Gable
13d2d04c72 App Permissions from package.json
Progress on #2095

- Add new AppPermissions class with read() method
- has default permissions to read and browse posts
- uses default permissions if no package.json
- uses default permissions if no ghost object in package.json
- errors when reading malformed package.json
- uses ghost.permissions if found in package.json
2014-04-16 18:14:56 +02:00
Fabian Becker
41cef386bc Implements Models & Data API for Apps
closes #2138
- Adds new models for AppField and AppSetting
- Removed permitted attributes from App model (handled by base)
- Added reference from Post to AppFields
- Added fixture data to DataGenerator
- Added integration tests for Apps, AppSettings, AppFields
- Added import for Apps
- Added app_fields to default fixtures
2014-04-16 18:14:56 +02:00
Jacob Gable
9369dd3bf7 Add app permission checking to canThis
- Pass permissions loading to buildObjectTypeHandlers to eliminate
shared state
- Load both app and user permissions to check
- Check app permissions if present
- Create apps table and App model
- Move effectiveUserPermissions to permissions/effective
- Change permissable interface to take context; user and app.
- Add unit tests for app canThis checks and effective permissions
2014-04-16 18:06:39 +02:00
Hannah Wolfe
9447b4ec2a Merge pull request #2560 from halfdan/filter-context
Implement filter context
2014-04-16 11:39:06 +01:00
Sebastian Gierlinger
9321289c1d Move post API to primary document format
closes #2580
- added new format to post API methods
- added post object parsing and wrapping to admin
- removed unused ‚user‘ object from API response
- updated tests
2014-04-16 12:09:03 +02:00
Jason Williams
7f8bc50ea8 Added functional tests for admin content screen
issue #2273
- test draft/page/published label
- test green add new post button
- test status and author in preview header
- test edit post button
- test delete modal
2014-04-12 20:56:53 +00:00
Hannah Wolfe
c746a88b2e Merge branch 'master' into ember
Conflicts:
	Gruntfile.js
	core/client/assets/lib/showdown/extensions/ghostdown.js
	core/client/views/editor.js
	core/clientold/assets/lib/showdown/extensions/ghostdown.js
	core/shared/lib/showdown/extensions/ghostimagepreview.js
	core/test/unit/showdown_client_integrated_spec.js
	core/test/unit/showdown_ghostimagepreview_spec.js
2014-04-07 22:26:53 +01:00
surgesoft
e89e38dd4b Refactor the API route tests to use supertest
close #2443
- Refactor API tests from `/core/test/functional/api` to
  `/core/test/functional/routes/api`, using supertest instead of request
- Remove `core/test/functional/api` folder
2014-04-07 15:40:20 +01:00
Hannah Wolfe
0bf2a5ada0 Merge pull request #2566 from jaswilli/fix/issue-2563
Build correct path on image upload when config has custom content path
2014-04-07 15:31:28 +01:00
Jason Williams
e3056990cd Build correct path on image upload when config has custom content path
closes #2563
- build path relative to imagesPath (which contains the custom content path)
  instead of appRoot
- added test for custom content path
- added logic to tests for Windows url building to handle cases where Windows
  functionality is being tested on a unix operating system
2014-04-07 05:01:39 +00:00
Hannah Wolfe
68fe40442b Merge pull request #2545 from joeljfischer/minify-jquery
[WIP] Ghost footer outputs minified jquery
2014-04-06 23:15:48 +01:00
Hannah Wolfe
9e358fb922 Merge pull request #2517 from novaugust/theme_error
Fixed check for a theme's custom error.hbs
2014-04-06 19:22:29 +01:00
Fabian Becker
c2e416fc9d Implement filter context
closes #2559
- Added a new unit test for context based filters
- Accept new parameter `context` in doFilter
2014-04-06 15:43:11 +00:00
Joel Fischer
758f844b8b Ghost footer outputs minified jquery in production
Closes #2524

- Added minifying jquery in grunt prod task

- Add test coverage for altered jquery
2014-04-06 08:42:25 -04:00
Hannah Wolfe
395d7fd3e2 Merge pull request #2516 from novaugust/last_login
Added populate last login time per #2515
2014-04-05 19:50:36 +01:00
Hannah Wolfe
e86bb50e7a Merge pull request #2450 from jaswilli/issue-2273
Add functional tests for admin navigation bar and menus
2014-04-05 18:57:31 +01:00
Hannah Wolfe
c38c778dbc Merge pull request #2500 from ErisDS/issue-2442
[WIP] Server start refactor, route tests use ghost app
2014-04-04 13:21:28 +01:00
Hannah Wolfe
e6abe9bab7 Server start refactor, route tests use ghost app
closes #2442, issue #2182

- Server start refactored - messaging is just messaging, deferred resolves the httpserver so that the connection can be closed
- Updated travis config to set node env
- Updated example config to be less travis-specific
- Route tests updated to use this new functionality
- Grunt test-routes simplified
2014-04-04 12:45:18 +01:00
Matt Enlow
345fe1a6d4 Fixed check for a theme's custom error.hbs:
Closes #2513
- Checks for property `error.hbs` on active theme
- Added unit test to ensure `error` view is rendered when activeTheme has
  a custom error template.
- Removed unused variable, `userErrorTemplatePath` from errorHandler
- Refactored errorHandler.`updateActiveTheme` to take one argument, the new active theme, and to then check if the active theme has an error.hbs
- Changed errorHandler unit test to use rewire for mocking config.
2014-03-29 08:19:51 -06:00
Fabian Becker
4e664f0e1c Fixes tag cache test issues introduced in c6c4d5a8 2014-03-27 21:23:23 +01:00
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
Jason Williams
b460697a18 Add functional tests for admin navigation bar and menus
issue #2273
- Check that menu nav items exist
- Check that menu nav items are labeled correctly
- Check that menu nav items have correct URLs
2014-03-19 21:33:50 +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
79a333b480 Merge branch 'master' into ember
Conflicts:
	bower.json
	core/client/views/editor.js
2014-03-16 20:52:44 +00: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
Hannah Wolfe
9415a232b0 Merge branch 'master' into ember
Conflicts:
	.gitignore
	.npmignore
	Gemfile.lock
	Gruntfile.js
	bower.json
	core/clientold/assets/fonts/icons.dev.svg
	core/clientold/assets/fonts/icons.eot
	core/clientold/assets/fonts/icons.svg
	core/clientold/assets/fonts/icons.ttf
	core/clientold/assets/fonts/icons.woff
	core/clientold/assets/sass/ie.scss
	core/clientold/assets/sass/layouts/auth.scss
	core/clientold/assets/sass/layouts/editor.scss
	core/clientold/assets/sass/layouts/errors.scss
	core/clientold/assets/sass/layouts/manage.scss
	core/clientold/assets/sass/layouts/plugins.scss
	core/clientold/assets/sass/layouts/settings.scss
	core/clientold/assets/sass/layouts/users.scss
	core/clientold/assets/sass/modules/animations.scss
	core/clientold/assets/sass/modules/breakpoint.scss
	core/clientold/assets/sass/modules/breakpoint/_context.scss
	core/clientold/assets/sass/modules/breakpoint/_helpers.scss
	core/clientold/assets/sass/modules/breakpoint/_no-query.scss
	core/clientold/assets/sass/modules/breakpoint/_parsers.scss
	core/clientold/assets/sass/modules/breakpoint/_respond-to.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/_double.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/_query.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/_resolution.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/_single.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/_triple.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/double/_default-pair.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/double/_default.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/double/_double-string.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/resolution/_resolution.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/single/_default.scss
	core/clientold/assets/sass/modules/breakpoint/parsers/triple/_default.scss
	core/clientold/assets/sass/modules/forms.scss
	core/clientold/assets/sass/modules/global.scss
	core/clientold/assets/sass/modules/icons.scss
	core/clientold/assets/sass/modules/mixins.scss
	core/clientold/assets/sass/modules/normalize.scss
	core/clientold/assets/sass/screen.scss
2014-03-09 23:04:36 +00: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
31f41822e0 Merge branch 'master' into ember
Conflicts:
	.gitignore
	Gruntfile.js
	bower.json
	core/client/assets/lib/showdown/extensions/ghostdown.js
	core/client/assets/vendor/showdown/extensions/ghostdown.js
	core/client/router.js
	core/clientold/assets/vendor/chart.min.js
	core/clientold/assets/vendor/codemirror/addon/mode/overlay.js
	core/clientold/assets/vendor/codemirror/codemirror.js
	core/clientold/assets/vendor/codemirror/mode/gfm/gfm.js
	core/clientold/assets/vendor/codemirror/mode/gfm/index.html
	core/clientold/assets/vendor/codemirror/mode/gfm/test.js
	core/clientold/assets/vendor/codemirror/mode/markdown/index.html
	core/clientold/assets/vendor/codemirror/mode/markdown/markdown.js
	core/clientold/assets/vendor/codemirror/mode/markdown/test.js
	core/clientold/assets/vendor/countable.js
	core/clientold/assets/vendor/fastclick.js
	core/clientold/assets/vendor/icheck/jquery.icheck.min.js
	core/clientold/assets/vendor/jquery.hammer.min.js
	core/clientold/assets/vendor/nprogress.js
	core/clientold/assets/vendor/packery.pkgd.min.js
	core/clientold/assets/vendor/showdown/extensions/ghostdown.js
	core/clientold/assets/vendor/showdown/showdown.js
	core/clientold/assets/vendor/validator-client.js
	core/test/unit/client_ghostdown_spec.js
	core/test/unit/client_showdown_int_spec.js
2014-03-05 23:10:44 +00: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
Harry Wolff
2295c9470b Add basic template for Ghost admin in Ember
Inspired and derived from:

https://github.com/taras/Ghost/compare/ember-admin
https://github.com/manuelmitasch/ghost-admin-ember-demo
https://github.com/stefanpenner/ember-app-kit
2014-02-26 20:39:45 -05:00
Hannah Wolfe
bee58922b2 Rename client -> clientold
issue #2271

- should allow development of new admin UI whilst still having access to the old ui
2014-02-27 00:52:04 +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
Hannah Wolfe
e81924282c Merge pull request #2190 from sebgie/issue#2171
Make session expiry less arsey
2014-02-18 22:05:44 +00:00
Hannah Wolfe
1eac0bd25d Merge pull request #2189 from halfdan/2112-tag-helpers
Helper updates for Tag Pages
2014-02-18 21:14:51 +00:00
Harry Wolff
9ab4b7d4d5 Adds tag pages
fixes #2111

- modified Post model to support a tag query
  param that will filter the desired post collection
  to only include posts that contain the requested tag

- in the updated Post model it includes the Tag model
  under a nested object called 'aspects'

- added tests for updated Post model, updating
  test utils to add more posts_tags relations

- adds two new routes to frontend,
  one for initial tag page,
  another to page that tag page

- for tag pages the array of posts
  is exposed to the view similarly
  to the homepeage

- on the tag view page the information
  for the tag is also accessible
  for further theme usage

- the tag view page supports a hierarchy of
  views, it'll first attempt to use a tag.hbs
  file if it exists, otherwise fall back
  to the default index.hbs file

- modified pageUrl and pagination helper
  to have it be compatible with tag paging

- added unit tests for frontend controller

- added unit tests for handlebar helper modifications

- add functional tests for new tag routes
2014-02-18 15:10:02 -05:00
Hannah Wolfe
679f65c50a Fix incorrect test name 2014-02-17 23:00:35 +00:00
Sebastian Gierlinger
d3c641ea31 Make session expiry less arsey
closes #2171
- added authentication middleware
- removed authentication from routes
- moved authentication before CSRF validation
- moved caching rules before authentication
- changed/added test
2014-02-14 11:00:11 +01:00
Gabor Javorszky
212711d896 Added package.js support for themes (and plugins)
Closes #2081
* Amended require-tree to populate availableThemes and availablePlugins to use full file names (`basename.ext`) as keys instead of just basename. This way `image.jpg`, `image.png`, `image.gif` won't overwrite the `image` key.
* Amended require-tree to allow package.json file parsing to return the contents of the file as json on the `package.json` key.
* settings api populates theme data `package` if it exists. Otherwise it assigns `false` to it
* `general.hbs` (salute) was reworked to if there is the package key on the theme is not false, it will use the `name` and `version` keys of that. You can break it by not having a `name` or `version` in the package.json file.
* Added error and warning messages for package.json file parse errors and misses
2014-02-13 23:57:58 +00:00