Commit Graph

772 Commits

Author SHA1 Message Date
Hannah Wolfe
805f45900e Merge pull request #3902 from Chrisui/custom-tag-templates
Custom template files for custom tags
2014-09-08 20:14:48 +01:00
Chris Pearce
97946cbc14 Ability to create custom template files for custom tags. Eg. tag-design.hbs 2014-09-05 17:35:30 +01:00
Jason Williams
1d6b1f9667 Prevent editor title from being overwritten
Closes #3955
- Change titleScratch from being bound to the title to being
  set when entering the editor so it is not overwritten on a
  model refresh.
- Ensure that the "unsaved content" dialog is shown when there are
  changes to the "scratch" fields after a post-settings-menu change.
- Add tests to prevent regression.
2014-09-04 19:27:59 +00:00
Matt Enlow
12cb93e333 Merge pull request #3953 from halfdan/2666-jshint-test
Apply JSHint to test files.
2014-09-03 13:40:01 -06:00
Fabian Becker
bc558cf0d2 Apply JSHint to test files.
closes #2666
- Add new jshint:test task
- Fix jshint errors
2014-09-03 20:33:58 +02:00
Jason Williams
c5b1319936 Merge pull request #3852 from ErisDS/issue-1967
Add the new body classes
2014-09-03 10:13:06 -05:00
Fabian Becker
c0adf5894f Remove permissions from configuration API
closes #3909
- Remove permissions from configuration API
- Remove permission setup from integration test
- Remove permissions from permissions.json
2014-09-02 15:48:32 +00:00
Hannah Wolfe
17f5ce6a2c Merge pull request #3888 from felixrieseberg/iss3884-content
Return leading image for {{content words="0"}}
2014-09-01 20:13:32 +01:00
Fabian Becker
688b3914e4 Implements new Configuration API
closes #3619
- adds new permissions for configuration API
- adds integration tests
- adds configuration API for reading allowed values
2014-08-31 20:54:17 +00:00
Hannah Wolfe
1ed286d09e Merge pull request #3866 from hswolff/config-updates
Move config module to be instance based and merge bootstrap into config.
2014-08-29 21:35:56 +01:00
Felix Rieseberg
1b203dc42a Return leading image for {{content words="0"}}
Closes #3884
- This PR includes a reimplementation of Downsize@0.0.5 with `words: "0"`. It uses the same parsing methods, therefore guarunteeing identical behavior.
- Tests have been updated to be more extensive.
2014-08-28 09:51:00 -07:00
Hannah Wolfe
93e4cfdadf Merge pull request #3855 from felixrieseberg/iss3844-importer
Importer: Sanitize UUIDs
2014-08-26 16:51:49 +01:00
Hannah Wolfe
25e08d6af5 Merge pull request #3882 from JohnONolan/fix-profile
Fix up user profile
2014-08-26 12:30:00 +01:00
Hannah Wolfe
5e126dfcd9 Fixing settings tests 2014-08-26 12:18:00 +01:00
Sebastian Gierlinger
42d6cc3983 Merge pull request #3859 from ErisDS/issue-1299
Update editor markdown tests
2014-08-26 12:21:36 +02:00
Sebastian Gierlinger
cab8254539 Merge pull request #3860 from ErisDS/issue-3857
Redirect uppercase routes to lowercase version
2014-08-26 12:19:52 +02:00
Sebastian Gierlinger
bb9eee9b4c Merge pull request #3865 from ErisDS/issue-3750
Delete tokens before deleting a user
2014-08-26 12:16:49 +02:00
Hannah Wolfe
5856cdd67e Merge pull request #3861 from cobbspur/metas
Added correct contextual Meta Titles and Descriptions
2014-08-24 18:58:23 +01:00
Felix Rieseberg
6fe93f6a50 Importer: Sanitize UUIDs
Closes #3844
- Before importing, all data is checked for incorrect UUIDs. If check
fails, data is sanitized and outfitted with correct UUIDS.
- Scaffolding allows for easy implementation of additional
sanitization, should that be required in the future.
- Test included, old tests updated.
2014-08-23 18:02:23 -07:00
Jason Williams
c02240dd5f Adjust setup and teardown of route tests.
Closes #3856
- No longer call clearData and initData in test setup because
  migration.init is run during Ghost startup.  The unhandled
  error was a result of clearData removing all the tables while
  Ghost was running--there was a timing issue with the oauth middleware
  checking the refreshtokens table when it had just been deleted.
2014-08-23 21:22:01 +00:00
Harry Wolff
583c7970d9 Move config module to be instance based and merge bootstrap into config.
helps with #827, otherwise no issue

- This is general code clean-up and unification.
- Merges code from bootstrap.js into config module as they were both
concerned with managing the config file and as such should be in one
location.
- Updates all relevant tests.
2014-08-23 15:54:43 -04:00
Hannah Wolfe
74c6a341be Delete tokens before deleting a user
fixes #3750

- Updated tests to create tokens for one user. This caused the tests to
  fail for MySQL exposing the bug.
- Delete user's tokens along with posts
2014-08-23 20:13:17 +01:00
Jason Williams
07ad400ee0 Replace the when promise library with bluebird.
Closes #968
2014-08-23 17:15:40 +00:00
Hannah Wolfe
6a52fc8ace Redirect uppercase routes to lowercase version
fixes #3857

- adds uncapitalise middleware which detects uppercase in req.path and
  redirects to the lowercase equivalent
- change the ghost route to a regex, just so it's consistent with other
  routes in the file
2014-08-23 17:59:58 +01:00
cobbspur
8604601027 Added correct contextual Meta Titles and Descriptions
closes #2462

- adds conditionals for pagination for index, tags and author pages
- outputs correct meta title and description according to context
- adds further unit testing
2014-08-23 17:42:05 +01:00
Hannah Wolfe
c40535775f Update editor markdown tests
closes #1299

- update tests to check for full strings with spaces now that this is no
  longer an issue
- reorganise duplicated test for images
2014-08-23 14:22:43 +01:00
Hannah Wolfe
f7e92d20e2 Merge pull request #3815 from JoshWillik/extract-init
Extract the starting functionality into an exported class.
2014-08-22 20:06:03 +01:00
Hannah Wolfe
2800671bbd Add the new body classes
closes #1967

- adds paged to eventually replace archive-template
- adds page-template to eventually replace page
- changes custom page template class to be page-slug instead of
  page-template-slug
2014-08-22 10:33:35 +01:00
Hannah Wolfe
663dc5861b Removing hard-coded port number
closes #1391
2014-08-22 08:58:21 +01:00
Josh Vanderwillik
1438278ce4 Extract starting functionality into an exported class
closes #3789
- Create a GhostServer class to manage state
- index.js now calls start on the exported server
- Alter tests to expect a GhostServer instance
2014-08-21 17:04:39 -04:00
Jason Williams
74fd6fc09a Change tests to accommodate pg differences.
Refs #2499
- Since PostgreSQL handles transactions differently than
  MySQL and SQLite3 there are differences in the way and
  number of errors that are returned.  Update tests to
  only check that at least one error of the proper type
  was returned.
2014-08-20 20:58:50 +00:00
Hannah Wolfe
3a1839dfa3 Merge pull request #3817 from felixrieseberg/iss685
Prev & Next Links for Ghost_Head
2014-08-20 20:59:55 +01:00
Felix Rieseberg
15e4dd1e9f Pre & Next Links for Ghost_Head
closes #685
- Now that we have a ‘pagination’ meta object, we can implement
SEO-friendly `next` and `prev` ref links in `<head>`.
- This implementation works uniformly for anything that supports
pagination in the current schema (posts, tags, authors)
- Regex should make the implementation future-proof for additional
pagination
2014-08-20 12:28:21 -07:00
Hannah Wolfe
edc9f5e164 Merge pull request #3816 from felixrieseberg/iss3671
'Autocorrect' for posts per page setting
2014-08-20 13:44:29 +01:00
Sebastian Gierlinger
f0da28abb3 Fix broken status code
closes #3779
- added custom error classes for OAuth errors (bug was caused by
oauth2orize error classes)
- added basic tests for `/authentication/token` endpoints
2014-08-20 11:28:55 +02:00
Hannah Wolfe
f2aefd257e Removing remaining references to Polyglot
refs #3802
2014-08-19 16:36:26 +01:00
Hannah Wolfe
e6bb7c4443 Merge pull request #3802 from ErisDS/i18n
Removing prototypal i18n code
2014-08-19 15:25:40 +01:00
Hannah Wolfe
09383dc181 Merge pull request #3777 from hswolff/lazy-models
Move Models module to have an init method that sets up all models
2014-08-19 15:24:55 +01:00
Hannah Wolfe
6c96d00bcc Merge pull request #3767 from jaswilli/clear-ws-slug 2014-08-19 10:13:45 +01:00
Felix Rieseberg
acf8ffc1fb 'Autocorrect' for posts per page setting
See #3671
- As @JohnONolan’s suggestion, if the user enters an invalid value for
the ‘posts per page’ setting, the number autocorrects to 5, iOS
autocorrect-style
2014-08-18 23:24:59 -06:00
Jason Williams
c4fb17d2d7 Reset slug input text box after invalid input.
No Issue
- When an invalid, all whitespace slug is entered into the
  slug input in the post settings menu, it's rejected but
  the input's value still remains the same.  This resets the
  input back to its original value.
- Added test for the above behavior.
- Only show success notification if slug was actually changed.
- Convert whitespace from tabs to spaces in post-settings-menu.hbs
2014-08-18 21:10:57 +01:00
Hannah Wolfe
02ca955a00 Merge pull request #3766 from jaswilli/user-slug
Correct behavior on updating user slug.
2014-08-18 20:55:54 +01:00
Harry Wolff
5ff2a31ce1 Move Models module to have an init method that sets up all models
resolves #2170

- creates a models.init() function that requires all other model files
and caches them.  This is opposed to the previous functionality where
when you require('./models') it would immediately require all other models.
Now it's done when you want.

- Updates all tests to reflect the new structure of the model module
2014-08-18 15:54:10 -04:00
Jason Williams
e73468fb1e Fix and enable general and user settings tests.
Conflicts:
	core/test/functional/client/settings_test.js
2014-08-18 20:44:26 +01:00
Hannah Wolfe
3bf3d497cf Fixing tests, PSM and settings pane
- resolving test failures where number of tests changed
- fixing issue with PSM label
- re-removing app settings screen code
2014-08-18 18:16:09 +01:00
John O'Nolan
04536b3916 God damn tests 2014-08-17 22:23:00 +03:00
John O'Nolan
85b7819791 Implement new button markup 2014-08-17 14:57:07 +03:00
Hannah Wolfe
b91dee35c4 Removing prototypal i18n code
refs #16, #17, #18, #19, #20, #21, #3801

- This code was a prototype system built when Ghost was still a prototype.
  It was never fully implemented and hasn't actually worked for ages.
- Now that the admin is in Ember, it's likely we'll need a very different
  system.
2014-08-16 17:29:54 +01:00
Hannah Wolfe
9b7be32c0c Merge pull request #3775 from felixrieseberg/iss3765
Ensure Owner's role isn't downgraded
2014-08-16 17:07:41 +01:00
Felix Rieseberg
47ba9a7385 Ensure Owner's role isn't downgraded
closes #3765
- Simple API check to ensure that the owner isn’t downgraded to a
different role (analog to the ’can’t change your own role’ check)
- Test added to ensure Owner can't be downgraded to a lower role
2014-08-15 17:44:30 -04:00