Commit Graph

337 Commits

Author SHA1 Message Date
Hannah Wolfe
61444bcf9a Merge pull request #692 from gotdibbs/Issue352
Publish button fixes
2013-09-11 06:37:26 -07:00
jamesbloomer
3e28803672 Ensure image uploads do not overwrite if they have the same name
closes #619
- check if uploaded image name exists in month/year path
- if unique then save
- if not unique then add -1 to the end of the name eg. image-1.jpg
- if image-1.jpg exists then increment to -2
- keep going until a unique name is found
- uses tail recursion as normal path will be to save the first filename and deep recursion will be the exception
- (the alternative of loading the names of all the files in the directory could result in a large in memory array)
2013-09-10 22:02:28 +01:00
William Dibbern
2329b34be7 Publish button fixes
Fixes #352

- Ensure publish button's default status is set in the `render`
function.
- Ensure publish button's popup arrow has animation reverted when a
status has been selected.
- Bumped up timeout in failing mocha test for exports-002.
2013-09-10 09:32:02 -05:00
Matthew Harrison-Jones
2280276fdd Removed unused user menu items and linked "Help / Support" to the right place
Also updated CasperJS tests to support changes
2013-09-10 15:05:42 +01:00
Hannah Wolfe
773fe0f3d9 Further improvements to markdown implementation
closes 644

- replaced showdown's implementation of bold and emphasis with a version close to marked's
- reverted the underscore-in-word handling to only deal with 2 or more underscores & commented the test this causes to fail - this was causing problems with double underscores.
2013-09-09 22:55:32 +01:00
William Dibbern
9064914829 Added redirect to get rid of /page/1/
Fixes #592

- Added *permanent* redirect to ensure `/page/1/` isn't used and that
`/` is used instead.
- Added pageUrl helper (and unit tests) to generate client side url
fragment for blog pages conforming to the above standard.
- Updated pagination helper to use new `pageUrl` theme helper.
- Added functional tests for redirects and added scaffolding for
functional frontend tests in general.
2013-09-09 18:32:44 +01:00
Sebastian Gierlinger
1da0a15be2 Remove {{nav}} helper
closes #626
- removed nav from config.js
- removed navHelper
- removed navHelper tests
- removed core/server/filters
2013-09-09 13:00:56 +02:00
Hannah Wolfe
3f51d51e47 Merge pull request #656 from JohnONolan/signup-screen
Signup screen
2013-09-09 01:59:32 -07:00
Sebastian Gierlinger
e51a14ee90 Clean up settings/general screen
Closes #345
- added blog description to general screen
- removed content screen from sidebar
- removed beforeRender from settings front end
- removed content screen from tests
2013-09-08 22:12:48 +02:00
John O'Nolan
58b97497a3 New signup screen styling + new name field. 2013-09-08 20:39:55 +02:00
John O'Nolan
5ae36b00c9 Updating tests 2013-09-08 17:56:45 +02:00
John O'Nolan
4b40bb5aab Center login form with CSS instead of JS 2013-09-08 17:12:25 +02:00
Jacob Gable
e56a0badb5 Fix FancyFirstChar nested tag content
Added some white space skipping and inner tag checking to the fancify
method.
2013-09-06 20:32:20 -05:00
Hannah Wolfe
630c03d4d4 Fixing issues with {{url}}
closes #639

Updated url helper to work
Updated tests
Changed helper.js in tests/unit to be called testUtil to avoid confusion
2013-09-06 18:23:22 +01:00
Hannah Wolfe
c469d05c46 Mail settings are per environment
closes #624

- example mail setting in development config
- updated mail module & tests
2013-09-04 16:15:21 +01:00
Hannah Wolfe
c45f911a1e Improving underscore handling
Additional changes to how underscores are handled.
This more closely matches codemirror, but is still not 100%.
2013-09-04 15:20:26 +01:00
Adam Howard
e24b5c3382 Proper settings infrastructure, allowing new features without compromising old data.
On server load, check for settings which have not been set, and apply a default value to the settings table from a JSON file.
2013-09-03 22:56:34 +01:00
Hannah Wolfe
978502579f Fixing incorrect stub in mail test
- This test was failing on macs
2013-09-03 21:57:39 +01:00
Hannah Wolfe
36874badd5 Merge pull request #587 from javorszky/iss288
Email sending with Sendgrid plus password reset
2013-09-02 15:44:48 -07:00
Hannah Wolfe
599d233be9 RSS Feed Autodetection
closes #599

- {{ghost_head}} now outputs feed link tag
2013-09-02 21:57:26 +01:00
cobbspur
e43029e894 Modified body_class helper
closes #591

- body_class helper returns archive-template class on archive pages
- added to unit tests
2013-09-02 20:13:48 +01:00
Hannah Wolfe
859e20d8a3 Merge pull request #590 from ErisDS/showdown-gfm-fix
GFM Auto-linking fixes
2013-09-02 10:58:34 -07:00
Hannah Wolfe
7570599252 Merge pull request #564 from skattyadz/tags-squashed
Add post tagging functionality
2013-09-01 17:50:21 -07:00
Hannah Wolfe
684150d36d GFM Auto-linking fixes
closes #577

- auto-linking was interfering with things that were already a link
- now checks to ensure we are not in a HTML or markdown link already
- added tonnes of new tests
2013-09-01 16:32:54 +01:00
Ricardo Tomasi
56619a87f8 Implement e-mail sending 2013-08-31 22:21:33 +02:00
Adam Howard
d90df55b75 Add post tagging functionality
closes #367
closes #368

- Adds Tag model with a many-to-many relationship with Post
- Adds Tag API to retrieve all previously used Tags (needed for suggestions)
- Allows setting and retrieval of Tags for a post through the Post's existing API endpoints.
- Hooks up the editor's tag suggestion box to the Ghost install's previously used tags
- Tidies the client code for adding tags, and encapsulates the functionality into a Backbone view
2013-08-30 16:20:22 +01:00
Hannah Wolfe
5a908bd3d3 Merge pull request #569 from gotdibbs/Issue469
Strip whitespace on post titles
2013-08-30 07:23:13 -07:00
William Dibbern
94f262a697 Strip whitespace on titles
Fixes #469

- Added client-side trimming of title on blur if it is not already
trimmed.
- Added server-side trimming of title on 'saving' event of post model.
2013-08-30 08:04:32 -05:00
Hannah Wolfe
b55ed1c33c CasperJS test amends
- removing --fail-fast as this prevents screenshots
- adding debug code for the good of all
2013-08-30 10:50:42 +01:00
Hannah Wolfe
fe713c1042 Further grunt validate / casperjs test improvements
- Test environment runs on a different port
- Removed wait() and replaced with waitFor() where possible
- Added more timeout functions / handlers
- General consistency improvements
2013-08-29 20:13:17 +01:00
John O'Nolan
68704db01a Updated Icons
Closes #556
* New Ghost Logo Icon
* New Lightning Icon for plugins screen
* Remove old Ghost Logo Icon
* Moved #ghost to .ghost-logo to clean up conflicts with editor, previously fixed with dodgy overnesting
2013-08-29 19:06:47 +02:00
Hannah Wolfe
ab7da3f5db Pagination unit test updates 2013-08-29 17:04:42 +01:00
John O'Nolan
ce3909d6d9 Updated pagination helper with cleaner markup. 2013-08-29 16:43:47 +01:00
Hannah Wolfe
f318d164d4 Adding Github Flavored Markdown support
closes #422, issue #295

- Added GFM mode to codemirror
- Took the github.js extension for Showdown and added all useful behaviour
- Now supports strikethrough, line breaking and
  multiple underscores, and auto linking urls & emails without breaking
  definition urls
- Also added definition url handling in preparation for #295
- Added unit tests for the extentions individually and integrated with
  showdown
2013-08-29 14:32:09 +01:00
Hannah Wolfe
33cdbb3ea7 Minor tweaks to casperjs tests x 2 2013-08-28 23:39:50 +01:00
Hannah Wolfe
0daea32ff3 Minor tweaks to casperjs tests 2013-08-28 23:27:26 +01:00
Hannah Wolfe
c186ba5c16 Merge pull request #543 from gotdibbs/Issue363
Added CasperJS Functional Test to Build
2013-08-28 15:20:57 -07:00
cobbspur
5c12c78d00 added url handlebars helper
closes #528

- adds method (isPost)to models index.js that returns true if content, content_raw, title and slug are valid properties
- adds url helper which checks context is post using  isPost method
- adds unit test to check a url is prefixed with  /
-adds unit test which checks for empty string if either of the 4 properties above are not present.
2013-08-26 23:58:35 +01:00
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
12d53dead6 Move pagination to class rather than ID
Pagination could conceivably be used in more than one place on a page (eg. both top and bottom). For that reason it should probably have a class rather than an ID.
2013-08-26 02:29:44 +02: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
052aa57360 Merge pull request #512 from gotdibbs/Issue443
Rename /logout/ to /signout/ and /login/ to /signin/
2013-08-25 10:06:53 -07: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
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
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
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
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
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
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
2afa81bc1e Added excerpt helper
closes #471

- strips HTML aggressively
- with unit tests
2013-08-22 15:51:30 +01: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
Hannah Wolfe
3ce7b9d251 Moving misplaced test file 2013-08-20 21:28:19 +01:00
Hannah Wolfe
5ff0a2816b Dropping !image[] & other regex fixes
closes #452

- changed keyboard shortcut to insert ![].. not !image[]
- changed regex in ghostdown to only work for ![]
- added a further regex in ghostdown to properly match for URLs inside the parens
2013-08-20 21:22:41 +01:00
Matthew Harrison-Jones
431fdc70b1 Markup for 404 page
This needs Javascript to vertically center the page.
2013-08-19 16:34:10 +01:00
Hannah Wolfe
fd33b276a0 Merge pull request #419 from jgable/postPermissions
Edit Post Permissions
2013-08-18 12:11:55 -07:00
Jacob Gable
53061a4c04 Fix multiple title slug generation
Change slug generation to not append multiple hyphens
2013-08-18 13:23:15 -05:00
Jacob Gable
bbe5105048 Edit Post Permissions 2013-08-18 12:28:05 -05:00
Matthew Harrison-Jones
39df7a74f7 Add in CasperJS test to check if Dashboard Widgets are moveable
Requires .time-widget
2013-08-16 12:44:33 +01:00
William Dibbern
b92980ce6d Fixed word count grammar
Closes #349
- Added utility function to pluralize when appropriate.
2013-08-11 11:55:42 -05:00
Christopher Giffard
e484d9224e Themes: Added truncation to hbs content helper
Fixes #256

- Developed and linked new module, downsize, for tag-safe truncation
- Altered existing content handler to accept options for truncation
- Added tests for handler

Using truncation:

{{content words=10}}
{{content characters=256}}
2013-08-07 19:45:37 +10:00
Jacob Gable
0238909281 Initial Plugin API Implementation
Implements basic functionality described in #227 for loading plugins
from a specific directory and having a specific workflow with an init()
method and a disable() method.
2013-08-05 11:15:17 -05:00
Hannah Wolfe
338109c762 Data models import, export, and reset for 002
- added line to index.js to set node_env to development if it is not set
 - fixed a small bug with the persistent notifications and used them on debug page from server side
 - added 002 files to manage export and import for 002
 - 002 import is somewhat smarter than 001, merging settings (except version), replacing user & clearing primary keys
 - added reset to models and migration, which does the down operation the same way that init does the up operation
 - import and reset clear session & redirect to login / signup
 - additional unit tests
2013-08-05 13:56:30 +01:00
ErisDS
ec3c322652 Casper tests for CodeMirror editor
There are still some issues surrounding spaces and new lines which will need to be worked out, but we can at least start to test some of the markdown.
2013-08-05 10:31:04 +01:00
Hannah Wolfe
2d8b5ea8c1 Backbone template cleanup
- Ghost.View now extends Ghost.TemplateView giving all views access to subviews and templates
- Views which implemented templates no longer need to
- Some views needed to re-override render which is a bit annoying
- Settings screen now has sub-templates for each pane and for the sidebar
- Additional Casper tests for settings screen
2013-08-03 16:37:06 +01:00
Jacob Gable
d40c08218e Allow theme partials to override helper templates
Added an existence check to the loadTemplates function
2013-08-02 13:36:37 -05:00
Christopher Giffard
d72dab071c Added simple unit tests for ghostdown extensions
(RE: discussion in pull #317)

-   Unit tests enforce well formedness of ghostdown processor function
    and what it returns.
-   Ensures image markup is recognised and replaced accurately.
2013-08-01 16:04:42 +10:00
Hannah Wolfe
2b9be5376e Added functional tests for Ghost Admin UI using Casperjs
Hacky implementation of a suite of casper tests. This is here so that we can start to build up some tests.
Main thing missing is being able to simulate keypresses for CodeMirror
Making the tests run nicely with grunt, travis and be independent rather than interdependent can all come later.
- See tests/functional/base.js for full usage instructions & implementation notes
2013-07-31 08:33:28 +01:00
John O'Nolan
ae348edbdb Merge pull request #293 from matthojo/Remove-Codemirror-CSS
Removed CodeMirror Stylesheet file and moved over required CSS
2013-07-22 04:22:19 -07:00
ErisDS
4fd9556904 Fixing up validation and tests for pagination helper where prev and next are undefined by default, rather than null. 2013-07-17 14:37:52 +01:00
Hannah Wolfe
061c3d6176 Merge pull request #274 from cobbspur/unittesting
improves unit testing for pagination
2013-07-16 12:06:51 -07:00
cobbspur
115996b88d improves unit testing for pagination and fixes pagination partial template (removed extra </nav>)
removes console logs for error handling in testing and travis environments
2013-07-16 19:57:19 +01:00
Matthew Harrison-Jones
ce8ed96348 Removed CodeMirror Stylesheet file and moved over required CSS
Fixes #6.
2013-07-16 12:14:17 +01:00
Matthew Harrison-Jones
7904819556 Initial pass at the user profile page
Fixes #148.
2013-07-15 15:54:13 +01:00
ErisDS
51d75aec9b Docs and tests - closes #235
- fixed the test that the fixture change broke (sort of). We should be using separate fixtures for tests really, unless we want to test something about a Ghost install.
- updated readme with better docs
2013-07-11 23:42:50 +01:00
Hannah Wolfe
30b4eb07f7 App restructure - closes #245
- This is a first pass at getting a more logical structure. The focus is on moving from admin/frontend to client/server.
- The location of the databases is highly important, this isn't expected to change again
In the future
- client/assets should probably become public/
- more stuff should be shared (helpers etc)
- cleanup some confusion around tpl and views
2013-07-11 20:23:34 +01:00
Hannah Wolfe
2b132f32b1 Content helper - closes #254
- return content as a safe string so triple taches are not required
- test for content helper
2013-07-11 17:21:42 +01:00
Hannah Wolfe
6b3f835cfb Rename content fields - closes #253
- rename "content" to "content_raw"
- rename "content_raw" to "content"
- change all references
2013-07-11 16:27:19 +01:00
Hannah Wolfe
5948a3f246 Test cleanup
- redoing test failures with .then(null, done) so that any errors which happen in the previous then are properly caught.
2013-07-11 13:50:31 +01:00
ErisDS
6f8752aa22 HTML helpers refactor - issue #246 items 2 and 5.
- moved template logic out of individual helpers and into Ghost
- simplified template-driven helpers into closures which maintain the context of handlebars
- with handlebars context we have access to data, so don't need to pass data in
- check data to test that it is a simple object and not a function
- moved helpers back into index.js
- provided tests for both template functions in ghost and the nav helper so we are back to where we were
2013-07-11 01:30:29 +01:00
ErisDS
53fe5e3ba3 HTML helpers work with double taches - issue #246 item 1.
- updated navigation and pagination helpers to use SafeString
- nav and pagination don't need triple taches any more
- nav tests updated, and renamed to match helper name
2013-07-11 01:30:29 +01:00
ErisDS
6113a7da90 Test fixes & cleanup
- Removing mocha-as-promised as this seemed to cause problems with later tests.
- Making failure mode for tests consistent.
- increasing timeout for pagination - would love to know why this is needed
2013-07-11 00:01:42 +01:00
Jacob Gable
8545f5806e Switch to grunt-mocha-cli
The grunt-mocha-test task seems to be causing problems with our
beforeEach handlers in some cases. The grunt-mocha-cli task runs the
mocha command using grunt.util.spawn for more consistent results
2013-07-09 18:34:19 -05:00
Hannah Wolfe
85535ae000 issue #228 - slug generation
Some more bits for slug generation
- fixes a bug in generation and some tests
- makes sure that deduplicated slugs get a hyphen before the number
- added %<>|^~£"  to reserved chars
- added a few extra comments
2013-07-08 09:12:23 +01:00
Gabor Javorszky
a6b3851491 Removing multiple hyphens
Closes #228. Also deals with the fact that if there's a trailing hyphen, it no longer removes one extra character.
2013-07-08 08:12:51 +01:00
Jacob Gable
d8d88f40cd Fix slug multiple hyphens and short words
Should close #228 and #238
2013-07-08 07:37:38 +01:00
Jacob Gable
7498b520e4 Increment slug if duplicate
Refactored the generateSlug method to return a promise and check for
existing posts with matching slugs.

Should close #221
2013-06-25 20:48:48 -05:00
Hannah Wolfe
199d15133b Navigation Helper
- renamed helper from ghostNav to nav and file from ghostNav to navigation
- switched template to use current-menu-item as per the styles
- cleaned up several unused items from config, and removed default link to admin
- updated tests
2013-06-25 22:44:34 +01:00
Hannah Wolfe
ba810fb0bb issue #58 - removing the iiwf
Function wrapper and use strict pragma removed from all node files
2013-06-25 13:46:50 +01:00
Hannah Wolfe
d15f1f8961 closes #101 - data model updates
Further changes to the data model to ensure created_by, author_id and updated_by are all set to user 1
Updated settings such that the default type is always 'general', and changed the types in the fixtures to be slightly more useful
Added additional assertions to tests to cover more assumptions about data
2013-06-17 23:59:08 +01:00
Hannah Wolfe
50eb91fe51 issue #165 - reloading settings
- ghost.js - split the settings loading out of ghost.init, so that we have a function for loading / reloading settings
- api.js - implemented a new requestHandler, the cachedSettingsRequestHandler which handles all aspects of local caching for settings when making requests
- app.js - updated the settings api routes to use the new cached request handler
2013-06-17 23:24:05 +01:00
Hannah Wolfe
f58c8eb6c3 Merge pull request #163 from jgable/exportData
Data import and export
2013-06-17 01:19:48 -07:00
Hannah Wolfe
382da5daf0 Adding a test for published at. 2013-06-16 16:09:54 +01:00
Tim Griesser
fad7087cd1 Setting published_at when post changes to published status 2013-06-15 19:24:27 -04:00
Jacob Gable
0c4ccc284b Data import and export 2013-06-15 20:52:32 +00:00
Tim Griesser
a5b9274bb5 adding uuid's for the posts, users, settings 2013-06-15 10:16:20 -04:00
Gabor Javorszky
b0b11573f6 Restricting Admin user creation
Solves #138.
* Removed user and user_roles from fixture
* Restricted user creation to one user. That user is id 1, is admin
* Changed tests so they accommodate for this fact
* Can not create new user (fails on test, flashes on signup)
2013-06-15 10:10:26 +01:00
Hannah Wolfe
b3775feba0 Merge branch 'pr/119'
Conflicts:
	core/admin/assets/js/router.js
	core/admin/views/default.hbs
	core/admin/views/settings.hbs
	core/shared/data/fixtures/001.js
2013-06-09 21:41:07 +01:00
Hannah Wolfe
1df9b6e90a Merge pull request #121 from jgable/filterPriority
Filter priorities
2013-06-09 12:12:04 -07:00
Jacob Gable
55d8ff75b4 Filter priorities
Add the ability to specify a priority level when registering filters.
Also change doFilter to execute filters in priority order.

Closes #86
2013-06-09 11:16:25 -05:00
Jacob Gable
1effc4e772 Implement a permissable interface on models
Added checks to the canThis process for a `permissable()` function
that would allow Models to override the permissions process.
2013-06-08 18:39:24 -05:00
Ricardo Tomasi
c82e5976cc Changes to Settings Model
- add email default setting to fixture
- make settings a single model
- create UNIQUE index on setting keys
2013-06-08 19:24:21 -03:00
Hannah Wolfe
aa659d29b6 JSLint updates - function spacing consistency
- updating grunt-jslint to the latest version
- fixing up function spacing
2013-06-06 21:38:12 +01:00
Hannah Wolfe
60d90967e1 issue 101 - updating the data model
Added & removed many properties as required & fixed tests
Updated & also cleaned up the fixtures, inc images
Added order by published to the findPage query
2013-06-06 21:36:17 +01:00
Jacob Gable
e6f7c706cb Permissions / ACL
- Created Role model
- Created Permission model
- Linked Users->Roles with a belongsToMany relationship
- Linked Permissions to Users and Roles with a belongsToMany relationship
- Created permissions helper with functions for initializing and
  checking permissions (canThis)
- Unit tests for lots of things
2013-06-06 08:15:10 +01:00
ErisDS
278e0cf877 Amending pagination test to have a longer timeout until #110 is done 2013-06-03 10:08:31 +01:00
Tim Griesser
30bd89587f server half of #83, posts are draft by default, browse shows published by default 2013-06-03 00:56:17 -04:00
Tim Griesser
983c171fb0 simplifying the model structure, again 2013-06-01 11:14:05 -04:00
Jacob Gable
a8bf3c962f Ghost.init()
- Modified jsonDataProvider to return promises for findAll and save
- Move the dataProvider initialization into the Ghost.init() function.
- Created basic unit test
2013-05-30 23:39:02 +01:00
ErisDS
237af40f2e Revert "Merge branch 'fat-models' of github.com:tgriesser/Ghost into tgriesser-fat-models"
This reverts commit 611e6a49ef, reversing
changes made to a89dc1d123.
2013-05-30 23:34:53 +01:00
ErisDS
611e6a49ef Merge branch 'fat-models' of github.com:tgriesser/Ghost into tgriesser-fat-models
Conflicts:
	core/admin/assets/sass/layouts/dashboard.scss
	core/admin/views/dashboard.hbs
	core/shared/models/dataProvider.bookshelf.js
2013-05-30 22:23:18 +01:00
Tim Griesser
091790a525 merging with master 2013-05-29 18:26:10 -04:00
Jacob Gable
d81d408eab Fix Travis Errors
- affects #91
- Move dataProvider initialization outside constructor
- Add travis sqlite config that enables debug
- Add grunt-cli installation to travis before_script
2013-05-29 13:32:38 -05:00
Jacob Gable
c699121049 Add ghostNav helper and filter for themes; closes #47 2013-05-27 22:59:01 -05:00
Tim Griesser
a204a96cda a bit of organizing/simplifying/fattening the models 2013-05-27 13:30:03 -04:00
Tim Griesser
e9696fcec2 basic pagination, with tests 2013-05-27 11:24:06 -04:00
Tim Griesser
df23939554 done handler in final then, to ensure errors in last block are reported 2013-05-26 21:39:38 -04:00
Tim Griesser
d98ac4cf4a Merge branch 'add-mocha' into test-cleanup
* add-mocha:
  using grunt validate for npm test, fixing random jslint errors
2013-05-26 21:34:52 -04:00
Tim Griesser
557d81f178 missing a done or two 2013-05-26 20:20:28 -04:00
Tim Griesser
4a318e9a6a using grunt validate for npm test, fixing random jslint errors 2013-05-26 20:15:46 -04:00
Tim Griesser
3446fe7461 using promises correctly in tests 2013-05-26 19:53:44 -04:00
Hannah Wolfe
5b63fcf399 Merge pull request #72 from jgable/errorHandlers
Error handlers and tests
2013-05-26 12:37:49 -07:00
ErisDS
e23381d17b Fixing JSLint and the Mocha api tests 2013-05-26 20:25:17 +01:00
Jacob Gable
ee610c6fc6 Error handlers 2013-05-26 13:51:58 -05:00
Jacob Gable
9ec2396213 Fix JSLInt errors and port existing nodeunit tests to mocha 2013-05-26 12:34:05 -05:00
Jacob Gable
601e261439 Fixing tests and adding settings provider. 2013-05-25 11:48:15 -05:00
Jacob Gable
a758db1c5f Merging with upstream master changes; settings provider 2013-05-24 04:13:32 +00:00
Jacob Gable
242367e228 Bookshelf provider abstraction and tests 2013-05-23 23:02:41 -05:00
Ricardo Tomasi
76891afd08 jslint 2013-05-23 11:00:45 -03:00
Ricardo Tomasi
9e77d32043 Add tests for API/settings 2013-05-23 09:23:35 -03:00
Hannah Wolfe
17d421bfcc Initial commit to GitHub repo 2013-05-11 17:44:25 +01:00