Commit Graph

586 Commits

Author SHA1 Message Date
William Dibbern
badd6d10d4 Added CasperJS Functional Test to Build
Fixes #363

- Added new grunt task to run casperjs tests.
- Added prerequisites (sass/bourbon/casperjs) to travis config.
- Updated failing functional tests to use more robust `waitFor`
statements.
- Updated capserjs `base.js` file to use a password which conforms to
our 8 character minimum.
- Added necessary logout to first test and also registration step to
ensure a user is present in the system.
2013-08-26 16:28:41 -05:00
John O'Nolan
1efd16dbcc Fixed another CodeMirror syntax highlighting bug 2013-08-26 01:44:12 +02:00
Hannah Wolfe
78ad9f79a9 Merge pull request #523 from ErisDS/validation
Validation improvements
2013-08-25 13:25:44 -07:00
Hannah Wolfe
c70dfde7e3 Agressive stripping of the model attributes
- fixes #517
- prevents this from occuring again in future with other relations
- validation function & stripping done for all models
- casper test for flow, plus validation & logged out tests
2013-08-25 18:12:27 +01:00
Hannah Wolfe
41e36cca7e Validation consistency
- introduced validation method in the post and user model
- moved signup validation onto model
- consistent use of validation & error messaging in the admin UI
- helper methods in base view moved to a utils object
2013-08-25 18:10:12 +01:00
Hannah Wolfe
052aa57360 Merge pull request #512 from gotdibbs/Issue443
Rename /logout/ to /signout/ and /login/ to /signin/
2013-08-25 10:06:53 -07:00
Hannah Wolfe
da0ab62989 Merge pull request #525 from cobbspur/helpers
renamed helpers to body_class and post_class
2013-08-25 08:29:20 -07:00
Hannah Wolfe
a7f2c0e7d3 Merge pull request #526 from cobbspur/helpers2
fixes missing helper
2013-08-25 08:28:48 -07:00
cobbspur
fbe44a041c fixes missing helper
closes #521

- changes handlebars default missing helper function to log error instead of throwing error
2013-08-25 15:45:44 +01:00
cobbspur
ce0f1aae46 renamed helpers to body_class and post_class
closes #508

- changed bodyclass helper to body_class and updated unit test
- changed postclass helper to post_class and updated unit test
2013-08-25 14:49:57 +01:00
Hannah Wolfe
fafead5718 Merge pull request #520 from gotdibbs/Timeouts
Patch to prevent timeouts in unit tests
2013-08-25 06:41:57 -07:00
Hannah Wolfe
c63012a678 Merge pull request #524 from cobbspur/helpers
added ghost_head and ghost_foot helpers
2013-08-25 06:41:34 -07:00
cobbspur
00d36e976d added ghost_head and ghost_foot helpers
closes #382, closes #383

 - added helper called ghost_head to insert meta data with current version of ghost
 - added helper called ghost_foot to insert script tag for jquery
 - added unit test for both helpers
 - removed trailing slash from ghost.js for 'shared' path and removed from outside of loop as it is shared on front and backend
2013-08-25 14:34:35 +01:00
Hannah Wolfe
6c5676de9c Merge pull request #522 from JohnONolan/post-template
Rename classes applied to {{bodyclass}} to be less generic
2013-08-25 06:34:00 -07:00
John O'Nolan
b9f43aecf4 Correcting code attribution reference 2013-08-25 12:51:43 +02:00
John O'Nolan
8ac173aa19 Rename classes applied to {{bodyclass}} to be less generic 2013-08-25 12:06:52 +02:00
William Dibbern
d7521958d5 Rename /logout/ to /signout/ and /login/ to /signin/
Closes #443
- Renamed routes
- Added redirects for old routes
- Added unit test for redirect
- Updated references to old routes in templates, html
2013-08-24 22:38:48 -05:00
William Dibbern
ff3a9dde00 Patch to prevent timeouts in unit tests
Temporary patch for #362

- Split out database teardown and initialization so they each have their
own 2 second timeout.
- Added some test-specific increased timeouts.
2013-08-24 16:07:15 -05:00
John O'Nolan
9d8bf4b0f9 Fixed overzealous word breaking
Closed #514
Reverting change from @c46a0c6 where I moved the new word breaking CSS rules to the body tag to apply everywhere. This doesn't play nicely everywhere - so this change moves them back to just the content preview areas where they are needed.
2013-08-24 20:43:33 +02:00
Hannah Wolfe
60450e8c2a Merge pull request #504 from javorszky/iss418
Dropping the database invalidates cookies
2013-08-24 11:07:43 -07:00
Hannah Wolfe
3209a96029 Merge pull request #505 from javorszky/iss483
Redirects logged in users to dashboard from login and signup
2013-08-24 08:11:37 -07:00
Hannah Wolfe
6f05812377 Merge pull request #503 from sebgie/questionmarkbug
Fix for post with '?'
2013-08-24 08:06:51 -07:00
Hannah Wolfe
29c36fe2bf Merge pull request #501 from cobbspur/posttitle
content management preview pane displays post title
2013-08-24 08:04:58 -07:00
Hannah Wolfe
60c7643a58 Merge pull request #438 from cgiffard/hbs-helper-author
Template Helpers: Added author hbs helper
2013-08-24 07:45:36 -07:00
Gabor Javorszky
ba4950f761 Redirects logged in users to dashboard from login and signup
Closes #483
* Added yet another middleware that checks whether we're logged in, and if so, plops us into dashboard
* Added this to the login and signup page routes.
2013-08-24 01:25:53 +01:00
Gabor Javorszky
3ded75ca4f Dropping the database invalidates cookies
Closes #418.
* Moved the app config behind the promise wall (I couldn't reliably assign generated uuid to the ghost object AND have access to an automatically created db from fixtures AND not have circular reference (try including api in ghost.js ;) ))
* Added new functionality to `ghost.init()`, which is responsible for the first run bit (I'm thinking plopping a filter or an action in there for future devs)
* Modified `.gitignore` so the `.png`s casper generates aren't added
* Fixed ambiguity and typos here and there, see code
2013-08-24 01:02:01 +01:00
Sebastian
9ee91b3547 Fix for post with '?'
closes #433
- if slug is empty after trimming use "post" as slug instead
2013-08-23 18:49:45 +02:00
Christopher Giffard
4397bcf86e Template Helpers: Added author hbs helper
Fixes #358

 - Altered post model to enable eager loading of author and
   user relationships
 - Fixed broken base model toJSON method, which prevented
   eager resolution of relationships (thanks @tgriesser)
 - Passes author information to template.
 - Added unit tests for author helper.
 - Added unit tests for findOne and findAll additions to Post Model
   which take into account the eager relationships

 Usage:
 `{{author}}` -- returns the full name of the post author
 `{{author.attribute}}` -- returns property of the current post author
 as described by the user model
2013-08-23 19:13:32 +10:00
cobbspur
df17a19008 content management preview pane displays post title
closes #477

- change to preview.hbs to show title as a h1
2013-08-22 22:48:33 +01:00
Hannah Wolfe
ba8bdf7dd7 Merge pull request #496 from javorszky/iss468
Added brute force protection to login
2013-08-22 14:19:05 -07:00
Hannah Wolfe
9f9759329e Merge pull request #498 from cobbspur/casperupdate
updating casper
2013-08-22 13:56:15 -07:00
cobbspur
1366fc2fd7 updating casper 2013-08-22 21:53:00 +01:00
Hannah Wolfe
973609c3d7 Merge pull request #497 from ErisDS/helpers
Added bodyclass and postclass helper
2013-08-22 13:14:50 -07:00
Hannah Wolfe
98e4923077 Added bodyclass and postclass helper
closes #472

- filterable as array, output as string
- with unit tests
2013-08-22 21:01:20 +01:00
Hannah Wolfe
2d3e2f36b1 Merge pull request #493 from ErisDS/helpers
Added excerpt helper
2013-08-22 12:56:01 -07:00
Hannah Wolfe
1d0c41d0e8 Merge pull request #495 from cobbspur/rename
rename helpers paginate -> pagination, dateFormat -> date
2013-08-22 12:55:49 -07:00
Gabor Javorszky
368eb7a352 Added brute force protection to login
Closes half of #468
* adds a 2 second limit until you can retry logging in, otherwise sends you a 401.
* bounce: 2ms, checks the pw: 254ms on my machine
* added a test to the casper suite
2013-08-22 20:48:36 +01:00
cobbspur
3ac82f14a0 rename helpers paginate -> pagination, dateFormat -> date
closes #381

- renamed entries for dateFormat in helpers to date
- renamed entries for paginate in helpers  and unit tests to pagination
2013-08-22 20:42:54 +01:00
Hannah Wolfe
2b94364842 Merge pull request #492 from gotdibbs/Issue352
Fixed editor actions menu
2013-08-22 11:48:37 -07:00
Hannah Wolfe
e7897143e8 Merge pull request #491 from ErisDS/history-fix
Settings pane switching was causing multiple events to be bound
2013-08-22 11:44:36 -07:00
Hannah Wolfe
880de6bde6 Merge pull request #494 from tgriesser/fix-tojson
fixes incorrect toJSON extension, for eager loaded models
2013-08-22 11:00:55 -07:00
Tim Griesser
c83835a811 fixes incorrect toJSON extension, for eager loaded models 2013-08-22 13:53:46 -04:00
Hannah Wolfe
2afa81bc1e Added excerpt helper
closes #471

- strips HTML aggressively
- with unit tests
2013-08-22 15:51:30 +01:00
Hannah Wolfe
6c6119a5c8 Merge pull request #486 from jgable/fixRedirectLoop
Fix redirect loop when no content
2013-08-22 02:19:06 -07:00
Hannah Wolfe
9092ed95ba Improvements to settings pane switching
closes #174

- Triggering router events for navigation between settings panes
caused the route function to be re-executed, which caused all
kinds of fun.
- Wrapped the settings route function in an if statement to preserve
the current view if it already a settings view.
- Added Ghost pub-sub and using that instead of History API
2013-08-22 08:08:43 +01:00
William Dibbern
31dc45768a Fixed editor actions menu
Closes #352
- Updated editor.scss to break out transition shorthand into its
constituent properties so that bourbon appends the correct vendor
prefixes.
- Added full set of publish options to the statusMap.
- Added setActiveStatus function to handle toggling the active action
for the publish menu.
- Cleaned up handleStatus and updatePost functions to match desired
functionality of menu items toggling the selected action and the actual
button on the split button invoking said action.
2013-08-21 21:31:59 -05:00
Hannah Wolfe
590ba48988 Fix for validation on login
closes #490
2013-08-21 17:57:07 +01:00
Jacob Gable
23ee4cadc3 Fix redirect loop when no content 2013-08-21 09:05:17 -05:00
John O'Nolan
1e95ec0c3d Cleaned up typographic rules 2013-08-21 14:43:24 +02:00
John O'Nolan
3a427905e0 Merge pull request #485 from matthojo/Login-Fix
Bug Fix: Login form now maintains the right layout on resize
2013-08-21 05:01:27 -07:00