Commit Graph

4717 Commits

Author SHA1 Message Date
David Balderston
81c215dbe5 Update Post Slug while Draft on Title Changes
Closes #5062

* As long as the post has never been published, update the slug to
match the new title if the title is changed
2016-03-23 10:20:22 -07:00
Jason Williams
136bdbd9ff Return http status 204 on deletes
Closes #2871
- Refactor api http handlers.
- Update tests.
- Remove special handling of responses in ember adapter.
2016-03-22 11:42:48 -05:00
Hannah Wolfe
bba7bdd8eb Merge pull request #6613 from jaswilli/delete-content-refactor
Refactor content deletion
2016-03-22 16:39:43 +00:00
Kevin Ansfield
94abaca531 Merge pull request #6611 from dbalders/ember-navitems
Remove Nav Item Placeholder and Set as Base Url Value
2016-03-22 16:18:28 +01:00
Jason Williams
9fe573a0c5 Refactor content deletion
- Simplify the `init` method in `models/index.js` so that it no longer
  returns a promise. Easier to use.
- Eliminates the `deleteAllContent` method from `models/index.js` as it
  can all be handled at the API layer in a single spot.
- Optimize `destroyAllContent` in `api/db.js`. Eliminates
  double-fetching every post from the database and converting it to
  JSON. Also only fetches ids from the database instead of the entire
  model.
- Eliminates the custom static method `destroy` in the Post model in
  favor of handling detaching tag relations in a single place (the
  `destroying` event). This also eliminates a big source of unneeded
  database round trips--needing to get post ids to feed into
  `Post.destroy()` which then re-fetches the post again.
2016-03-22 10:10:09 -05:00
Sebastian Gierlinger
229c2925a6 Merge pull request #6622 from ErisDS/migration-messaging
Migration messaging improvements
2016-03-22 15:24:13 +01:00
David Balderston
9eb0a8a690 Remove Nav Item Placeholder and Set as Base Url Value
Closes #6440

* Removed the `.fake-placeholder`class from the input, test, and css
* On adding a nav item, if the url value has not been set by the user,
then set it to the base url as shown in the input
* If url has been set by the user, just do what it has always done
2016-03-22 07:11:20 -07:00
king6cong
cf7bc6f415 fix invalid preview url 2016-03-22 20:42:46 +08:00
Hannah Wolfe
84f387785a Migration messaging improvements
refs #6301

- fix messages that joined with comma and therefore missed outputting version no
- change `logInfo` to `logger` that has both an info and a warn method
- add new warn method to errors
- add a warn message everytime a migration (data or fixture) gets skipped over
- update logger everywhere, including tests
- update tests to check logger.warn gets called
2016-03-22 09:59:22 +00:00
Sebastian Gierlinger
c2d8436437 Merge pull request #6621 from ErisDS/fixture-run-once
Ensure fixture operations only run if needed
2016-03-22 10:32:31 +01:00
Jason Williams
82b0b92b73 Merge pull request #6619 from kevinansfield/ember-data-2-4-2
deps: ember-data@2.4.2
2016-03-21 13:31:03 -05:00
Hannah Wolfe
9030620b23 Ensure fixture operations only run if needed
refs #6301

- Make sure that every fixture operation has a check to ensure that it hasn't already run
- E.g. The update of sort_order on posts_tags should only happen if there are no values which aren't a zero
  - This makes sure that we don't accidentally overwrite data on FORCE_MIGRATE
- No need to try to set settings types if they are already correct
- Only update the admin client if it needs it, else we're regenerating secrets each time
2016-03-21 18:15:01 +00:00
Kevin Ansfield
3d8e40f9ae deps: ember-data@2.4.2
no issue
- https://github.com/emberjs/data/releases/tag/v2.4.1
- https://github.com/emberjs/data/releases/tag/v2.4.2
- uses the new public import path for `EmbeddedRecordsMixin` (http://emberjs.com/blog/2016/03/13/ember-data-2-4-released.html#toc_importing-modules - note that the module naming there isn't quite right)
2016-03-21 16:37:42 +00:00
Jason Williams
90dca163a6 Merge pull request #6618 from kevinansfield/ember-2-4-3
deps: ember@2.4.3
2016-03-21 10:17:41 -05:00
Sebastian Gierlinger
ea9c8235fa Merge pull request #6609 from ErisDS/new-db-upgrade
Rewrite DB update to be explicit
2016-03-21 16:14:59 +01:00
Kevin Ansfield
8f33a3540d deps: ember@2.4.3
no issue
- https://github.com/emberjs/ember.js/releases/tag/v2.4.2
- https://github.com/emberjs/ember.js/releases/tag/v2.4.3
2016-03-21 14:10:18 +00:00
Sebastian Gierlinger
1256272640 Merge pull request #6616 from ErisDS/meta-schema-fix
Never output null JSON-LD schema
2016-03-21 10:22:06 +01:00
Sebastian Gierlinger
25c490b2ec Merge pull request #6614 from ErisDS/paginated-urls
Clean up paginated URL generation
2016-03-21 10:08:53 +01:00
Hannah Wolfe
9a8fbd5286 Never output null JSON-LD schema
refs #5091, #6612

- fixes meta data so it won't output 'null' as a JSON-LD schema
- added test coverage for this if/else
- this case cannot happen within the existing system, it only happens with custom channels after #6612
2016-03-20 22:36:02 +00:00
Hannah Wolfe
5f2c913fc1 Clean up paginated URL generation
refs #5091, #6612

- unify getNextUrl & getPrevUrl into getPaginatedUrl
- ensure that it can generate a prev, next or exact page no url
- ensure that it can figure out the base url
- use the same code from the page_url helper
- refactor the tests to ensure there's 100% coverage

Following on from #6612, this ensures that pagination always works regardless of whether the channel is default or custom
2016-03-20 22:35:00 +00:00
Hannah Wolfe
17499dbc7b Generate context from channelConfig, not URL
refs #5091

- makes post context explicit - data.post must be set, rather than post being the default
- uses channelConfig to determine the context for a channel (the channel name) rather than basing it off of the URL
- updates tests to setup the contexts more clearly, the outcome has not changed

Since #6469 req has channelConfig attached to it.
We can use req.channelConfig to determine what the context should be for a channel (the channel name)
This allows us to remove the hardcoded URLs, and means that custom channels will automatically get their own context.
Coupled with removing 'post' from being a default/fallthrough, to being explicitly set, this will reduce
potential context errors, as we start to extend the frontend capabilities
2016-03-20 12:59:25 +00:00
David Balderston
c55140d0db Change default setting for to inside foreach helper
closes #6604

* Default for `to` was always `(from-1) + limit`. This caused a problem
where the `to` value could be higher than the length of the number of
blog posts, causing `@last` to never be called/reached
* Now sets `to` to have a default of `length` and if a limit was sent
through and not higher than `length`, to then set `to` to that value
* Added some extra tests for `@last` and `@first` use cases
* Added some inline commenting
2016-03-17 17:52:38 -07:00
Hannah Wolfe
0ad93c3df2 Rewrite DB update to be explicit
refs #6301

- Replace builder & automated database upgrade with a set of explicit tasks
- Ensure the tasks can only happen if they need to
- Remove some duplicate code between fixture & db upgrades (more to do)
- Add tests
2016-03-17 21:17:19 +00:00
Hannah Wolfe
051a917e37 Fix role fixture ordering bug in pg tests
closes #6605

- ensure that roles are being output in order of their ID before asserting
- the asserting checks both the content and order of the array - this could be done differently as order doesn't really matter here, but will let us know if there are changes in DB behaviour
2016-03-15 19:08:25 +00:00
Sebastian Gierlinger
0c483a0997 Merge pull request #6599 from ErisDS/migrations-split
Split migrations/index.js & add tests
2016-03-15 13:47:44 +01:00
Sebastian Gierlinger
f950775b48 Merge pull request #6602 from ErisDS/version-tests
Improve `getDatabaseVersion` & versioning tests
2016-03-15 11:22:09 +01:00
Hannah Wolfe
2cfee3812f Split migrations/index.js & add tests
refs #6301

- changes createTable to use createTableIfNotExists, this is consistent with deletion
- splits out backup, reset, update and populate functions from migration/index into their own files
- moves the wrapped function for populatingDefaultSettings to fixtures.ensureDefaultSettings
- moves `modelOptions` down to the fixture files that actually use it
- adds test coverage for backup, reset and populate, but not for update as that needs refactoring
2016-03-15 10:11:33 +00:00
Sebastian Gierlinger
f5602f3527 Merge pull request #6601 from ErisDS/remove-should-sinon
Remove should-sinon dependency
2016-03-15 11:10:48 +01:00
Hannah Wolfe
81deb88263 Improve getDatabaseVersion & versioning tests
refs #6301

- `currentVersion` was leftover from before the first public release of Ghost!
- simplified the code for `getDatabaseVersion`
- improved & made consistent how errors are handled in `getDatabaseVersion`
- migration error handling updated to reflect the changes in `getDatabaseVersion`
- added tests for both `getDatabaseVersion` and `setDatabaseVersion`
2016-03-14 17:11:04 +00:00
Hannah Wolfe
e4a1797085 Remove should-sinon dependency
no issue

- removes should-sinon dependency from package.json
- rewrites all usages of should-sinon to use normal should assertions

Unfortunately, should-sinon has very minimal documentation  and therefore it is hard to discern what is considered a correctly-written assertion:
- in some cases, refactoring to use should-sinon causes false positives
- in other cases, assertions that work written in the normal way fail when written using should-sinon (e.g. getters, combos with rewire)
The additional overhead created by these issues outweigh any benefit from the easier-to-read assertions
2016-03-14 16:52:22 +00:00
Hannah Wolfe
2386a69f9d Always override database config + exit tests on error
refs #6354, #6495 & #6599

- don't allow config.database to be merged, instead, override it always
- make sure that route tests call done even when they error
2016-03-14 15:39:59 +00:00
Hannah Wolfe
9309adc511 Exporter cleanup & tests
refs #6301

- change knex getter def to be configurable, else it is not testable
- remove exportPath and lang from config - neither are used
- add client_trusted_domains to tables which shouldn't be exported as there are no clients in the export
- change export signature to be an object with `doExport` function consistent with import & easier to test
- cleanup export code so it is clearer, easier to read & to test:
  - use mapSeries instead of sequence
  - use Promise.props instead of Promise.join
  - split functionality into smaller functions
- add test coverage
2016-03-12 19:01:25 +00:00
Sebastian Gierlinger
411dd47002 Merge pull request #6579 from jaswilli/auth-api
Refactor authentication API into pipeline format
2016-03-08 15:54:34 +01:00
Jason Williams
fe13503470 Refactor authentication API into pipeline format
Refs #5508
2016-03-07 11:53:54 -06:00
Austin Burdine
5779ebbd2b Merge pull request #6581 from kevinansfield/ember-cli-242
deps: ember-cli@2.4.2
2016-03-07 06:28:12 -07:00
Sebastian Gierlinger
21770c53da Merge pull request #6572 from ErisDS/data005-part1-fixpastfixtures
Data 005 - Part 1 - Fix Past Fixtures (refactor & test fixture migrations)
2016-03-07 11:26:30 +01:00
Kevin Ansfield
db8946c90e deps: ember-cli@2.4.2
no issue
- bugfix release: https://github.com/ember-cli/ember-cli/releases/tag/v2.4.2
2016-03-07 09:17:51 +00:00
Kevin Ansfield
7e0eb5911d deps: ember-cli@2.4.1
no issue
- bugfix release - https://github.com/ember-cli/ember-cli/releases/tag/v2.4.1
2016-03-03 09:17:37 +00:00
Hannah Wolfe
b2659d0cbb Refactor & test fixture migrations
refs #6301

Fixtures:
- Removed all the old (and now broken) 003 fixture upgrades
- Split the 004 fixture upgrade tasks out, each into their own file
- Improved the versioning code that figured out which upgrades we should do
- Added lots of test coverage to make sure all the fixtures are still being run correctly.

Permissions fixtures:
- Changed the code that was populating permissions fixtures to be more automated & based only on what is in the permissions.json file.
- Added lots of test coverage to make sure all the permissions are still being created correctly.

Merging the two things:
- Merged the content of permissions.json and fixtures.json into fixtures.json, but using the new structure from permissions.json.
- Changed to use the new automated model & relation creation for all fixtures, not just permissions.
- The only thing that can't be auto-populated just now is the owner creation, I think that's important enough to do separately.
- There were (so far) never any permission updates, so code for updating fixtures stays the same through the merge.
- This results in two clear code paths: populate (fill out a brand new DB) and update (make any changes since the last version)

Test coverage is now 100% across both updates and populations.
2016-03-03 09:03:37 +00:00
Hannah Wolfe
4a2944d36a Merge pull request #6566 from acburdine/ghost-url-fix
Ensure null query options don't break ghost-url
2016-03-02 18:39:56 +00:00
Jason Williams
1edf49daf7 deps: bluebird@3.3.3
- Finishes refactoring started in #6376.
- Fixes invalid Promise.map() call.
- Cleans up promise (rejection) handling.
2016-03-01 15:17:20 -06:00
JT Turner
3db9913191 deps: bluebird@3.1.2
closes #6361
- Updated bluebird dependency to latest 3.1.2.
- Updated update check to handle promises not resolving to arrays.
- Reviewed all other promise code and it looks good.
- Updated code using settle to use the new reflect function.
2016-03-01 14:47:23 -06:00
Kevin Ansfield
4d35f954b4 deps: ember-data@2.4.0 2016-03-01 12:49:43 +00:00
Kevin Ansfield
73f2a61feb deps: ember@2.4.1 2016-03-01 12:49:43 +00:00
Kevin Ansfield
f451ff5aef deps: ember-cli@2.4.0 2016-03-01 12:49:28 +00:00
Austin Burdine
193e033f99 ensure null query options don't break ghost-url
closes #6565
2016-02-29 00:25:38 -06:00
Peter Szel
956932b07f Fixed bugs regarding the published date input field validation.
refs #5777

- removing error message from the previous validation
- only checking if date is in the past if the input date is valid to begin with
- always updating the view, even if the date hasn't changed to make sure the date format stays consistent
2016-02-28 01:33:24 +00:00
Peter Szel
6387b87fab Fixed skiplink positioning
refs #5986

- removed static position of the skiplink to prevent pushing the page content down
- only applying :focus CSS selector to focusable sr-only content
2016-02-27 15:37:15 +00:00
Aileen Nowak
e347f95f15 Including timezones API in configuration endpoint
refs #6406
- endpoint configuration/timezones refers to timezones.json file in data
- added route for endpoint in api.js to use method read in configuration.js
2016-02-24 16:44:01 +02:00
Kevin Ansfield
f4cdf4dc15 Merge pull request #6561 from acburdine/test-fixes
Ember client test fixes
2016-02-24 09:36:24 +00:00
Kevin Ansfield
5de57f892d Merge pull request #6548 from ErisDS/config-api
Restructure Configuration API endpoint
2016-02-24 09:34:51 +00:00
Austin Burdine
df720934e1 various test 🐛 fixes
refs #6550
- cleanup deprecation messages
- fix get `undefined` error in tests
2016-02-23 23:27:57 -06:00
Austin Burdine
1fabe0805a Merge pull request #6558 from kevinansfield/refactor-feature-service
Refactor the feature service
2016-02-23 22:03:24 -06:00
Sebastian Gierlinger
81f119d098 Merge pull request #5888 from ErisDS/improve-fileserve
Serve immediate 404 for static files (no fallthru)
2016-02-23 17:15:21 +01:00
Kevin Ansfield
ad1fbfa456 Refactor the feature service
no issue
- removes the unneeded manual caching of the settings object
- fixes multiple API requests to fetch settings when using the feature service
2016-02-23 15:22:32 +00:00
Sebastian Gierlinger
6b852c11d8 Merge pull request #6553 from ErisDS/slack-unfurls
Strutured data: Slack Unfurls & published_at fix
2016-02-22 20:17:04 +01:00
Sebastian Gierlinger
37ef512a19 Merge pull request #6543 from ErisDS/fixture-i18n
Remove i18n from migration output
2016-02-22 09:49:55 +01:00
Sebastian Gierlinger
8d6ec8555c Merge pull request #6544 from ErisDS/client-secret
Move client secret logic into the model
2016-02-22 09:49:05 +01:00
Sebastian Gierlinger
24e6a93f22 Merge pull request #6555 from ErisDS/not-context
Rename confusing 'context' variables
2016-02-22 09:47:06 +01:00
Hannah Wolfe
8cef27d698 Fix jsDoc on i18n.t()
no issue

- my IDE has been moaning at me for every usage of i18n.t that didn't have 2 args
- this uses the optional notation and expects an object instead of JSON (JSON requires keys to be quoted)
2016-02-22 01:57:22 +01:00
Hannah Wolfe
dcc8bcc4f1 Strutured data: Slack Unfurls & published_at fix
refs #6534

- fixes a bug where published_at was incorrectly falling back to the created_at date
- updated meta index to get author name
- add written by & filed under labels + data if the values are present (only on posts/pages)
- updated tests
2016-02-22 01:45:00 +01:00
Hannah Wolfe
10fc320cc8 Rename confusing 'context' variables
no issue
- In Ghost, 'context' means the page or section of a blog we're currently within
when rendering a theme, e.g. 'post' or 'tag' or 'home'.
- In handlebars 'context' refers to the blob of JSON that is tied to a template.
- These two uses of the word 'context' have gotten very confusing, so I've removed all usage of 'context' within the Ghost handlebars helpers, EXCEPT where they actually refer to the current context (e.g. the is helper)
2016-02-21 22:07:15 +00:00
Hannah Wolfe
a59cfc70a1 Serve immediate 404 for static files (no fallthru)
closes #5887

- make use of the new 'fallthrough' option which landed in express-static 1.10.0
- change local-file-store and middleware serving `/public/` and `/shared/` files to use the new `fallthrough: false` option
- 404s are now served directly, without slashes or uncapitalise getting triggered
2016-02-21 19:17:27 +00:00
Hannah Wolfe
ed16998461 Restructure Configuration API endpoint
refs #6421, #6525

- The configuration API endpoint was a bit of an animal:
   - It's used currently in two ways, once for general config, another for the about page.
   - These two things are different, and would require different permissions in future.
   - There was also both a browse and a read version, even though only browse was used.
   - The response from the browse was being artificially turned into many objects, when its really just one with multiple keys
- The new version treats each type of config as a different single object with several keys
- The new version therefore only has a 'read' request
- A basic read request with no key will return basic config that any client would need
- A read request with the about key returns the about config
- A read request with a different key could therefore return some other config
2016-02-19 18:49:23 +00:00
Austin Burdine
5429ef4784 Merge pull request #6546 from quangtt/preview-icon
Fix preview icon position in editor
2016-02-19 11:35:05 -06:00
Austin Burdine
b5c9598cad deps: ember-cli-deprecation-workflow@0.1.6
- fixes deprecation error on build
2016-02-19 09:20:17 -06:00
quangtt
c557aaffd0 Fix preview icon position in editor (updated) 2016-02-19 21:55:04 +07:00
Hannah Wolfe
bbf5763756 Remove i18n from migration output
refs #5345

- As discussed in #5345, this is effectively debug output.
- It currently only appears on the console, and console output should be in English
- If we add a UI later, this should be translated, but console/debug output should not
2016-02-19 12:23:19 +00:00
Kevin Ansfield
72cbda3646 Merge pull request #6518 from acburdine/ember-cli-take-2
Update ember-cli to 2.3.0
2016-02-19 11:56:47 +00:00
Hannah Wolfe
003c8d5462 Move client secret logic into the model
refs #6301

- Move secret generation logic to the model defaults, so there's no need to handle this in fixtures
- Tested upgrades from 003 & fresh installs -> all is well
2016-02-18 20:33:37 +00:00
Kevin Ansfield
455d456a5b Fix new post->tags transition
refs #6483, closes #6541
- removes unloading of all tags when entering the tags screen. Tags list will now function similarly to the content list where already-loaded tags are visible immediately.

Fixes #6483 because it prevents selectize's data being changed out from underneath it before it's destroyed.
2016-02-18 18:01:08 +00:00
Kevin Ansfield
b4bae4741a Revert "pass post tags as array to ember-cli-selectize"
This reverts commit efff6f62ae.
2016-02-18 17:57:18 +00:00
Hannah Wolfe
841b552b52 Fixing typo in i18n key 2016-02-18 12:52:53 +00:00
Kevin Ansfield
17a8d8c029 Merge pull request #6520 from acburdine/issue-6515
Fix logging out from editor page
2016-02-18 12:36:59 +00:00
Hannah Wolfe
d7b9eb6176 Fix facebook/twitter/schema description
refs #6534

- this is an initial fix for having no description at all unless a meta description is provided
- we may need to tweak the lengths / provide different lengths for different values in future
2016-02-18 12:11:46 +00:00
Kevin Ansfield
0daabbe02f Merge pull request #6513 from acburdine/issue-6512
Fix underscore usage in post serializer
2016-02-18 09:30:44 +00:00
Hannah Wolfe
cdbec7a8ba Merge pull request #6532 from jaswilli/issue-6491
Provide entire model to validator
2016-02-18 09:12:06 +00:00
Kevin Ansfield
b0f4a0391d Merge pull request #6533 from acburdine/issue-6483
Pass post tags as array to ember-cli-selectize
2016-02-18 09:08:09 +00:00
Kevin Ansfield
24e84ca531 Merge pull request #6531 from acburdine/issue-6530
Inject ajax service in settings/labs
2016-02-18 08:58:12 +00:00
Hannah Wolfe
71062a0026 Merge pull request #6517 from halfdan/fix-6516
Use req.path instead of req.url to check for file extension
2016-02-18 08:37:32 +00:00
Kevin Ansfield
dcf712643f Merge pull request #6524 from acburdine/signin-test
Add sign-in acceptance test
2016-02-18 08:31:03 +00:00
Hannah Wolfe
d1b56c23fe Merge pull request #6507 from cameronviner/6505
Clean up the after the shouldjs upgrade tests closes #6505
2016-02-18 07:44:23 +00:00
Austin Burdine
efff6f62ae pass post tags as array to ember-cli-selectize
closes #6483
- fix new post => settings/tags transition error
2016-02-17 22:24:16 -06:00
Jason Williams
b10da0569a Provide entire model to validator
Closes #6491
2016-02-17 17:30:16 -06:00
Austin Burdine
c1d962ac63 inject ajax service in settings/labs
closes #6530
- turns out one must inject a service in order to use it
2016-02-17 14:50:40 -06:00
Fabian Becker
f14910fa8e Use req.path instead of req.url to check for file extension
fixes #6516
2016-02-17 19:24:49 +01:00
Hannah Wolfe
02199c6b02 Disambiguate between error code & status code
refs #6526

- Change our errors to use `statusCode` for the status code (like res.statusCode)
- Use statusCode for anything that's supposed to be the statusCode, rather than an error idenfier/code
- Update all the tests that check the key
- Route tests don't need fixing as the status codes are still returned correctly
2016-02-17 15:20:49 +00:00
Cameron Viner
8fd272476b Removed uneeded jshint comments in order to cleanup the tests
closes #6505
-Removed all of the /*jshint expr:true*/ comments from the tests
-Removed all of the should.equal(true, true) statements from the tests
-Removed should from the greenkeeper ignores
2016-02-17 12:52:43 +00:00
Austin Burdine
a13b899817 add signin acceptance test
refs #6039
2016-02-16 23:08:24 -06:00
Austin Burdine
980c864f68 fix logging out from editor page
closes #6514
- removes transition.abort from the signout method because it can override the ember-simple-auth's page refresh
2016-02-16 20:07:03 -06:00
Austin Burdine
aa3be2a568 deps: ember-cli-deprecation-workflow@0.1.5 2016-02-16 15:06:32 -06:00
Austin Burdine
efe8fc4da6 deps: ember-cli@2.3.0 2016-02-16 12:32:48 -06:00
Austin Burdine
1ed2a8b6a7 fix underscore usage in post serializer
closes #6512
- because of the keyForAttribute method in the application serializer, the hash property must be snake_case
- change the normalize method to the more concise normalizeHash method available on the rest serializer
2016-02-16 09:37:15 -06:00
Hannah Wolfe
c301510cd1 Refactor gravatarLookup, remove request dependency
no issue

- request is quite a heavy dependency
- we were only using request in 3 places: a test, storing contrib images in the gruntfile & the gravatar lookup
- all 3 are relatively simple to do with the http/https module
- refactored all 3, removed request
2016-02-16 11:12:01 +00:00
Sebastian Gierlinger
3c5c5ad9d0 Merge pull request #6469 from ErisDS/dynamic-channel-routing
Dynamic channel routing
2016-02-15 19:27:41 +01:00
Hannah Wolfe
13c1742eb9 Make frontend routing dynamic & driven by channels
refs #5091

- Move renderChannel to own file
- Update channel config to have get/list methods
- Move main routes to be generated based on the list of channels
- Move RSS routes to be subroutes of channels
- Move redirect301 to be a shared util
- Add full test coverage
- Split frontend route tests into frontend & channels
2016-02-15 15:57:20 +00:00
Kevin Ansfield
14a3f4411c Merge pull request #6486 from acburdine/code-injection-test
Add settings/code-injection acceptance test
2016-02-15 11:07:01 +00:00
Kevin Ansfield
777b0227fd Merge pull request #6488 from acburdine/labs-test
Add settings/labs acceptance test
2016-02-15 11:05:29 +00:00
Kevin Ansfield
1da47aa1c9 Merge pull request #6387 from novaugust/post-deletion
Fix post deletion scroll on content and tag screens
2016-02-15 11:02:42 +00:00
Kevin Ansfield
8ac61d0ed2 Merge pull request #6506 from acburdine/posts-error-fix
Improve 404 error handling in post route
2016-02-15 09:56:34 +00:00
Kevin Ansfield
d10773da1b Merge pull request #6508 from acburdine/patch-2
Remove unused modal outlet
2016-02-15 09:08:38 +00:00
Sebastian Gierlinger
fbd8ff7208 Merge pull request #6502 from ErisDS/mig-test
Migration related test improvements
2016-02-15 09:08:48 +01:00
Austin Burdine
53b92d4322 remove unused modal outlet 2016-02-14 18:55:59 -06:00
Austin Burdine
7e1941d45c improve 404 error handling in post route
closes #6503
- change post route 404 handling to match that of the editor and tag routes
- fix 404 tests
2016-02-14 16:49:57 -06:00
Hannah Wolfe
76934b44c1 Merge pull request #6499 from javorszky/iss_6493
Moves builFilesExist to startup-checks
2016-02-14 19:58:31 +00:00
Gabor Javorszky
7691b03d5a Moves builFilesExist to startup-checks
Fixes #6493

* moved function to startup checks
* flipped file system checks to sync versions
* exits on first sign of trouble
2016-02-14 18:28:37 +00:00
Hannah Wolfe
7c47249ac7 Merge pull request #6501 from cobbspur/backup
Backup database before deletion
2016-02-14 13:57:26 +00:00
Hannah Wolfe
17805767fd Merge pull request #6468 from kevinansfield/ember-sortable-nav-items
Replace jquery-ui.sortable with ember-sortable for nav items
2016-02-14 13:44:07 +00:00
Hannah Wolfe
54979049ee Migration related test improvements
refs #6301

- Don't hardcode the model fields in utils/api -> use the schema + modify the lists
   = We can now easily see what the differences between the schema and the API result are
- Don't hardcode the default DB version in the import/export tools
   = We don't have to update this every time we update the database version
2016-02-14 13:23:45 +00:00
cobbspur
8025325b15 Backup database before deletion
No issue

- a json object is now created when a user deletes content in labs
2016-02-14 09:04:53 +00:00
Sebastian Gierlinger
21c272b03f Merge pull request #6495 from ErisDS/db-config
Move db connection out of config
2016-02-13 13:25:35 +01:00
Hannah Wolfe
1c85650108 Move db connection out of config
refs #5047

- database connections are not configuration
2016-02-12 13:56:23 +00:00
Austin Burdine
970c3cfc7d add settings/labs acceptance test
refs #6039
2016-02-11 09:19:04 -06:00
Austin Burdine
330a74c8bd add settings/code-injection acceptance test
refs #6039
2016-02-11 09:05:48 -06:00
Hannah Wolfe
c3673be863 Don't include app fields
no issue

Including app fields along with tags & authors was a preoptimisation.
We don't use them yet, and having them results in database calls that are unnecessary.
2016-02-11 15:03:33 +00:00
Austin Burdine
c2a2af652c Add settings/general acceptance test
refs #6039
- adds acceptance tests for settings/general flows
- fixes up mirage settings fixtures
2016-02-11 06:06:38 -06:00
Hannah Wolfe
c9e0a70d16 Merge pull request #6481 from jaswilli/issue-5350
Refactor mail service
2016-02-11 08:58:08 +00:00
Jason Williams
c52fd1df9f Refactor mail service
Closes #5350
- No longer necessary to initialize via async init().
- Adds a startup-check for mail configuration.
- Creates a notification in the admin client if
  mail transport is "direct" and sending a message fails.
2016-02-10 16:31:42 -06:00
Sebastian Gierlinger
823894b141 Merge pull request #6467 from ErisDS/drop-column-migration
Adding drop-column migration handling
2016-02-10 21:41:11 +01:00
Kevin Ansfield
6656256d0b Merge pull request #6207 from acburdine/feature-service
Convert feature controller to service
2016-02-10 09:36:42 +00:00
Kevin Ansfield
c879105684 Replace jquery-ui.sortable with ember-sortable for nav items
refs #6458, closes #6457
- replaces jquery-ui.sortable with ember-sortable for drag-n-drop handling
- moves the "new/blank" nav item out of the nav items list
  - allows it to be excluded from the draggable list
  - cleans up handling of the `navigationItems` array as there's no longer a need to ignore/exclude this extra item
- clears validation errors when typing in the respective field
- adds acceptance test for adding/removing nav items
- improves acceptance test for saving nav items to cover more edge cases
2016-02-09 22:08:21 +00:00
Kevin Ansfield
0bec18ffd4 Merge pull request #6466 from ErisDS/count-service
Change URL for download count service
2016-02-09 21:58:19 +00:00
Austin Burdine
324a04487b cleanup feature service error handling 2016-02-09 13:39:15 -06:00
Matt Enlow
6ed69181ef Load more posts after post deletion
Closes #6390
- check if more posts should be loaded whenever one is deleted
- delete dead code from posts controller
- delete duplicate component gh-infinite-scroll-box
- simplify posts-list-item `posts.post` or `editor.edit` link logic by modifying `gh-content-view-container` to yield necessary vars directly and use inline ifs in template
- add `gh-tag` component for rendering tags and updating infinite scroll box on `settings/tags` page
2016-02-09 09:08:31 -07:00
Kevin Ansfield
3b565ed49f Continuation of #6207 (convert feature controller to service)
refs #6207, #6207
- updates tests for new async behaviour
- fixes tests failing on validation errors
- fixes `feature.labs` not updating after successful save
2016-02-09 08:37:44 -06:00
Austin Burdine
0ac222a439 convert feature controller to service
closes #6170
- add gh-feature-flag component to create a checkbox (reduce duplicate code)
2016-02-09 08:37:44 -06:00
Cameron Viner
faba83d5dc deps: should@8.2.1
closes #6448
-upgraded should.js to the latest version (8.2.1)
-Changed the tests so that they comply with the breaking changes introduced in the new version of should.js
-Installs the package should-http so should.be.json() can be used
-Installs the package should-sinon so that should.be.calledOnce() can be used
2016-02-09 13:39:10 +00:00
Hannah Wolfe
4ba0a745df Adding drop-column migration handling
refs #6301, #6165

- Adds detection and processing for column deletions
2016-02-09 12:11:49 +00:00
Hannah Wolfe
18dc0e3bc5 Change URL for download count service
no issue

- we're moving the internal endpoint for fetching counts to count.ghost.org
2016-02-09 10:20:24 +00:00
Kevin Ansfield
f716050fc2 deps: ember-sortable@1.7.0 2016-02-09 10:17:37 +00:00
Hannah Wolfe
7bb153a372 Merge pull request #6439 from kevinansfield/fix-nav-validation
Fix navigation item validation behaviour
2016-02-08 20:15:18 +00:00
Kevin Ansfield
a4f70b55fc Test client using real browsers on Travis
no issue
- drop phantomjs tests both locally and on Travis
- instruct Travis to install latest Chrome and Firefox
- start an X server when running the client tests on Travis
- update testem config to start Chrome and Firefox in both local and CI tests
- fix testing preview sizing in Firefox as it doesn't support `zoom: 50%` style
- improve infinite scroll testing to be more reliable
- fix post acceptance test to handle both mobile and desktop views
2016-02-08 16:10:40 +00:00
Kevin Ansfield
736111b58f validate nav items when clicking the + button, ignoring last item if blank 2016-02-08 14:20:57 +00:00
Sebastian Gierlinger
819116465e Merge pull request #6388 from ErisDS/schema-rejig
Reorganise & Rename server/data/ folder internals
2016-02-08 11:19:40 +01:00
Hannah Wolfe
a02376a98d Merge pull request #6445 from kevinansfield/fix-input-cursor
Return cursor pointer to text inputs
2016-02-08 10:07:29 +00:00
Hannah Wolfe
32fb88b418 Merge pull request #6456 from jaswilli/issue-6449
deps: supertest@1.1.0
2016-02-08 09:54:20 +00:00
Sebastian Gierlinger
6f18fcabfa Merge pull request #6444 from kevinansfield/fix-mixed-content-warnings
Fix mixed content security warnings due to gravatar images
2016-02-08 10:03:39 +01:00
Jason Williams
2528ce5304 deps: supertest@1.1.0
Closes #6449
- supertest now includes a `.then()` method and as a
  result, only one of either .then or .end may be called on
  a request object.
2016-02-07 13:10:27 -06:00
Hannah Wolfe
bda942e20a Merge pull request #6447 from kevinansfield/deps-ember-route-action
deps: ember-route-action-helper@0.3.0
2016-02-06 13:34:06 +00:00
Kevin Ansfield
be96259b65 deps: ember-route-action-helper@0.3.0
no issue
- cleans up passing route closure actions down through components and ensures callbacks are wrapped in the runloop - https://github.com/dockyard/ember-route-action-helper/pull/8
2016-02-06 13:09:47 +00:00
Kevin Ansfield
e399d33c47 Return cursor pointer to text inputs
refs #6412
- moves `cursor: pointer` style introduced in #6412 into more specific classes that only target select boxes rather than all inputs
2016-02-05 17:01:53 +00:00
Kevin Ansfield
cb7cafc0c9 Fix mixed content security warnings due to gravatar images
no issue
- switches gravatar URL generation to use protocol-relative URLs in `gh-profile-image` component
2016-02-05 16:48:15 +00:00
Hannah Wolfe
a435143ec5 Merge pull request #6442 from kevinansfield/ember-2-3-1
deps: ember@2.3.1
2016-02-05 15:45:43 +00:00
Austin Burdine
3b2a97179c fix 404 acceptance tests 2016-02-05 06:16:29 -06:00
Kevin Ansfield
b45c3e2f61 deps: ember@2.3.1
no issue

Bugfix release: https://github.com/emberjs/ember.js/releases/tag/v2.3.1
2016-02-05 11:16:49 +00:00
Hannah Wolfe
8b5ea4691a Merge pull request #6405 from jtwebman/ghost_head_refactor
Refactored ghost head helper
2016-02-05 11:12:26 +00:00
JT Turner
06d91ce046 Refactored ghost head helper
closes #6186
- Refactored ghost head helper to use the new metadata functions.
- Fix issue where tag should output description if missing meta description.
- Add test for tag description.
- Updated tests to look for author urls with a tailing backslash
- Fix author to output meta description first and then bio if missing.
2016-02-04 22:18:51 -08:00
Hannah Wolfe
df6f7c7b56 Merge pull request #6438 from kevinansfield/include-babel-polyfill
Include babel polyfill when compiling client
2016-02-04 20:44:02 +00:00
Hannah Wolfe
a9a5008aa2 Merge pull request #6436 from halfdan/6435-fix-settings-cache
Correctly clear settings cache after import
2016-02-04 20:43:51 +00:00
Hannah Wolfe
39d14e3a8d Merge pull request #6437 from kevinansfield/deps-client
Update client dependencies
2016-02-04 20:40:33 +00:00