Commit Graph

1328 Commits

Author SHA1 Message Date
Hannah Wolfe
b8415e8b90 Merge pull request #5349 from acburdine/onboarding-api
Add PUT route to authentication setup
2015-06-30 12:03:21 +01:00
Sebastian Gierlinger
a0d0045edb Merge pull request #5467 from ErisDS/api-pipeline
Refactor to using pipeline for the API
2015-06-30 10:28:44 +02:00
Austin Burdine
a2a0ba9023 adds put route to authentication setup
closes #5342
- adds put version of authentication/setup that allows for updating of owner/settings values
- doesn't send welcome email
- adds tests for new put route
2015-06-29 13:16:10 -04:00
Hannah Wolfe
8aaac1edd5 Improvements to the {{foreach}} helper
refs #4439

- Brings our custom foreach helper (which has extra features) back into line with Handlebar's own each helper
- Adds a new @number variable to foreach, so that building numbered lists is PEASY
- Improved the existing tests, and added a few more
2015-06-29 17:27:57 +01:00
Sebastian Gierlinger
64e20735a3 Merge pull request #5491 from ErisDS/issue-5490-no-post-url
Add event handling to pagination plugin
2015-06-29 11:44:22 +02:00
Hannah Wolfe
51ac3f6532 Refactor to using pipeline for the API
refs #2758

- Post, Tag & User API methods are refactored to use pipeline
- Each functional code block is a named task function
- Each function takes options, manipulates it, and returns options back
- Tasks like permissions can reject if they don't pass, causing the pipeline to fail
- Tasks like validating and converting options might be abstracted out into utils - the same for each endpoint
- Tasks like the data call can be extremely complex if needs be (like for some user endpoints)
- Option validation is mostly factored out to utils
- Option conversion is factored out to utils
- API utils have 100% test coverage
- Minor updates to inline docs, more to do here
2015-06-28 22:52:31 +01:00
Hannah Wolfe
4772e38521 Add event handling to pagination plugin
closes #5490

- use same event handling pattern as fetchAll
- add support for `fetching:collection` to post model
- add tests to check that url is fetched via findAll and findPage
2015-06-26 22:56:03 +01:00
Hannah Wolfe
f6322da4c9 Use extends correctly & consistently
- extends clobbers the first argument you pass to it, so that should not be a variable that is used elsewhere, if you're also assigning the value, as it will have unintended side effects.
2015-06-25 19:56:27 +01:00
Hannah Wolfe
b3f4beade8 Merge pull request #5471 from kowsheek/5370-settings-model-events
Add events to settings model
2015-06-25 11:08:51 +01:00
Jason Williams
aa333363fe Merge pull request #5479 from ErisDS/author-relation
Use 'author' for relation instead of 'author_id'
2015-06-24 09:01:20 -05:00
Hannah Wolfe
7705e30995 Use 'author' for relation instead of 'author_id'
- this clears a todo in the codebase & gets rid of a few lines of unnecessary code
2015-06-24 10:00:24 +01:00
cobbspur
8a8e90e9a2 Take Trashcan off of url screen for image uploader
closes #5433
- add gh-input class to inputs
- stop the incorrect addition of trash can on url page
- fix trigger of upload success to show loading in editor
- fix duplicate url field for images outside of editor when there is no file storage
2015-06-23 13:14:04 +01:00
Kowsheek Mahmood
68d1feb8c5 Add events to settings model
closes #5370
- Add settings key in the event emission
- Update settings spec to test for events emitted with settings key
2015-06-23 14:33:08 +06:00
Hannah Wolfe
7761873db7 Abstract findPage & add pagination Bookshelf plugin
closes #2896

- move default options / custom code into model functions
- move most of the filtering logic into base/utils.filtering (to be relocated)
- move the remainder of findPage back into base/index.js and remove from posts/users&tags
- move pagination-specific logic to a separate 'plugin' file
- pagination provides new fetchPage function, similar to fetchAll but handling pagination
- findPage model method uses fetchPage
- plugin is fully unit-tested and documented
2015-06-22 10:20:47 +01:00
Jason Williams
1cd703f775 Merge pull request #5451 from cobbspur/userRoutes
Move users routes out of settings & change to team
2015-06-18 14:20:06 -05:00
cobbspur
f67147a685 Move users routes out of settings & change to team
issue #5434

- move users routes/views/controllers out of settings
- rename users team
- update nav-menu.hbs
- remove legacy routes
- fix up tests
2015-06-18 19:46:46 +01:00
Hannah Wolfe
8fe8f8a07b Merge pull request #5447 from kevinansfield/signin-no-email-notification
Provide a more intuitive error message on sign-in for missing email
2015-06-18 17:24:33 +01:00
Jason Williams
c16db084a1 Ensure sqlite3 uses a single database connection
Closes #5411
- Using rewire on the config package circumvents the
  singleton nature of required packages, resulting in a
  second instance of knex and a second connection to the
  sqlite3 database.
2015-06-18 00:54:23 -05:00
Kevin Ansfield
db558e38ea Provide a more intuitive error message on sign-in for missing email
issue 4651#issuecomment-112141801
- display "Please enter an email" validation message rather than "Invalid Email" when no email is entered
2015-06-17 22:56:38 +01:00
Hannah Wolfe
3061247a7e Merge pull request #5431 from kowsheek/5370-settings-model-events
Add events to settings model
2015-06-16 20:46:15 +01:00
Kowsheek Mahmood
33e241ab4e Add events to settings model
issue #5370
- Add emit method to settings model
- Update settings spec to test for events emitted
- Fix formatting on tags spec
2015-06-16 23:57:52 +06:00
Augustus Yuan
05fe09293f Add support for GET /tags/slug/:slug with unit tests
closes #5371
- added new endpoint to the api routes
- created unit tests based on PostModel and PostAPI for testing slug links
2015-06-16 09:22:12 -07:00
Hannah Wolfe
16f98ee80b Move pagination formatting into a util
refs #2896

- moves repeated code out of models
- creates a new file for unit-testable code (this should be moved in future)
- adds a default for `page` as that seems sensible
- adds 100% test coverage for the new file
2015-06-15 16:46:42 +01:00
Jason Williams
b6cbd2d4bd Merge pull request #5427 from ErisDS/api-reshuffle
API mini-cleanup + 405 errors
2015-06-15 10:26:11 -05:00
Jason Williams
225dc84367 Merge pull request #5417 from ErisDS/rss-url
Use urlJoin in RSS + test coverage
2015-06-15 10:23:41 -05:00
Hannah Wolfe
254e0f0597 Improve API error handling
close #2757, refs #5286

- moves error formatting from api/index into errors lib
- moves error handling from api/index into its own middleware
- adds extra middleware for method not allowed which captures all unsupported routes
2015-06-15 10:08:30 +01:00
Fabian Becker
b15f1daf5a Throw 405 - Method not allowed for api routes
closes #2757
- New error MethodNotAllowed
- Throw 405 if valid path but invalid method is used is apiRouter
- Adds api base tests
2015-06-15 09:43:39 +01:00
Matt Enlow
df1c04b8d8 Remove legacy mobile view logic
No issue
- Move editor-base-view mixin into editor/edit view
- Also deletes mobile views and modifies files that were using it
- Helps pave the way for Ember 2.0, where views do not exist
2015-06-14 14:42:21 -07:00
Alex Kleissner
05e49d9a96 Move uncapitalize into its own file.
refs #5286
- Moved the logic into its own file
- Added unit tests
2015-06-10 12:21:15 -07:00
Hannah Wolfe
c1e3bd0786 Merge pull request #5415 from hex337/move-decide-is-admin
Moves the decideIsAdmin into its own file.
2015-06-10 09:51:48 +01:00
Hannah Wolfe
34b22eefa2 Use urlJoin in RSS + test coverage
refs #1833

- move RSS tests to be in rss_spec.js
- improve RSS test coverage
- fix a bug with RSS title generation for tag RSS feeds
- replace custom code in processUrls with urlJoin
2015-06-10 09:18:52 +01:00
Jason Williams
6c9682cdd9 Make sure done() is called from before hooks 2015-06-09 22:46:26 -05:00
Alex Kleissner
511684c436 Moves the decideIsAdmin into its own file.
refs #5286
- Moved the function into its own file
- Added unit tests for the function
2015-06-09 14:02:22 -07:00
Joe Wegner
75faf0109d invite users after signing up during setup
closes #5338
- moves skip link to below the submit button
- makes the submit button better represent form status
- posts notifications based on success/failure of notifications
- goes to the invite page after user creation
- actually sends invites!

functional tests passing for onboarding invitations

cleanup for linitng

remove unreachable return

access the notifications service better

use link-to instead of an anchor with an action

failed user creations get caught, and bubble as errors

a slew of other cleanup stuff via jason
2015-06-09 11:50:24 -07:00
Hannah Wolfe
541de8bc68 Merge pull request #5384 from JohnONolan/zelditor
Content management & editor refactor
2015-06-08 16:22:29 +01:00
Hannah Wolfe
d023333d31 Merge pull request #5404 from JohnONolan/zerrors
Fixup broken error page styles
2015-06-08 14:57:56 +01:00
cobbspur
3f5ac66e47 Fix up tests post-changes to content and editor screen
No Issue

- some tests removed
- other tests commented out pending tags adding to psm
2015-06-08 14:53:53 +01:00
John O'Nolan
93b0505d68 Fixup broken error page styles 2015-06-08 12:14:58 +01:00
Jason Williams
8196133bc7 Merge pull request #5377 from ErisDS/url-refactor
Refactor URL usage
2015-06-06 09:50:20 -05:00
Hannah Wolfe
5e0cc1ae10 Merge pull request #4783 from claydiffrient/master
Makes most special characters be replaced with a dash
2015-06-04 11:54:23 +01:00
Jason Williams
60e160d169 Merge pull request #5361 from ErisDS/fix-contexts
Fix context setup (remove dep on req.route.path)
2015-06-03 16:28:16 -05:00
Jason Williams
f16f72ad7a Merge pull request #5389 from ErisDS/test-imprv
Ensure importer tests don't clash
2015-06-03 16:18:12 -05:00
Hannah Wolfe
8ec8eff6c0 Ensure importer tests don't clash
no issue

- I've noticed the importer tests going wrong on SQLite a couple of times recently.
- I think it's because the teardowns were clashing, hopefully this will help
2015-06-03 18:46:45 +01:00
Hannah Wolfe
2d5a731022 Improvements for debugging transient test failures
refs #4483

- update PSM test to see if it works better this way
- ensure every assertion has a message, so that it's clearer what is failing
2015-06-03 18:12:20 +01:00
Hannah Wolfe
2700bfa4cc Refactor URL builder
refs #1833

- Refactor url generation to use a base urlJoin method
- urlJoin handles slash de-duping and subdir de-duping
- fixes sitemap xml option
2015-06-02 21:50:17 +01:00
Hannah Wolfe
9d01016025 Merge pull request #5353 from morficus/issue-5286
splitting client authentication-related middleware in to its own file
2015-06-02 11:10:43 +01:00
John O'Nolan
9c7a1e2e50 Merge pull request #5318 from acburdine/private-form
Rewrite default private.hbs for new zelda styles
2015-06-02 10:54:59 +01:00
Hannah Wolfe
eb9d924e1b Merge pull request #5306 from acburdine/remove-email
Removes "email" from settings
2015-06-02 09:44:21 +01:00
Maurice Williams
b3cbb20be1 splitting client authentication-related middleware in to its own file
* refs #5286
* includes test cases for `addClientSecret`
* no tests first `generateAccessToken` and `authenticateClient` because there isn't anything to test in them
2015-05-31 12:35:03 -04:00
Alex Kleissner
766bf99de9 Move the spam prevention into its own file.
issue #5286
- Moved the spam prevention functions into their own file
- Added unit tests for the functions
2015-05-29 08:59:29 -07:00
Austin Burdine
bf0e40eda1 rewrites default private.hbs for new zelda styles
closes #5073
- changes format to match new zelda layout
- modifies the input_password helper to allow customization of class & placeholder
2015-05-29 06:25:32 -06:00
Hannah Wolfe
cc00c6c64a Fix context setup (remove dep on req.route.path)
refs #5344

- As a result of #5344, context are pretty broken.
- This PR removes all dependence on req.route.path, and uses res.locals.relativeUrl
- res.locals.relativeUrl is used for many things and is dependable
2015-05-29 09:16:04 +01:00
Jason Williams
1f8abc3869 Merge pull request #5344 from ErisDS/frontend-route-refactor
Frontend route refactor / cleanup
2015-05-27 23:15:38 -05:00
Sebastian Gierlinger
a7555d7497 Merge pull request #5316 from ErisDS/onboarding-zelda
First pass at user onboarding screens
2015-05-27 17:23:40 +02:00
Hannah Wolfe
f6aa46e446 Frontend route refactor / cleanup
refs #5091

- This is step one of several steps towards ending up with dynamic routes for channels
- Refactoring this way makes the similarities between all the routes clearer to see
2015-05-27 11:17:15 +01:00
Jason Williams
5018f2fb9e Clean up Ember router map
No Issue
- Switch resources to routes.
- No longer nest "settings" routes so the router reflects
  the way the templates are rendered.
- Remove renderTemplate override from settings routes.
- Remove unneeded routes, controllers, and views.
- Adjust users page so that infinite scroll loading of users works
  and markup remains the same for Zelda styling.
2015-05-26 16:12:12 -05:00
Hannah Wolfe
4456f17c65 Merge pull request #5332 from cobbspur/route
Fix route for About page
2015-05-25 18:37:45 +01:00
Hannah Wolfe
1883bdb496 Merge pull request #5297 from acburdine/frontend-single
Refactor permalink verification in single post controller
2015-05-25 17:56:02 +01:00
Hannah Wolfe
064a22e7d2 First pass at user onboarding screens
refs #5315

- split setup into 3 screens
- add gravatar fetching
- add download counter
- add button handling for invite users
2015-05-25 17:43:12 +01:00
cobbspur
c3bb7cb396 Fix route for About page
No Issue

- Routes,  views and controllers updated for about page
- fix up tests and add redirect check
2015-05-25 17:06:17 +01:00
Austin Burdine
e69c8c89ac remove settings email
closes #5299
- removes settings/general email field from both client and server side
- fixes tests to reflect removal of email
2015-05-22 15:23:31 -06:00
cobbspur
2e5caeb9c1 Fix-up remaining functional tests
No Issue

- signup, signin and setup tests
- fixup other files for code styles
2015-05-22 20:13:54 +01:00
cobbspur
dd20790bd9 Fix image uploader and update tests
No Issue

- fixes removal of url link on image uploader
- fixes functional tests for editor and content
2015-05-22 19:05:17 +01:00
cobbspur
2c2f9693d2 Add UI link classes
No Issue

- Adds contextual classnames to Nav Bar links
- Various test updates

TODO
- Increase test coverage for new admin UI
- Fix up Caspertests for new Admin UI
2015-05-22 19:05:15 +01:00
John O'Nolan
3bf189ec67 First pass - strip mixins 2015-05-22 19:02:09 +01:00
Hannah Wolfe
da8752cc88 Merge pull request #5290 from josephwegner/chalk-colors-swap
replace colors with chalk everywhere
2015-05-21 16:28:41 +01:00
Hannah Wolfe
3ccf549ea7 Merge pull request #5260 from cobbspur/owner
Prevent multiple owner creation via importer
2015-05-21 16:03:31 +01:00
Jason Williams
8ecc48d0c9 Merge pull request #5302 from ErisDS/private-blog-cache-control
Cache control for private blogs
2015-05-20 17:03:28 -05:00
Jason Williams
7e89413037 Merge pull request #5301 from ErisDS/issue-5288
Use absolute frontend URL in admin
2015-05-20 16:27:31 -05:00
Hannah Wolfe
e088859a38 Use absolute frontend URL in admin
closes #5288

- use the config.blogURL as the frontend URL from the admin
- we know this is given to us without a trailing slash, so it's 100% safe to hard code this
- TODO: make all of the url generation a lot nicer i.e. #1833
2015-05-20 21:45:19 +01:00
Hannah Wolfe
f3174de9e2 Cache control for private blogs
no issue

- private blogs need to not be cached, so that the cookie is always checked
2015-05-20 21:44:42 +01:00
Austin Burdine
75745c2b3b refactor permalink verification in single post controller
closes #4322
- removes verifying "sections" of permalinks in favor of checking the url returned with the post
- fixes unit tests to define post.url in mock post requests
2015-05-20 07:00:13 -06:00
Sebastian Gierlinger
c6176e4d38 Merge pull request #5292 from ErisDS/preview-cache-invalidate
Cache invalidate for previews
2015-05-20 09:31:28 +02:00
Hannah Wolfe
e5cc169bf7 Removing really old admin comments
refs #1773
2015-05-19 19:03:41 +01:00
Hannah Wolfe
023755c566 Cache invalidate for previews
no issue

- draft updates now need to affect the preview route
2015-05-19 18:32:00 +01:00
Joe Wegner
f26179ae6a replace colors with chalk everywhere
issue #5259
- removes the colors dependency
- adds in chalk dependency, and migrates everything to use that
- reduces some specs now that the log calls are cleaner
2015-05-19 11:07:40 -05:00
Hannah Wolfe
050b03d2bd Cache control middleware refactor
refs #5286

- split cache control middleware into its own file
- split out cache control tests
- add new mochacli command for running just middleware tests
2015-05-18 22:20:26 +01:00
cobbspur
261a862da1 Prevent multiple owner creation via importer
closes #4778

 - If import contains an owner that does not match original owner they are downgraded to admin
 - Change error message for locked users to more generic message to account for imported users
 - Adds duplicated user test
 - Process Roles and maps import roles to db roles
 - reduces export files in test fixtures

temp commit
2015-05-15 10:12:30 +01:00
Clay Diffrient
673293575a Makes most special characters be replaced with a dash
closes #4782
- Still achieves the same goal of stripping out reserved characters
- Changes from removal to replacement
- This helps word separators from being removed
- Apostrophes (') are unaffected
2015-05-14 13:00:43 -06:00
Matt Enlow
b0b56e7a8e Merge pull request #5270 from ErisDS/helper-updates
Misc helper updates & fixes
2015-05-14 16:00:22 +02:00
Hannah Wolfe
03e5fcac66 Merge pull request #5223 from edsadr/api-featured-posts
API: Adding `featured` filter option to posts.browse
2015-05-14 11:57:44 +01:00
Hannah Wolfe
d11a91e75c Misc helper updates & fixes
refs #5205

- Ensure that pages are treated the same as posts in meta_title, add test
- Added a private-template body class for the private context, add test
- Added a missing test to is_spec.js
2015-05-14 11:42:29 +01:00
Adrian Estrada
107c9602c1 API: Adding featured filter option to posts.browse
Closes #5152
- Adds `featured` filter option to posts.browse method modifying the model to take it too
2015-05-13 16:18:50 -05:00
Hannah Wolfe
c3dda5e5c4 Theming updates for password protection
refs #4993, #5073

- Removed nonexistent helpers siteDescription and bodyClass from admin templates
- Changed password.hbs to private.hbs to match the route name
- added a new input_password helper for rendering the password input with the correct properties
- removed the forward input as this can be handled via urls only
- moved 'private' to routeKeywords
- added 'private' context
- minor update to text next to the password in settings
2015-05-13 19:48:24 +01:00
Jason Williams
1e5440664e Change payload storage in session cookie 2015-05-07 13:58:09 +00:00
Austin Burdine
8ac168794e refactors the frontend controller
closes #5192
- combines homepage, author, tag routes into one function (with different hash params)
- provides some abstraction for channels
2015-05-05 07:35:08 -05:00
Austin Burdine
2865662ee5 added password protection
closes #4993
- brings password protection to the frontend of blogs
- adds testing for password protection
- upgrades bcrypt-js to 2.1.0
2015-04-30 23:44:43 -05:00
Jason Williams
dae66d00be Upgrade grunt-jscs to fix whitespace linting.
No issue.
- grunt-jscs@1.8.0
- Fix formatting
2015-04-30 16:14:19 -05:00
Matt Enlow
433956c102 Add post preview via uuid (/p/:uuid)
Refs #5097

- All drafts will show a preview link (this needs real css)
- Published posts will redirect
- prev/next post helpers only activate on published posts
- Powered by ~10 pints between the two of us (@ErisDS, @novaugust)
2015-04-30 11:57:37 +01:00
Sebastian Gierlinger
fdcb67d3cc Rename error.type to error.errorType
closes #5178
- renamed error.type to error.errorType
2015-04-22 22:29:45 +02:00
Matt Enlow
fc142b3dff Merge pull request #5161 from ErisDS/test-coverage
Switch test coverage to use Istanbul
2015-04-21 19:14:35 +02:00
Hannah Wolfe
6d04ead9f2 Switch test coverage to use Istanbul
closes #4644

- Switch from using blanket to istanbul
- Rename some test files for consistency (and so that they will run)
2015-04-19 15:54:05 +01:00
Hannah Wolfe
e26e83d40a Refactor to remove author.email from API
refs #2330

- Pass through `options` to all toJSON calls on posts, tags, and users
- Use options.context.user to determine whether it's OK to return user.email
- Remove author.email handling code from frontend.js
2015-04-17 22:27:04 +01:00
Hannah Wolfe
ede50f38a3 Merge pull request #5149 from cobbspur/headfix
Fix ghost_head helper on error pages
2015-04-16 20:22:50 +01:00
cobbspur
a48458b73d Fix ghost_head helper on error pages
closes #5146

 - Checks for context key before assigning it to variable
2015-04-16 18:40:17 +01:00
Sebastian Gierlinger
a11822c80d Merge pull request #5144 from ErisDS/cache-update
Cache invalidation can no longer be so clever
2015-04-16 17:38:29 +02:00
Paul Adam Davis
9ea2f5535e Show correct type in publish button
Closes #5138

Shows the correct type (post or page)  in the publish button
2015-04-15 11:13:38 +01:00
Hannah Wolfe
1b585f213c Cache invalidation can no longer be so clever
no issue

With the introduction of the prev/next helpers (and soon, get helper) we can no longer make any assumptions
about exactly which pages need to be cleared from the cache when a post is published/unpublished.
2015-04-14 16:34:34 +01:00
Hannah Wolfe
8d1e729f30 RSS Refactor with cache
refs #5091, refs #2263

- Move rss handling out of the frontend controller and into its own module
- Separate the code into logical blocks
- Wrap the generation code in a in-memory cache to prevent it being regenerated on every request
2015-04-10 21:32:14 +01:00
Sebastian Gierlinger
8f5960e1c5 Merge pull request #5108 from ErisDS/rss-2
Add media:content support to RSS
2015-04-10 12:49:51 -05:00
Hannah Wolfe
4839b58ff0 Merge pull request #4891 from cobbspur/structured2
Adds structured data to first index/tag/author page
2015-04-07 21:24:19 +01:00
cobbspur
3229508c54 Adds structured data to first index/tag/author page
Closes #4677

- Tests if page is first page or paginated
- Adds relevant structured data to index/tag/author page
- Does not add structured data on paginated pages
- For author structured data, cover image overrides image
- blog cover image is made absolute by image helper
- Tests updated to use regular expressions and new tests
2015-04-07 20:36:53 +01:00
Hannah Wolfe
14134fb4b0 Add media:content support to RSS
refs #2263, #4888

- Adds media:content element to Ghost Rt pSS feeds containing the post cover image if one is available
- Removes the prepending of the image to the `<description>` field
- Keeps the prepending of the image in `<content:encoded>`
2015-04-06 18:47:10 +01:00
Hannah Wolfe
196bbfce18 Refactor sitemaps to use centralised events
fixes #5104, refs #4348, #2263

- Create a centralised event module
- Hook it up for posts, pages, tags and users
- Use it in sitemaps instead of direct method calls
- Use it for xmlrpc calls
- Check events are fired in model tests
- Update sitemap tests to work with new code
- Fix a bug where invited users were appearing in sitemaps
- Move sitemaps and xmlrpc into a directory together
2015-04-05 19:32:18 +01:00
Matt Enlow
242388f743 Merge pull request #5065 from ErisDS/rss-2263
Improve RSS feed
2015-04-04 07:55:33 -06:00
Jason Williams
bf3693a7fa Merge pull request #5085 from ErisDS/improved-forgotten
Improve the forgotten password flow
2015-04-03 13:40:16 -05:00
Hannah Wolfe
79d213436e Improve RSS feed
refs #2263

- Switch content type back to text/xml
- Use content:encode for full content
- Use meta description or first 50 words of content for description
2015-04-03 19:00:00 +01:00
Hannah Wolfe
68f32772d2 Improve the forgotten password flow
- if the user has filled out their email already when they hit 'forgotten password' then automatically  fill out and submit the form
- this will look better when we have spinners on the buttons
2015-04-03 17:32:18 +01:00
Hannah Wolfe
cb2f0c5dee Merge pull request #5056 from ianlopshire/master
url helper breaks subdomains
2015-04-02 22:08:23 +01:00
Hannah Wolfe
6163862b18 Merge pull request #5068 from msiemens/meta_description_v2
Rewrite meta_description and meta_title to depend upon the current context
2015-03-29 20:28:13 +03:00
Hannah Wolfe
501595127f Fix @blog globals in special templates
fixes #5024

- pass options through to the template for both navigation and pagination
- add a test for each
2015-03-28 23:21:10 +02:00
cobbspur
4044dedeb2 Adds {{prev_post}} and {{next_post}} block helpers
closes #4799

- Adds a prev_next helper method called by {{prev_post}} and {{next_post}}
- Shows correct template for if and else blocks
- Adds unit tests
2015-03-25 17:21:27 +00:00
Markus Siemens
c5fe9aa99f Rewrite meta_description and meta_title to depend upon the current context
closes #4850

- fixed `meta_description` and `meta_title` when used within a `{{#foreach}}`
- `meta_description` and `meta_title` now depend upon the current context
  to get the right string (author bio, tag description, ...).
  Note: `ghost_head.js` and `ghost_head_spec.js` have been touched to add
  the required context information when calling the helpers.
2015-03-24 22:42:45 +01:00
Matt Enlow
5015180474 Merge pull request #5054 from ErisDS/express-hbs-update
Update express-hbs & registerAsyncHelper function
2015-03-24 11:33:46 -06:00
Katie Fenn
980b0a8610 Refactoring hard-coded frontend route keywords
closes #4519

- Added configurable route keywords
- Replaced instances of hard-coded keywords with config
- Added keywords to frontend tests stub config
2015-03-23 15:00:02 +00:00
Ian Lopshire
e74a329b8a Navigation menu support for subdomains of blog url
Closes #5033
- Added unit tests for the nav context of urlFor
- Fixed issue in the nav context of urlFor where subdomains of blog url were truncated
- Fixed issue in the nav context of urlFor where there was sometimes an extra preceding /
2015-03-22 00:40:55 -05:00
Hannah Wolfe
6cd696b332 Merge pull request #4820 from phated/file-storage
File storage
2015-03-20 08:55:19 +00:00
Blaine Bublitz
5c640e95f5 Initial implementation for custom storage engines
closes #4600
- implemented as suggested in #4600
- loads a custom storage defined in config from the /content/storage directory
2015-03-19 22:34:01 -07:00
Matt Enlow
61b86bf821 Merge pull request #5027 from felixrieseberg/iss4847
Replace fs.exists (deprecated) with fs.stat
2015-03-19 10:47:01 -06:00
Hannah Wolfe
1db59e12ee Move showdown extensions to ghost-showdown
no issue

- We already maintain our own fork of showdown, this moves our custom extensions to our fork
- Code duplication is removed
- Tests are also moved to the other repo
2015-03-17 20:18:08 +00:00
Felix Rieseberg
0484eee6a5 Replace fs.exists (deprecated) with fs.stat
Closes #4847

- Replaces the deprecated fs.exists() with fs.stat(), in accordance with iojs & node.
2015-03-17 11:49:43 -07:00
Hannah Wolfe
5db6fc4f18 No more CodeMirror
closes #4368, fixes #1240 (spellcheck), fixes #4974 & fixes #4983 (caret positioning bugs)

- Drop CodeMirror in favour of a plain text area
- Use rangyinputs to handle selections cross-browser
- Create an API for interacting with the textarea
- Replace marker manager with a much simpler image manager
- Reimplement shortcuts, including some bug fixes
2015-03-17 14:32:55 +00:00
Matt Enlow
58635b3e0a Serve files to core/built/assets/
- see core/client/lib/assets-delivery/index.js for how this is done
- Turn off ember-cli fingerprinting
- ember-cli 0.2.0; Update .npmignore
- Fallback to old version of ember-cli-sass due to lib-sass errors
- Keep ember-data at beta-14.1 until we find the dep that's breaking on snapshot.attr
- Fix release task to ignore blank lines in .npmignore
2015-03-12 15:59:02 -06:00
Jason Williams
5b72a0eb18 fix routes test. ember-mocha@0.4.2 2015-03-11 12:37:42 -06:00
Jason Williams
2edc3d6a6b Remove core/test/client/ 2015-03-11 12:37:42 -06:00
Jason Williams
0b96765321 Set up tests for ember-cli 2015-03-11 12:37:41 -06:00
Matt Enlow
388a8dd3f0 Build assets with ember, and serve with ghost 2015-03-11 12:37:41 -06:00
Hannah Wolfe
4b05585631 Update express-hbs to 0.8.4
fixes #4364, refs #4439, refs #4799

- Update express-hbs to 0.8.5
- Use preventIndent option onCompile
- Update registerAsyncHelper to support passing through options when needed
2015-03-10 15:52:00 +00:00
Fabian Becker
47e16df196 Node v0.12 & io.js support.
fixes #4811, refs #4240
- Add v0.12 to the build
- Fix express tests to work with iojs/0.12
- Add iojs-v1.2.0 to the build matrix
2015-03-09 20:27:14 +01:00
John O'Nolan
461834f96d Introduce new help menu 2015-03-09 11:53:40 +02:00
Hannah Wolfe
cde1842750 Check ids match on edit
no issue

- It should not be possible to provide a different ID in the object being edited to that provided in the URL
- We now send the id to check object to ensure there is a match

Credits: Matteo Beccaro
2015-02-28 16:25:37 +00:00
Hannah Wolfe
2450f18170 Make the {{navigation}} helper global
refs #4535

- Rather than storing navigation data as a top level key, store it as @blog.navigation
- Reference the global data from the helper
2015-02-28 12:53:00 +00:00
Sebastian Gierlinger
ab2c57efe9 Merge pull request #4821 from markstos/https-subdirectory
Fixes #4435, also refactors checkSSL to be unit-tested.
2015-02-27 15:24:31 +01:00
Sebastian Gierlinger
8b4979c7d1 Merge pull request #4919 from ErisDS/pr/4852
Update to PR 4852 ({{navigation}} helper)
2015-02-18 20:00:34 +01:00
Hannah Wolfe
9668ed71ca Merge pull request #4848 from chilts/i4792-assign-higher-priority-in-sitemaps-to-featured-posts
Assign a higher priority to featured posts in the sitemap
2015-02-17 21:05:51 +00:00
Hannah Wolfe
6c701ff7f1 Merge pull request #4925 from dbalders/Script_AutoLink
Added <script> to Not Auto Link and Added Test
2015-02-17 20:01:14 +00:00
David Balderston
6648a17ae2 Added Script to Not Auto Link and Added Test
Closes #4922

* Added script to not be parsed to auto linking
* Added test to make sure urls inside
2015-02-17 11:20:51 -08:00
Hannah Wolfe
2086c8d452 Merge pull request #4915 from dbalders/footnote_bug
Fixed Bug Showing Full HTML Inside Code Block
2015-02-17 19:14:07 +00:00
David Balderston
2b1bf96130 Fixed Bug Showing Full HTML Inside Code Block 2015-02-17 09:37:15 -08:00
Hannah Wolfe
6d42df029a Navigation helper amends
closes #4541

- Add role="presentation" to <li>
- Clean up space if nav-current isn't present
- Changed all internal references from nav to navigation for consistency
- Deleted old nav.hbs
- Updated tests
2015-02-15 21:44:10 +00:00
Marcos Ojeda
d28ffef3e9 Add {{navigation}} helper
closes #4541
creates a handlebars helper with behavior matching the spec in #4541 and
updates `frontend.js` to include the navigation data in the rendered page
context.
- checks for {{current}} against `relativeUrl`
- adds helper `getSiteNavigation()` which returns contents of
  `api.settings.read('navigation')`, or an empty list
- navigation helper is responsible for filtering and consistently formatting
  navigation data from settings.
- changes `frontend.js`'s `formatResponse` & `formatPageResponse` to return
  a promise with page data and updates frontend controllers to use it.
- `formatPageResponse` now includes a third parameter to allow values to be
  merged into the page response (rather than using `_.extend` in the
  render methods directly.
- {{navigation}} will render an empty `ul` if no navigation items exist
- incorporates {{url}}/urlFor behavior for nav contexts. (see #4862)
- uses {{url absolute="true"}} in default nav template
2015-02-13 08:38:18 -08:00
Hannah Wolfe
eaee9369e8 Don't pass external urls through createUrl
refs #4852, refs #4862, refs #4541

- fixes urlFor for the combination of an external url and a blog using a subdirectory
2015-02-12 23:09:12 +00:00
Hannah Wolfe
a110b3741f Merge pull request #4862 from nsfmc/urlmod
Update `urlFor` to handle 'nav' contexts
2015-02-07 21:15:48 +00:00
Jason Williams
8d7b0034bb Add tests for client controllers
No Issue.
- Add tests for SettingsGeneral controller.
- Add tests for PostSettingsMenu controller.
2015-02-02 22:22:03 +00:00
Jason Williams
d60fff9519 Add tests for admin client models 2015-02-01 21:41:55 +00:00
Marcos Ojeda
6f457768a2 Update urlFor to handle 'nav' contexts
needed for #4852
Before this, calling `{{url}}` with a nav context from #4541 would
output `/`. This adds a check in `urlFor` that looks for keys in a
nav context object, namely `slug`, `current`, `label`, & `url`.

This change allows for a url to pass through if used in a nav context.

* adds `schema.isNav()`
* adds tests to `url_spec.js`
* handles absolute urls correctly even if `absolute=true`
2015-01-31 09:29:53 -08:00
Jason Williams
db693b50cb Do not add autofocus attribute unless set to focus
No Issue
- Don't add the "autofocus" attribute to the input element unless
  the "focus" property is set to true.
2015-01-30 22:29:34 +00:00
Jason Williams
571c9b61c3 Simplify url preview component, add test
No Issue
- Rework the preview URL component so its implementation is
  simpler.
- Add test for gh-url-preview component.
- ember-mocha@0.3.0.
- Remove unused jshint options.
2015-01-29 17:13:02 +00:00
Hannah Wolfe
cea358bff0 Merge pull request #4845 from jaswilli/jshint
Remove jshint rules that are no longer supported
2015-01-24 18:23:55 +01:00
Andrew Chilton
7f9d10a62d Assign a higher priority to featured posts in the sitemap
Closes #4792
- Made priority be 0.8 (as it currently is) for standard posts
- Made featured posts have a priority of 0.9
- Split the current test into two to check both above scenarios
2015-01-24 21:19:14 +13:00
Hannah Wolfe
3c86f67fca Merge pull request #4831 from jaswilli/edit-user
Fix up users API so admin role can edit owner
2015-01-23 22:55:08 +01:00
Jason Williams
d633ffc766 Remove jshint rules that are no longer supported
No Issue
- grunt-contrib-jshint@0.11.0.
- remove error about browser global Notification being redefined.
2015-01-23 21:00:37 +00:00
Jason Williams
0fc152b2ad Fix up users API so admin role can edit owner
No Issue.
- Make sure that a user with the Admin role can edit the Owner.
- Add test for behavior.
2015-01-20 21:34:24 +00:00
Jason Williams
7578d674ae Fixup finding user by role name
No Issue.
- Build up query object to lookup a user by the name of a role.  Return
  user with "roles" objects included.
- Add test for findOne by role.
2015-01-20 18:31:17 +00:00
Hannah Wolfe
c946230171 Merge pull request #4823 from jaswilli/fixup-test
Assume datetime in import filename is UTC
2015-01-19 18:49:08 +00:00
Jason Williams
d5d7919d26 Assume datetime in import filename is UTC
No issue.
- Add missing catch handlers to async tests.
2015-01-18 21:20:51 +00:00
Mark Stosberg
770317b834 Refactor: Make checkSSL unit-testable and add unit tests for it.
- Code was moved to core/server/middleware/middleware.js, which is the
  home for unit-testable middleware.

- Functional code coverage for this code also exists at:
  test/functional/routes/admin_test.js
2015-01-18 13:44:50 -05:00
Fabian Becker
90ac1fdd16 Fix footnote handling for n-digit numbers
fixes #4815
- Fix regex
- Add new test
2015-01-17 14:56:13 +00:00
Jason Williams
1c07273f5a Update grunt-jscs dependency
No Issue
- grunt-jscs@1.2.0
- Clean up some instances of multiple spaces.
- Remove jscs:disable for regexes now that jscs better supports them.
2015-01-16 18:06:20 +00:00
Jason Williams
aee472eb65 Check all users when generating slug
No Issue
- Set 'status: all` when calling generateSlug from the user model
  so that all user slugs are checked for duplicates instead of
  only active users.
2015-01-16 06:56:53 +00:00
Sebastian Gierlinger
023a37b074 Merge pull request #4772 from ekulabuhov/4262_NextPrevPostWIP
[API] Retrieve next and previous post
2015-01-14 10:32:07 +01:00
Jason Williams
9151f53323 Don't assume order of results in import test
No Issue
- Fixes intermittent test failure when order of results
  returned by loadFile() changes.
2015-01-13 16:40:46 +00:00
Ivan Votti
a63d3ec350 Fix typo in disallow-object-controller 2015-01-13 22:13:26 +07:00
Eugene Kulabuhov
0e2709c42f [API] Retrieve next and previous post
closes #4262
- implementation based on #1545
- added integration test. Modified mocked posts because code requires published_at timestamps to be different.
- fixed 2 broken tests that depended on mocked posts to have "new Date()" as their timestamps
- added checks to only query db if next/previous post requested
2015-01-13 12:49:16 +00:00
Jason Williams
be462d8d94 Merge pull request #4781 from ErisDS/has-tag-fix
Fix has helper tag matching
2015-01-11 13:01:55 -06:00
Jason Williams
1afd6091a9 Merge pull request #4784 from ErisDS/test-cleanup
Misc test cleanup
2015-01-10 10:33:49 -06:00
Hannah Wolfe
fb46b7d356 Misc test cleanup
refs #4644

- Changes tests using assert style to use should style for consistency
- Updates moment().subtract() to remove deprecation warning
- Changes test and test-coverage grunt commands to run in a way which is
  compatible with both *nix and win envs
- refs #4644 as this is a step towards getting coverage working properly
  again
2015-01-10 11:39:18 +00:00
Hannah Wolfe
3f34162fd9 Fix has helper tag matching
fixes #4780
2015-01-09 21:52:23 +00:00
Hannah Wolfe
283deb2461 Fix email sending fail when blog title has a comma
no issue

- We send emails from Blog Title <ghost@blog-url.com>, but it should be from "Blog Title" <ghost@blog-url.com>
- It worked fine without quotes unless you have a comma in your Blog Title in which case different mail systems get confused in different ways
2015-01-09 21:34:24 +00:00
Hannah Wolfe
fbdabce086 Add markdown file handler to importer
closes #4691

- adds a file handler for markdown file (.md and .markdown)
- handles titles and featured images
- gets status, date, and slug from the filename
- has a test suite
2015-01-09 20:04:56 +00:00
Jason Williams
a7b405924a Merge pull request #4759 from ErisDS/importer-test-fix
Fix importer tests on windows
2015-01-05 16:25:35 -06:00
Hannah Wolfe
02d091bbbc Fix importer tests on windows 2015-01-05 21:59:43 +00:00
Jason Williams
7f753acff1 Merge pull request #4752 from ErisDS/importer-updates
Image Importer Improvements
2015-01-05 10:39:35 -06:00
Jason Williams
05877124ae Remove unneeded promises and fix tests 2015-01-04 21:05:31 +00:00
Hannah Wolfe
3310dba9ea Merge pull request #4738 from jaswilli/socket-perms
Allow socket permissions to be set from config
2015-01-03 19:41:27 +00:00
Hannah Wolfe
add4c6b078 Image Importer Improvements
ref #4608, #4609, #4690

- fix errors with cleaning up files
- improve handling of base directories, and introduce a simple valid format for zips (must contain importable files or folders, and may contain up to one base directory)
- vastly improve test coverage
2015-01-02 22:54:40 +00:00
Jason Williams
ac5d98e656 Merge pull request #4748 from rwjblue/remove-proxying
Remove ObjectController proxying behavior.
2015-01-02 15:18:15 -06:00
Jason Williams
9d82c2e360 Update test-related dependencies
No Issue
- nock@0.52.4
- should@4.4.2
    .eql no longer does type coercion.
- sinon@1.12.2
- supertest@0.15.0
2015-01-02 15:49:58 +00:00
Robert Jackson
a1ed9adf92
Remove ObjectController proxying behavior.
Ember.ObjectController (and Ember.ArrayController) will be deprecated in
Ember 1.11 (and removed from core in Ember 2.0). The reasoning is
detailed in the Ember 2.0 RFC.

This PR does the following:

* Updates templates/controllers/views to explicitly reference model
  properties (instead of relying on proxying behavior).
* Clearly delineate where certain properties are being set or retrieved
  from (for example it was not clear exactly where `scratch` and
  `titleScratch` were stored).
* Remove usage of `Ember.ObjectController`.
* Add JSCS rule to prevent future PR's from adding regressions.
2015-01-01 21:51:20 -05:00
Jason Williams
6c1287c3a2 Allow socket permissions to be set from config
Closes #4478
2014-12-31 15:28:04 +00:00
Hannah Wolfe
4f278e3cf7 Merge pull request #4726 from jaswilli/issue-3961
Change {{url}} and {{image}} into synchronous helpers
2014-12-30 19:20:51 +00:00
Mikael Brockman
c9069cc234 Add reentrant conversion to Showdown footnotes.
closes #4668

- inline markup in footnotes now works properly
- note that multi-paragraph footnotes are still broken
2014-12-30 05:32:03 -05:00
Jason Williams
0dc0d37888 Change url and image into synchronous helpers
Closes #3961
2014-12-29 18:44:15 +00:00
Jason Williams
730e7ebcfa Adjust about page tests
No Issue
- Wait for list item element to appear before starting tests
  to make sure template partial has been rendered.
- Remove test for 20 list items as it's possible that there
  could be fewer than 20 contributors for during the window.
  Instead just test to make sure the list has at least one item.
2014-12-25 17:35:11 +00:00
Jason Williams
2c66430dba Merge pull request #4690 from ErisDS/image-importer
Add support for importing images
2014-12-24 17:08:13 -06:00
Hannah Wolfe
a54b5c4af1 Merge pull request #4698 from jaswilli/tag-dup-slugs
Run tag add operations in sequence
2014-12-22 10:00:05 +00:00
Hannah Wolfe
7f4539e67e Merge pull request #4693 from cobbspur/metatags
Updated meta helpers to use tag meta data if present
2014-12-22 09:56:11 +00:00
Jason Williams
633cf1385a Run tag add operations in sequence
Closes #4697
- Run tag add operations in sequence instead of in parallel
  since generateSlug will hand out duplicate slugs until one of
  them is committed to the database.
- Add test.
- Misc cleanup of method parameter names and jshint hints.
2014-12-22 00:41:10 +00:00
cobbspur
32059812a9 Updated meta helpers to use tag meta data if present
No issue

- Tag Meta title and description override default response
- Tag Meta title present on all pages
- Tag Meta description available only on first page
 - Updates tests
2014-12-21 11:39:49 +00:00
Hannah Wolfe
ba3d4b3689 Add support for importing images
closes #4608, #4609

- image handler loads in any image files & figures out where they'll get stored
- image importer has a preprocessor which replaces image paths in
  pertinent spots of post, tag and user models
- image importer stores images, keeping the path where it makes sense
- basic test for the preprocessor
2014-12-21 01:58:35 +00:00
Jason Williams
b00279885f Merge pull request #4688 from ErisDS/migrate-test
Add tests to verify db version hasn't changed
2014-12-20 11:59:57 -06:00
Hannah Wolfe
c855198ace Add tests to verify db version hasn't changed
issue #4479

- these tests will need updating if ever the db schema (not inc validations), permissions fixtures or db
version ever changes
- the intention is that it is no longer possible to accidentally change permissions or the db schema without
knowing you need to update the db version and the values in this test file
2014-12-20 10:24:20 +00:00
Jason Williams
591fa349aa Finish up post count support in tags API
Refs #4521
- Handle 'include' query param in tags API.
- Add post_count support when fetching a tag with findOne.
- Remove post_count from options.include after processing.
- Extra database query no longer used to fetch post_count.
2014-12-19 21:46:34 +00:00
Hannah Wolfe
8ceb896e96 Merge pull request #4654 from ekulabuhov/4521_TagPostCount
[API] Return post count for each tag
2014-12-19 00:17:36 +00:00
Eugene Kulabuhov
539accf69f [API] Return post count for each tag
closes #4521
- if '?include=post_count' present, query db for tag/post_count information
  and append it to returned JSON
- fixed linter errors
- added integration test
- parsing to int as knex (or PostGres driver) is returning bigint as strings
- iterating through a smaller collection to avoid exception
2014-12-18 23:54:18 +00:00
Hannah Wolfe
0af2bc646e Merge pull request #4678 from jaswilli/editor-test
Adjust casperjs test.
2014-12-18 23:25:24 +00:00
Jason Williams
728e21424c Adjust casperjs test.
No Issue
- Keeping the tag entry input focused after sendKeys seems to
  make the test more reliable.
2014-12-18 20:22:48 +00:00
Hannah Wolfe
3c9273ed37 Data importer improvements and fixes
refs #4605, #4479

- Removes versioning from the importer
- Fixes an issue with SQLITE errors not being thrown properly for posts
- Ensures that posts have a created_at date
- Makes sure that the API wrapper is properly handled
2014-12-18 19:50:53 +00:00
Hannah Wolfe
20710b9eba Refactor importer with tests
refs #4605

- Move as much code as possible out of the DB API
- Split the importer into 2 concepts, code which handles different
  filetypes and code which takes the content of files and imports it into
  Ghost in some way
- Split the import process into 4 steps, load the file into a useful
  format, preprocess the data, do the import, generate a report
- Reporting is currently a no-op
- Adds a basic level of testing
2014-12-17 18:22:39 +00:00
Hannah Wolfe
e0f65b899e Merge pull request #4620 from jaswilli/ember19
Update to Ember 1.9.0.
2014-12-16 23:18:24 +00:00
Hannah Wolfe
a0db21d3ec Merge pull request #4629 from cobbspur/postpreview
Add view post link on published and updated posts
2014-12-15 13:28:47 +00:00
cobbspur
53d12a9659 Add view post link on published and updated posts
closes #1756

- adds a post url link to 'post updated' and 'post published' in editor
- adds join function in ghost paths
- adds a '/' detection to makeRoute method
- adds test for join function
2014-12-15 12:18:47 +00:00
Hannah Wolfe
c7e03bbb01 Test update to handle downsize improvements
no-issue

- downsize is now better at white space and punctuation
2014-12-14 23:37:00 +00:00
Hannah Wolfe
67118911e5 Merge pull request #4552 from zethraeus/master
Update downsize node module. Small test updates.
2014-12-14 23:11:08 +00:00
Sebastian Gierlinger
40c78493a3 Password change MU
closes #4624
- added user_id to password reset request
- hide old password field
- updated changePassword method to check permissions
- updated changePassword method to work without oldPassword
- fixed bug for errors shown as [Object object]
2014-12-11 21:23:07 +01:00
Sebastian Gierlinger
1626a8f292 Merge pull request #4529 from cobbspur/permalink
Return computed url with post object
2014-12-11 10:30:41 +01:00
cobbspur
cd5d87ddf2 Return computed url with post object
closes #4445

- post model gets permalink format
- post model queries urlPathForPost to return computed url
- url helper modified to use post url
- urlForPost method abolished and replaced where necessary
- updated tests
2014-12-10 17:23:02 +00:00
Jason Williams
56e4798dcf Update to Ember 1.9.0.
No Issue
- Ember@1.9.0
- Handlebars@2.0.0
- grunt-ember-templates@0.5.0-alpha
2014-12-10 16:24:20 +00:00
Jacob Gable
ef16c67a15 Sort newest to oldest in sitemap files
Closes #4611

Refactored generateXmlFromNodes to pull the urlElements itself from
sorted values in the lookup

Added some checks to existing unit tests to validate ordering.
2014-12-09 12:41:31 -08:00
Hannah Wolfe
2ef77d69de Sitemaps correctly filter draft posts
fixes #4612

- adds missing line of code to remove draft posts
- adds tests to check drafts aren't added
2014-12-09 17:27:12 +00:00
Paul Adam Davis
4e6c867183 Change sitemap root location
Closes #4590

- Removes `-index` from the root sitemap
- Removes redirects (which send sitemap.xml to sitemap-index.xml)
- Adjust tests
2014-12-07 11:59:43 +00:00
Hannah Wolfe
aca7577b60 Merge pull request #4579 from PaulAdamDavis/about-tests
About Page Tests
2014-12-05 17:03:17 +00:00
Jason Williams
837446c570 Move testem.json into client tests directory. 2014-12-05 14:53:45 +00:00
Paul Adam Davis
3b87aa2895 About Page Tests
Closes #4508

Tests for:

- Version number is a number
- Database type is an allowed 1 of 3
- There are 20 contributors
- First contributor has an image tag and image src exists, alt tag, title tag, href to github
2014-12-05 14:40:59 +00:00
Sebastian Gierlinger
658dea9e6b Merge pull request #4580 from ErisDS/footnote-excerpt
Strip footnotes from excerpts
2014-12-04 17:24:56 +01:00
Hannah Wolfe
591d653b36 Strip footnotes from excerpts
fixes #4572

- Remove both inline and bottom footnotes from excerpt output before stripping the remaining HTML
- No more red errors, black text or bold links in codemirror, as codemirror gets confused by footnote syntax. This is a step towards the new editor which has no syntax highlighting in the editor
2014-12-04 15:28:30 +00:00
Sebastian Gierlinger
32959b2269 Merge pull request #4578 from ErisDS/pr-3489
Code Injection PR 3489 rebased and updated
2014-12-04 15:16:37 +01:00
Sebastian Gierlinger
0b2541b19f Merge pull request #4575 from ErisDS/highlight
Adds markdown highlight support
2014-12-04 15:00:01 +01:00
Hannah Wolfe
9783f16e76 Adds markdown highlight support
closes #4574

- adds highlight showdown extension with tests
2014-12-04 13:37:29 +00:00
Hannah Wolfe
904918d5cc Code Injection - adds perms, shortcuts, icon, flag
refs #1993

- adds ctrl/cmd+s for save
- adds config flag
- adds icon on settings page, puts items in the right order
- sorts out permissions for all settings pages with consistent configuration
2014-12-04 13:34:44 +00:00
Sebastian Gierlinger
319887c77b Merge pull request #4573 from ErisDS/limit-all-sitemaps
Add limit=all consistently to users, posts & tags
2014-12-04 09:45:33 +01:00
Jason Williams
5f9620cde0 Merge pull request #4567 from cobbspur/imagesubdir
Fix image helper for subdirectories
2014-12-03 14:39:52 -06:00
cobbspur
5f07f5503e Fix image helper for subdirectories
closes #4566

- Url created within urlFor with image context rather than calling createUrl function
2014-12-03 20:19:22 +00:00
Hannah Wolfe
9b146e59bb Add limit=all consistently to users, posts & tags
refs #623, #4348

- this fixes sitemaps to list all posts, pages, tags and users
- makes the API behave consistently across all paginated resources
2014-12-03 18:46:26 +00:00
Hannah Wolfe
13757041d9 Merge pull request #4270 from mispy/footnotes2
Footnotes extension for Showdown
2014-12-03 13:38:47 +00:00
Sebastian Gierlinger
9b8141bb08 Merge pull request #4530 from ErisDS/issue-4498
API - no more m-2-m relation ids by default
2014-12-02 20:49:47 +01:00
Hannah Wolfe
4cb909542a API - no more m-2-m relation ids by default
closes #4498

- remove toJSON code which returns only IDs from objects
- don't auto-include tags & fields in post responses
- don't auto-include roles in user responses
- fix #allthethings that made assumptions about the auto-includes, or otherwise were only working because of the auto-include
2014-12-02 19:24:44 +00:00
Hannah Wolfe
89905a8e3c Merge pull request #4560 from cobbspur/labs
Move ugly debug to Settings  Labs
2014-12-02 10:34:17 +00:00
cobbspur
edfa74f349 Move ugly debug to Settings Labs
closes #4534

- Adds new Labs route
- Wires route in settings page
- Move and rename debug templates and logic to labs
- Redirect /debug to settings/labs
2014-12-01 19:19:08 +00:00
Hannah Wolfe
c06e649ab1 Merge pull request #4554 from sebgie/issue#3872
URL safe base64 encoding
2014-12-01 16:56:14 +00:00
Sebastian Gierlinger
9ddabffa10 URL safe base64 encoding
closes #3872
- updated base64 escaping to respect + and \
- updated base64 escaping to remove = during transport
- updated tests
2014-12-01 16:59:49 +01:00
Hannah Wolfe
aa44743c67 Merge pull request #4531 from Gargol/issue-4485
Cleans up HTML data attributes on body in default.hbs
2014-12-01 10:54:19 +00:00
zethraeus
bfe91b5769 Update downsize node module. Small test updates.
issue #4017
- downsize 0.0.5 -> 0.0.8
- downsize is now better at punctuation, update {{content}} and {{excerpt}} tests appropriately.

Conflicts:
	package.json
2014-11-30 20:49:36 -08:00
Jacob Gable
2cfa18475a Generate sitemap files
Closes #623

- Add basic init and eventing scaffold
- Add sitemap-index.xml generation
- Broke out generators to individual files, added request handler
- Add page, author and tag xml files; add index mapping
- Add SiteMapManager unit tests
- Add Generators tests
- Cache invalidation headers for sitemap-*.xml
- Redirect sitemap.xml to index and rename to sitemap-index
- Handle page convert and publish/draft changes
- Add very basic functional test for route existence
- Add cache headers to sitemap routes
2014-11-30 10:49:45 -08:00
Felix Rieseberg
2ef0861d37 Use non-deprecated moment.substract()
Closes #4545
- Go with subtract(value, string) instead of subtract(string, value)
2014-11-29 17:58:55 -08:00
Nazar Gargol
df5a598718 Cleans up HTML data attributes on body in default.hbs
closes #4485

- removes data attributes used on body in default.hbs
- introduces new way to generate configuration through meta tags
- config initializer consumes configurations from the meta tags using parser
- moves blog_title helper/value to be a property in a configuration api
2014-11-29 17:09:43 +01:00
Jason Williams
86cb690474 Merge pull request #4518 from ErisDS/rss-fixes
Change RSS content type & use absolute URL in meta
2014-11-28 13:07:07 -06:00
Hannah Wolfe
6f0bca8d57 Merge pull request #4522 from felixrieseberg/iss4487
Dynamic Titles in Ghost Admin
2014-11-28 19:06:44 +00:00
Felix Rieseberg
7c4381c812 Dynamic Titles in Ghost Admin
- Every route can set a title token that is combined with the blog’s
title, resulting in titles like ‘Content - Test Blog’.
- Subroutes are supported (‘Settings - General - Test Blog’)
- The blog’s name is applied to and taken from the `config` object to
spare Ember a REST call via `store.find(‘settings’)`.
- Tests have been changed to test for the new titles.
- The initially proposed solution
(https://github.com/paddle8/ember-document-title) doesn’t play nice
with EAK, which is why I went with this solution
(https://gist.github.com/machty/8413411) by Ember.JS core dev @Machty.
2014-11-27 15:41:00 -08:00
Robert Jackson
ef71d932f3
Add initial client unit test. 2014-11-26 23:20:50 -05:00
Hannah Wolfe
31ae0c6923 Change RSS content type & use absolute URL in meta
no issue

- changes the content type for the RSS feeds from text/xml to
  application/rss+xml
- changes the link rel=alternate tag to use an absolute URL for the feed
  in the blog meta data
2014-11-24 22:33:49 +00:00
Hannah Wolfe
cb726d57ef Adding comprehensive subdirectory route tests
closes #2230, refs #4477, #4476

- Test that subdirectories route correctly no matter how they're specified
2014-11-24 08:28:34 +00:00
Hannah Wolfe
50f8b29bdd Fix issue with editor and images
ref #4459

- move initMarkers back to its original home
- add new test that a post with an image can be edited
2014-11-17 21:55:12 +00:00
Jason Williams
e499e5dda9 Fix invalid image helper URLs when using a subdir.
No Issue
- Strip sub-directory from image paths before passing to
  config.createUrl. Since images are stored with the sub-directory
  and createUrl builds a URL with the sub-directory the result
  would be a URL that contains the sub-directory twice.
2014-11-17 05:32:51 +00:00
Hannah Wolfe
d3f70e3b24 Update showdown to showdown-ghost 0.3.4
closes #2675

- update showdown to the newly published showdown-ghost module which has a fix for the lack of language support in codeblocks
2014-11-15 16:37:35 +00:00
John O'Nolan
1cdafae8d9 Merge pull request #4441 from PaulAdamDavis/cleanup-sass-components
Refactor component styles
2014-11-14 14:56:07 +01:00
Paul Adam Davis
f8282ad22f Refactor component styles
Continues on from #4401

- Reformats the Sass to match our new style (property order, comments, & white space)
- Changes the modal container to a class from an ID (and adjust tests)
2014-11-13 11:28:22 +00:00
surgesoft
d9643ed2f4 full BREAD Tag endpoints and Tag api tests
close #4263
- implemented full BREAD Tag API
- deleting a tag will also detach its relations to posts
- tests of Tag API
2014-11-13 00:44:36 +08:00
Jaiden Mispy
31eea94b18 Add footnotes extension to showdown
refs 1318
- based on Markdown Extra https://michelf.ca/projects/php-markdown/extra/
- allows [^n] for automatic numbering based on sequence
2014-11-11 19:24:04 +11:00
Hannah Wolfe
67e33a65e8 Merge pull request #4317 from cobbspur/image
Created image helper with absolute url option
2014-11-03 15:21:35 +00:00
Hannah Wolfe
fe659117bc Merge pull request #4155 from jgable/importDuplicates
Remove duplicate posts and tags on import
2014-11-03 15:03:44 +00:00
Jason Williams
817b8d2906 Improve handling of forked processes in tests.
Closes #4277
- Increase the wait time for forked processes to spin up.
- If we give up on waiting for a forked process, send it a
  kill signal so if it comes alive later it doesn't sit in the
  background forever.
- Fail fast if test setup fails instead of waiting for the timeout.
2014-10-31 16:00:35 +00:00
Jason Williams
2cfab3565f Handle null/undefined value in test assertion.
No Issue.
- Test is not guaranteed to get a setting that has a "value"
  so we need to handle the case where it's null or undefined.
2014-10-30 15:40:23 +00:00
Jason Williams
de63f56f68 Update Ember to 1.8.0.
Closes #4316
- Ember@1.8.0.
- Ember-Data@1.0.0-beta.11.
- Change templates to use new Ember.Select syntax and other minor
  cleanup.
- Adjust functional tests.
2014-10-30 06:01:22 +00:00
cobbspur
4a56d10c86 Created image helper with absolute url option
closes #4231

- Adds {{image}} helper
- Adds image_spec test unit
- Updated {{ghost_head}} to use image helper
2014-10-28 13:14:41 +02:00
Hannah Wolfe
dbf055907a Merge pull request #4338 from felixrieseberg/iss3858
Enable :author as permalink option
2014-10-28 12:58:39 +02:00
Jacob Gable
5de5cfe7a1 Remove duplicate posts and tags on import
Issue #806

- Modify sanitize to check for duplicate posts and tags
- Update posts_tags when referencing removed duplicate tags
- Return both data and problems from importData
- Add tests for duplicate posts and tags with fixtures
2014-10-27 18:20:32 -05:00
Hannah Wolfe
c0375d4087 Merge pull request #4332 from cobbspur/escape
Escape meta title and description
2014-10-27 17:03:20 +02:00
Felix Rieseberg
c7ad09aace Enable :author as permalink option
Closes #3858
- urlPathForPost is now aware of the author’s slug, allowing for the
permalink setting to use :author
- Frontend controller only renders posts that have the specified
author, if one is given
- Extensive tests included
2014-10-25 18:15:24 -07:00
cobbspur
5aac6d6d69 Escapes strings
closes #4328

- Escapes metaTitle, metaDescription, blog url, blog title, tags
- Updates tests
- Adds test for metaTitle and metaDescription with double quotes
2014-10-24 19:22:37 +02:00
Leonard Camacho
a6a02f31ad Fix no show of default Twitter card
No issue
- change default Twitter card from content to summary
2014-10-22 20:49:06 -04:30
Paul Adam Davis
a32e5a7135 Move unrelated editor cover code to the right place
Closes #4106

Moved the `.editor-close` styles to `post-settings-menu.scss`
2014-10-21 13:14:07 +01:00
Sebastian Gierlinger
425c99423f Test improvements
refs #4309
- replace waitForResource with waitForSelector to prevent UI timing
issues.
2014-10-20 22:05:41 +02:00
Hannah Wolfe
7e123c8665 Merge pull request #4313 from jaswilli/issue-4309
Cancel pending auto-save if manual save occurs.
2014-10-20 22:11:28 +03:00
Jason Williams
58fda8a9a4 Cancel pending auto-save if manual save occurs
Closes #4309
2014-10-20 18:40:45 +00:00
Matt Enlow
78d845d085 Merge pull request #4280 from ErisDS/gfm
Change autolinked URLs to output nice quotes
2014-10-20 07:47:09 -06:00
Hannah Wolfe
5199a007b5 frontend functional tests -> frontend route tests
no issue

- Some of the tests were duplicated and all of these tests are faster and easier to do with super test as we aren't testing interactions
- Introduced a new test util to toggle permalinks which allows us to test the different structures
- Using cheerio in route tests to test the HTML / XML output is well formed
2014-10-19 21:10:13 +02:00
Hannah Wolfe
fbccc36f77 More autosave improvements
issue #4305, issue #4259, issue #1413

- change new->edit transitionToRoute to be replaceRoute
- auto focus in the editor on transition to the edit route
- change the one-time autosave to happen on codemirror focusin instead of title focusout
- re-add removed tests, and reorder broken test
2014-10-18 17:27:05 +02:00
Jason Williams
b05da0f1e4 Auto-save changes
Refs #4259
- Auto-save new post when title loses focus.
- If a post has '(Untitled)' for a title, regenerate slugs
  on all title changes--same behavior as a new post that does
  not yet have a slug.
- Adjust some functional tests to handle the automatic transition
  from editor/new to editor/editor and the URL changes that go
  along with it.
2014-10-17 22:52:43 +00:00
Hannah Wolfe
abd6266c73 Merge pull request #4282 from cobbspur/twitter
Adds Twitter cards to {{ghost_head}}
2014-10-17 19:36:10 +03:00
Hannah Wolfe
6e3fa3a2cf Merge pull request #4259 from novaugust/auto-save
Auto save draft posts
2014-10-17 19:04:07 +03:00
cobbspur
23e98aa8dc Adds twitter cards and schema.org to {{ghost_head}}
closes #3900

- Adds twitter cards to ghost head helper
- Adds schema json information
- Adds test with null values for post image and cover image
- Adds test for privacy flag
- Adds test for the case of no tags
- Updates test to check for twitter card and schema data
- Updates privacy.md
- Fixes issue with image urls that are linked by url rather than uploaded
2014-10-17 17:26:14 +02:00
Hannah Wolfe
fd3c4c9c4d Workaround / skip & clean Mail API tests
ref #4277

- mail API tests are failing consistently locally
- skip the failing tests
- restructure existing tests to match patterns from other tests
2014-10-17 16:18:57 +02:00
Hannah Wolfe
d44a97405b Merge pull request #4220 from felixrieseberg/iss4211
Shorter user slugs (if possible)
2014-10-16 21:23:50 +03:00
Matt Enlow
dc426e94b3 Merge pull request #4283 from ErisDS/split-helpers
Refactor helpers & tests into individual files
2014-10-14 17:25:46 -06:00
Hannah Wolfe
2c6d43a0c0 Refactor helpers & tests into individual files
no issue

- Split theme helpers into individual files for each
- Do the same for tests
- Have utils to share some things between them
- Move assetHash onto config
2014-10-14 22:52:40 +02:00
Hannah Wolfe
6d5155015b Change autolinked URLs to output nice quotes
ref #4257

- This is a follow on from #4257 where I updated the codestyle.
- We were outputting escaped single quotes when double quotes would be much nicer.
- Changes the HTML output from our markdown conversion (non-breaking change)
- Updated tests to match the new output
2014-10-14 11:09:06 +02:00
Paul Adam Davis
028b878721 Rename .object-list to .user-list
No issue
References todo comment in [users.scss](91c07e37bf/core/client/assets/sass/layouts/users.scss (L6-L7))

- Renames anything starting with `.object-list` to `.user-list`
- Adjusts tests to match
2014-10-13 22:43:03 +01:00
Matt Enlow
a9fb2af7ea Autosave Draft posts
Ref #1413
- If the user stops typing for 5 seconds, a "typingPause" action is sent from the GhCodemirrorComponent
- Editor-base-controller ties the "typingPause" action to its "autosave"
- If a post is being saved and does not have a title, the title is set to "(Untitled)"
- Cleanup editor base controller property dependencies and code
2014-10-13 15:28:27 -06:00
Gabor Javorszky
938b098329 Abstracting away the deprecatedItems
Closes #4189

* moved `deprecatedItems` from within the function to the default config object
* addes tests
2014-10-12 23:04:39 +01:00
cobbspur
487297ff81 Added open graph tags for ghost head helper
issue #3900
- uses isPrivacyDisabled helper to see if useStructuredData has been disabled in config.js
- adds an array of promises to deal with asynchronous data
- resolves asynchronous data then adds open graph tags after canonical link
- featured image and tags are only added if present
- open graph tags only added on post and page
- adds unit test to check correct data is returned
- updates other unit tests to reflect changes
2014-10-08 15:57:49 +01:00
Felix Rieseberg
0025f3d6de Shorter user slugs (if possible)
Closes #4211
2014-10-01 23:27:21 +02:00
Fabian Becker
40254adc92 Implements module tests
closes #2521
- Add new module tests
- Implements new `test-module` task to specifically run module tests
2014-09-29 22:33:09 +02:00
Fabian Becker
1d1f24d3d4 Properly server shared files
refs #3992
- Don't use path.join for URLs
- Cache robots.txt for 1h instead of 1y
2014-09-25 14:14:20 +02:00
Hannah Wolfe
e5e7488d4d Fix cache-control header for API routes
closes #4157

- adds cache-control header back to api routes
- moves cache rules object into testUtils
- adds cache-control header test to every existing API test
2014-09-25 11:06:28 +01:00
Fabian Becker
aed5d346a7 Static page and feature options in new PSM
closes #4109
- Add featured option
- Move static page/featured to other place
- Change wording on static page
2014-09-24 12:29:17 +00:00
Hannah Wolfe
d1abc6c0f2 Merge pull request #3962 from halfdan/2249-is-context
Implements is-helper
2014-09-23 17:05:13 +01:00
Hannah Wolfe
792e748e2f Merge pull request #4093 from halfdan/update-helpers
Update meta_* helpers.
2014-09-23 15:28:24 +01:00
Fabian Becker
801c5248c2 Update meta_* helpers.
no ref
- Return meta_description from post.meta_description if set
- Return meta_title either from post.title or post.meta_title if set
- Adds tests
2014-09-23 14:06:52 +02:00
Fabian Becker
aa5cf6ed3b Implements is-helper
closes #2249
- Added context to res.locals
- Added context aware is helper
- Added unit tests
2014-09-23 11:31:16 +02:00
Gabor Javorszky
1f5a378b4c Deprecated mail.fromaddress, mail.from is Title <email@address>
Closes #4018

* cleaned up `mail_spec.js`
* deprecated `mail.fromaddress`
* implemented 'Blog title <email@address.com>' format with fallbacks
* added tests to deprecation and from address, made existing ones more robust
* moved domain intuit into its own module: `GhostMailer.getDomain()`
2014-09-23 09:33:20 +01:00
Gabor Javorszky
b3820fbb31 More robust deprecation check code
Closes #4082
* reformatted code to allow for traversal
* deeper config items should be denoted like this: `object.object.object.property`.
* added tests for testing the deprecation warnings
2014-09-23 09:33:20 +01:00
Fabian Becker
2c3abeee03 Naming cleanup
closes #4069
- Rename everything from camelCase to lowercase + dashes
- Remove usage of `server`, `app` and `instance`
2014-09-20 21:09:16 +02:00
Matt Enlow
7ef34382f2 Merge pull request #4063 from ErisDS/issue-2703
GhostGFM honours escaped tildes
2014-09-19 10:04:50 -06:00
Hannah Wolfe
8841be8ec8 GhostGFM honours escaped tildes
fixes #2703

- adds an extra rule to remove the slash if a tilde is escaped as showdown
  won't do this.
2014-09-19 09:16:33 +01:00
Fabian Becker
f2fcb5b62b Let Ghost serve favicon instead of using dependency
no ref
- Remove static-favicon dependency
- Refactor robots.txt middleware to also serve favicon
- Add ETag
2014-09-18 13:51:41 +02:00
Harry Wolff
469aaa398c Add jscs task to grunt file and clean up files to adhere to jscs rules.
resolves #1920

- updates all files to conform to style settings.
2014-09-17 21:44:29 -04:00
Hannah Wolfe
62efa05798 Updating dev dependencies
refs #3795

- updates all dev dependencies to their latest version number
- jshint now complains about the Promise global, removed it from predef in
  lieu of a better solution
- changes in should require minor updates to the tests
- tests are passing and all major grunt commands appear to work: clean,
  init, prod, validate and release
2014-09-17 16:44:30 +01:00
Harry Wolff
457f360765 Updates image upload directories to be number based.
resolves #2285

- Moves to using moment.format('MM') to use the date formatting of a month
2014-09-16 13:23:29 -04:00
Hannah Wolfe
6054086feb Fix lint error in tests 2014-09-15 22:00:08 +01:00