Commit Graph

210 Commits

Author SHA1 Message Date
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
Hannah Wolfe
0127dd9e6c Adding size param to contrib images
no issue
- reduces filesize significantly, whilst not impacting quality
2014-09-25 10:53:20 +01:00
Matt Enlow
d4bf80430c Update top-gh-contribs to get contributors within last 90 days
Closes #4130
2014-09-24 22:57:45 -06:00
Fabian Becker
a6cf795029 Fixes sass:compress
no ref
- Use absolute path for compress/sourceMap
2014-09-22 01:21:46 +02:00
Hannah Wolfe
94feb8616a Adds grunt lint task for code style checking
no issue

- convenience function runs both jshint and jscs
2014-09-19 15:52:48 +01: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
Julien Gilli
454abc51ce Support --reporter and --reporter-output when running tests.
When running any Grunt task that runs tests with Mocha, the two
following command line options are now supported:
- --reporter: allows to specify a reporter, default is 'spec'.
- --reporter-output: allows to specify a file where Mocha's output will
  be stored.

These two command line options make it easier to retrieve and parse test
results when tests are run on a continuous integration platform like
Jenkins.

Fixes #4038.
2014-09-17 15:46:39 -07:00
Paul Adam Davis
9b94e71805 Static nanoscroller integration
References #1892

A static integration of https://github.com/jamesflorentino/nanoScrollerJS



This is WIP with the goal of getting feedback on and deciding how we should integrate this into Ghost.
2014-09-14 17:15:57 +01:00
Matt Enlow
12cb93e333 Merge pull request #3953 from halfdan/2666-jshint-test
Apply JSHint to test files.
2014-09-03 13:40:01 -06:00
Fabian Becker
bc558cf0d2 Apply JSHint to test files.
closes #2666
- Add new jshint:test task
- Fix jshint errors
2014-09-03 20:33:58 +02:00
Hannah Wolfe
95a7e36c84 Merge pull request #3945 from novaugust/smart-contributors
Smarter `buildAboutPage` task
2014-09-03 18:19:32 +01:00
Matt Enlow
891e55c265 Smarter buildAboutPage task
No issue
- Only run the buildAboutPage task if the `-contributors.hbs` template doesn't exist,
- ... or if the `--force` option is supplied on the CLI
- Adds the contributors img dir and the contributors template to `grunt clean:built` task
2014-09-03 08:10:42 -06:00
Matt Enlow
7ed7c6653b grunt dev calls default task
Closes #3942
2014-09-02 21:14:32 -06:00
Matt Enlow
737ea3f65e Implement About Ghost page
Closes #3568
- Deleted html placeholders in client
- Added new grunt task, buildAboutPage, which 1)creates -contributors.hbs partial and 2) downloads contributor avatars
- buildAboutPage is called by anything that does an emberTemplates task
- Removed unused code from ghostpaths
2014-09-02 13:49:01 -06:00
Hannah Wolfe
2a843c309e Adding Grunt tasks for Sass 2014-08-31 14:16:58 +01:00
Harry Wolff
583c7970d9 Move config module to be instance based and merge bootstrap into config.
helps with #827, otherwise no issue

- This is general code clean-up and unification.
- Merges code from bootstrap.js into config module as they were both
concerned with managing the config file and as such should be in one
location.
- Updates all relevant tests.
2014-08-23 15:54:43 -04:00
Harry Wolff
5ff2a31ce1 Move Models module to have an init method that sets up all models
resolves #2170

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

- Updates all tests to reflect the new structure of the model module
2014-08-18 15:54:10 -04:00
Hannah Wolfe
103ae008aa Merge pull request #3608 from JayBeavers/fixAzureStdin
Fix Azure compatibility issue around stdin in Gruntfile.js
2014-08-18 19:40:37 +01:00
Pedro Teixeira
c68859cde9 Add --allow-root for ghost_ui grunt task
closes #3753
2014-08-11 21:47:45 +02:00
Hannah Wolfe
140ee3d5e9 Escaping parens in grunt command paths
fixes #3206
2014-08-08 16:14:15 +01:00
Hannah Wolfe
9293c76786 Fix grunt commands to work with spaces in path
closes #3206

- We were escaping paths for the bower commands, but this didn't work on
  windows
- Use the same pattern for the coverage command
2014-08-06 23:17:14 +01:00
Hannah Wolfe
1c83f00ec5 Removing client files from release 2014-08-06 02:01:30 +01:00
sessa
8ce4546e2c Incorrect livereload watch path. 2014-08-05 20:26:42 -04:00
Jay Beavers
d0b1414597 Fix Azure compatibility issue around stdin in Gruntfile.js 2014-08-05 14:07:01 -07:00
Hannah Wolfe
8bfbf13248 Update to release process
- Release does all init & prod tasks necessary to create a full build
- Don't create or include .map files
- Don't include pre-minified prod files
- Don't include export .json files
- Don't include client/html
2014-08-04 22:12:23 +01:00
Paul Adam Davis
3e2533d182 Update Ghost-UI with grunt init
Closes #3554

- Adds a shell command to update Ghost-UI
2014-08-02 12:25:28 +01:00
Jason Williams
a285a561c4 Include development assets in release build.
Closes #3498
2014-08-01 13:48:15 +00:00
Matt Enlow
21abed7f9a Add User Role Dropdown
Closes #3402, Closes #3428

-------------------

 ### Components
- Added GhostSelectComponent to handle async select creation (h/t @rwjblue)
- Added GhostRolesSelector (extends GhostSelect) for displaying user role options
- Created StoreInjector for surgically inserting the store into things that normally wouldn't have them.

 ### Users Settings
- InviteNewUserModal now uses GhostRolesSelector & defaults to Author
- The role dropdown for user settings has permissions set per 3402

 ### User Model
- Added `role` property as an interface to getting and setting `roles`
- Refactored anything that set `roles` to set `role`
- isAdmin, isAuthor, isOwner and isEditor are all keyed off of `role` now

 ### Tests
- Added functional tests for Settings.Users
- updated settings.users and settings.users.user screens
- fix spacing on screens

 ### Server Fixtures
- Fixed owner fixture's roles
2014-07-30 17:59:14 -06:00
Sebastian Gierlinger
d895238571 Add XSS prevention
closes #3387
- added placeholder for <script> and <iframe>
- added google-caja sanitizer
- changed title in posts overview to ‚double-stash‘
2014-07-27 23:03:01 +02:00
Marco Otte-Witte
6406acef5c updated Ember Simple Auth to latest version 2014-07-25 16:04:19 +02:00
Hannah Wolfe
63efa541bd Merge pull request #3367 from jaswilli/issue-3161
Get Ember Admin ready for production
2014-07-23 04:47:19 +01:00
Harry Wolff
be37070fb6 This aims to speed up both the ghost application and tests by
migration from usage of config() to just an object of config.

no relevant issue

- Change 'loadConfig' task to 'ensureConfig' to more accurately reflect
what it is actually doing.  Its sole purpose is to make sure a `config.js`
 file exists, and as such the name now reflects that purpose.

- Update config/index.js to export the ghostConfig object directly
so that it can be accessed from other modules

- Update all references of config(). to config.
This was a blind global find all and replace, treat it as such.

- Fixes to tests to support new config access method

- Allow each test to still work when invoked invidually
2014-07-22 22:37:44 -04:00
Jason Williams
7ae48f1dd3 Get Ember Admin ready for production
Closes #3161
- Add a config.js file for the client which is used to configure
  Ember.Application during runtime. The correct version of config.js
  is copied into place by grunt via the copy:(dev|prod) task from
  either config-dev.js or config-prod.js.
- Serve minified and production versions of libraries where applicable
  including handlebars-runtime and ember-prod.
- Bundle third party libraries into vendor.min.js.
- Bundle Ghost's Ember app and templates into ghost.min.js
- Remove all fixture data and code from the client.
2014-07-22 22:33:49 +00:00
Sebastian Gierlinger
05b3606fd3 Remove inline script from default.hbs
no issue
- added config values as data attributes
- removed inline script
- removed current-user.js
2014-07-21 20:00:54 +02:00
Hannah Wolfe
cf9839c71d Integration tests use consistent teardown methods 2014-07-21 13:25:51 +01:00
Gabor Javorszky
aca0c7daf6 Added example to run a specific integration test to gruntfile
No issue
2014-07-20 15:11:02 +01:00
Jason Williams
979c3f237c Prevent loading setup screen if already setup
Closes #3145
- Prevent navigation to the setup screen if Ghost setup
  has previously been completed.
- Fix templates that were incorrectly using foreach instead of each.
- Add validation for minimum password length.
- Fix up functional tests and split out tests for setup to a separate
  instance of casper because setup requires a new database.
- Add a cleanDatabase task to grunt which resets the database to
  new.
2014-07-16 15:54:42 +00:00
Jesse Tane
371b6bcf54 update grunt-shell to 0.7.0
grunt: pass --allow-root to bower

fixes #3232
2014-07-10 00:18:56 -04:00
Hannah Wolfe
bf1ff2ac0d Improve ember casper test stability
fixes #3171, fixes #2382, refs #3130

- Moved grunt init from travis into grunt validate, this makes sure we get verbose output from grunt init.
- Added `grunt test` task to run just the tests without building if you want
- Upgraded grunt-contrib-concat and added nonull property (had to switch to src/dist for this to work) #2382
- Upgraded bower to 1.3.5, which appears to resolve #3171
- Changed bower git assets to all be referenced the same and removed resolutions again #3130
2014-07-01 13:35:50 +01:00
Hannah Wolfe
9214f25dee Merge pull request #3165 from ErisDS/issue-3056
Replace the old admin with the ember admin
2014-07-01 09:04:22 +01:00
Hannah Wolfe
f70f99b5cf Replace the old admin with the ember admin
closes #3056

- Remove clientold
- Remove clientold tests
- Cleanup old admin helpers
- Remove old routes from admin and controllers from admin controller
- Comment out / remove old and broken tests
- Cleanup Gruntfile.js, bower.js, package.json etc

Still TODO:

- cleanup / add removed tests
- do we still need countable?
2014-07-01 08:33:17 +01:00
Matt Enlow
a82e6e8040 Use Device.js to determine mobile editor use
Ref #2570
- Adds new library, device.js to determine if the user is on an ios mobile
  or tablet.
2014-06-30 18:27:43 -06:00
Hannah Wolfe
48a2f9c70d Merge pull request #3144 from darvelo/sort-new-posts
New posts pass PostsController sorting function at the top
2014-06-30 16:23:51 +01:00
Sebastian Gierlinger
c8e8da4780 oAuth
closes #2759
closes #3027

- added oauth2orize library for server side oAuth handling
- added ember-simple-auth library for admin oAuth handling
- added tables for client, accesstoken and refreshtoken
- implemented RFC6749 4.3 Ressouce Owner Password Credentials Grant
- updated api tests with oAuth
- removed session, authentication is now token based

Known issues:
- Restore spam prevention #3128
- Signin after Signup #3125
- Signin validation #3125

**Attention**
- oldClient doesn't work with this PR anymore, session authentication
was
removed
2014-06-30 14:58:10 +02:00
David Arvelo
a958a66c4c New posts pass PostsController sorting function at the top
- PostsController orderBy function sorts posts with isNew to the top, otherwise their undefined dates fail to compare
- also catch when `updated_at` is undefined, happens when model is being written with results from the server
- catch objects of type Error in validation engine, helps catching client errors
- join server errors with BR tag in ajax util
- add `emberBuild` task to `grunt test-functional`
- add a test helper, `thenTransitionAndWaitForScreenLoad`, to test transitioning to major parts of the app
- add a test that transitions from Content to the Editor, and back to Content
2014-06-29 21:49:32 -04:00
Matt Enlow
3011834177 Add --init param to update_submodules grunt task
Closes #3141
2014-06-27 11:05:09 -06:00
David Arvelo
6658675646 Implement Mobile Editor
closes #2957
- add FastClick library to Gruntfile.js
- add touch-editor to client/assets/lib/
- add mobile-specific utils to util/mobile-utils.js
- add codemirror util to set up TouchEditor only if we're really on mobile
- change gh-codemirror from having a default action to a named action. prevents Ember.TextArea firing action on change
- change gh-codemirror `cm.getDoc().getValue()` to `cm.getValue()` for portability
- change codemirror-shortcuts ES6 export/import style
- changed ghostimagepreview.js to check for Ember.touchEditor in addition to Ghost.touchEditor
2014-06-24 18:33:43 -04:00
Maurice Williams
4c72c318d5 Re-implementing the loading indicator for the Ember admin
closes #2855 , closes #2848
- New  mixin that utilizes NProgress for displaying a loading indictor for all routes who's model issue a "loading" event (aka: when requesting data from the server during a route change).
- Also removing (the now unnecessary) "loading" template.
2014-06-23 10:01:33 -04:00
Hannah Wolfe
d159a5cced Merge pull request #3002 from novaugust/shortcuts
Implement Shortcuts in Ember
2014-06-21 15:15:50 +01:00
Hannah Wolfe
962accfec7 Functional tests for Ember
issue #2989

- Adds lodash for bind and isNumber - looking for a better solution for this
- Still needs the editor and flow tests porting
- Some of the tests are commented out awaiting further implementations
2014-06-20 15:20:59 +01:00