Commit Graph

324 Commits

Author SHA1 Message Date
Katharina Irrgang
2d19ae2c6c 🔥 😎 remove old migrations (#7887)
refs #7489

- remove old migration code
- this logic was sourced out to knex-migrator
2017-01-25 13:47:49 +00:00
Katharina Irrgang
68741a1106 Revert "🎨 grunt release .knex-migrator" (#7874)
refs #7489
2017-01-23 12:33:03 +01:00
Katharina Irrgang
c8c696f659 🎨 grunt release .knex-migrator (#7591)
no issue
- the file was not copied over for the release
- @TODO: different solution?
2016-10-24 10:18:04 +01:00
Hannah Wolfe
b729597bf5 🔥 Remove the contributor list from Gruntfile (#7428)
refs #7427

- Moving all release-specific code out of the core repository
- Also found a different way to do this, without needing API access :)
2016-09-26 07:16:55 -05:00
kirrg001
8115d83782 🔥 remove postgres support
refs #1333, refs #5878, refs #5321
2016-09-20 15:59:34 +01:00
kirrg001
13f7d51213 🔥 remove ensureConfig from Gruntfile
refs #6982
[ci skip]
2016-09-20 15:59:34 +01:00
Hannah Wolfe
470000242d 🛠 Make it easy to test preparing dependencies (#7335)
no issue

- as part of a release, we run npm dedupe, npm prune and npm shrinkwrap. In certain cases this can change which dependencies are used
- with this change `grunt deps` will run those 3 tasks so it's easier to test what happens
2016-09-14 15:57:50 +02:00
Katharina Irrgang
a5840753fc 🚨 increase mocha timeout globally (#7378)
no issue
2016-09-14 14:16:57 +01:00
Katharina Irrgang
8c1e5fbc61 🐛 add missing dependency lodash.orderBy (#7333)
no issue
2016-09-14 11:22:16 +01:00
Austin Burdine
03d4137b86 Move remainder of ember tasks to client repo (#7172)
* Updating Ghost-Admin: Gruntfile work

* move remainder of ember tasks to client repo

refs #6977
- move ember build tasks to client repo
- remove unneeded dependencies
2016-08-07 11:53:28 +02:00
Austin Burdine
77464c59bd improve Ghost contributor tooling (#7042)
refs #6977
- update client ref
- add gh-contrib-list dependency
- remove buildAboutPage task
2016-07-22 12:53:48 +01:00
Katharina Irrgang
3f3ed61273 improvement: travis server (#7032)
no issue
- do not build client when running server tests
2016-07-20 04:39:40 -06:00
Austin Burdine
14c3d0e9ef Merge pull request #7006 from kevinansfield/subgrunt-init
Use subgrunt to install client dependencies
2016-06-18 15:11:35 -04:00
Kevin Ansfield
706d47fb5b Use subgrunt to install client dependencies
closes https://github.com/TryGhost/Ghost/pull/7005, requires https://github.com/TryGhost/Ghost-Admin/pull/79
- defers to client's Gruntfile to install client dependencies, avoids requirement for a global bower install
2016-06-18 18:35:51 +01:00
kirrg001
250d571fe6 improvement: jshint/jscs
no issue
- add mocha option to jshintrc, no need to define globals in files anymore
- call client grunt commands in case of jshint/jscs
2016-06-17 22:59:47 +02:00
Hannah Wolfe
6d0b4ba03c Merge pull request #6952 from kirrg001/fix/mocha-coverage
fix: require overrides for mocha coverage
2016-06-09 12:33:35 +01:00
Hannah Wolfe
0c44353e7a Merge pull request #6943 from kirrg001/improvement/single-test-with-autocompletion
improvement: offer a way to run single test with bash file completion
2016-06-09 12:28:54 +01:00
kirrg001
658efd1a23 fix: require overrides for mocha coverage 2016-06-09 13:01:35 +02:00
Kevin Ansfield
1c0cbffa5b Move client linting to Ghost-Admin
no issue
- remove client-related lint config
- add `lint-all` task that uses subgrunt to also run client's lint task
2016-06-09 09:16:39 +01:00
kirrg001
ac677e3c43 improvement: run single test with bash file completion 2016-06-08 17:35:29 +02:00
Hannah Wolfe
3991446df1 Add dedupe to release process
no issue
- This seems to be needed between dedupe & shrinkwrap in certain circumstances
2016-06-06 13:52:45 +01:00
Hannah Wolfe
80a79172c4 Revert "Revert "Force UTC at process level"" 2016-06-03 09:06:18 +01:00
Hannah Wolfe
78e693f469 Revert "Force UTC at process level" 2016-06-02 14:38:02 +01:00
kirrg001
ec176c243a Force UTC at process level
issues #6406 #6399
- all dates are stored as UTC with this commit
- use moment.tz.setDefault('UTC')
- add migration file to recalculate local datetimes to UTC
- store all dates in same format into our three supported databases
- add option to remeber migrations inside settings (core)
- support DST offset for migration
- ensure we force UTC in test env
- run whole migration as transaction
- extend: Settings.findOne function
2016-06-02 13:23:09 +02:00
Hannah Wolfe
685ceac324 Exclude fix for grunt coverage task
no issue

- fixes grunt coverage task which was erroring with the message: 'Fatal error: spawn Unknown system errno 7'
- using glob matching results in expanding to cover every file with -x in the mocha command,
this was causing some sort of overflow type error.
- we can just exclude the directory and this is much quicker & makes more sense
2016-06-01 12:53:59 +01:00
kirrg001
85e21223ce improvement: run single test with mochacli 2016-05-25 09:12:23 +02:00
Kevin Ansfield
30b3ccc387 Drop .bowerrc, move bower install into ember:init task
no issue
- perform `bower install` alongside `npm install` in the `ember:init` task - every usage of `shell:bower` was immediately preceded by `shell:ember:init` so it makes sense to move all ember initialisation steps into the one grunt command
- remove `.bowerrc` file so that the standard ember conventions of `npm install && bower install` inside the client directory work without ending up with folders such as `core/client/core/client/bower_components/*`

This does have the effect of causing `bower install` from the root dir to fail with `bower ENOENT No bower.json present`. As far as I can tell we have not documented running `bower install` manually anywhere and I believe the new behaviour matches the expected behaviour more closely as well adding more consistency to the way client-side dependencies are installed.
2016-05-23 16:59:42 +01:00
Kevin Ansfield
d22fe2385f Fix order of subtasks in grunt init
no issue
- moves the `update_submodules` task to be first to ensure we the client code is in place ready for the ember/bower tasks
2016-05-19 16:13:52 +01:00
Kevin Ansfield
1a52502472 Revert "Temp add minification in grunt for prod JS files" 2016-05-12 18:20:08 +02:00
Jason Williams
7a8c064c42 deps: grunt@1.0.1 + related updates
- Gets all grunt dependencies in line with the
  grunt 1.0 release.
- deps: grunt-cli@1.2.0.
- deps: grunt-bg-shell@2.3.3.
- deps: grunt-contrib-clean@1.0.0.
- deps: grunt-contrib-compress@1.2.0.
- deps: grunt-contrib-copy@1.0.0.
- deps: grunt-contrib-jshint@1.0.0.
- deps: grunt-contrib-watch@1.0.0.
- deps: grunt-docker@0.0.11.
- deps: grunt-express-server@0.5.3.
- deps: grunt-jscs@2.8.0.
- deps: grunt-mocha-cli@2.1.0.
- deps: grunt-mocha-istanbul@4.0.2.
- deps: grunt-shell@1.3.0.
- deps: istanbul@0.4.3.
2016-04-28 09:18:27 -05:00
Hannah Wolfe
f5fe772c09 Temp add minification in grunt for prod JS files
no issue

- This is required due to a bug in ember-cli, see: ember-cli/ember-cli#5795
2016-04-14 10:34:14 +01:00
Jason Williams
7559bb7b26 Fix test conflicts
Closes #6710
- Restore config to baseline before testing.
- Don't mutate fixture data.
2016-04-13 11:27:26 -05:00
Hannah Wolfe
6b74e1a34a Dev tooling clean up
- remove old casper.js tests
- cleanup mochacli groups that are less useful than `grunt test:path`
- improve inline Gruntfile.js docs
- fixup coverage for new internal apps
- add new coverage-all task which works for all our tests
- reverse order of master-warn messages to make this clearer
- remove bluebird from greenkeeper ignores
2016-04-13 13:21:33 +01:00
Austin Burdine
1181707a9d move private-blogging functionality into an internal app
closes #5914, #6589
- moves all private-blogging related code & tests into /server/apps/private-blogging/
- rework Grunt to run private-blogging tests
- modify server apps code to have a place for internal apps
2016-04-11 08:58:41 -05:00
Jason Williams
9fe573a0c5 Refactor content deletion
- Simplify the `init` method in `models/index.js` so that it no longer
  returns a promise. Easier to use.
- Eliminates the `deleteAllContent` method from `models/index.js` as it
  can all be handled at the API layer in a single spot.
- Optimize `destroyAllContent` in `api/db.js`. Eliminates
  double-fetching every post from the database and converting it to
  JSON. Also only fetches ids from the database instead of the entire
  model.
- Eliminates the custom static method `destroy` in the Post model in
  favor of handling detaching tag relations in a single place (the
  `destroying` event). This also eliminates a big source of unneeded
  database round trips--needing to get post ids to feed into
  `Post.destroy()` which then re-fetches the post again.
2016-03-22 10:10:09 -05:00
Hannah Wolfe
398b07c9c2 Fetch about page images properly
- Apparently I really didn't test this very well...
... turns out I was looking at the built assets folder instead of the client/public folder
... and this wasn't working at all
😭
2016-02-18 13:49:42 +00:00
Hannah Wolfe
c301510cd1 Refactor gravatarLookup, remove request dependency
no issue

- request is quite a heavy dependency
- we were only using request in 3 places: a test, storing contrib images in the gruntfile & the gravatar lookup
- all 3 are relatively simple to do with the http/https module
- refactored all 3, removed request
2016-02-16 11:12:01 +00:00
JT Turner
1f4c01d207 Started moving meta data fetching to functions.
issue #6186
- Moved asset helper logic to a asset url function.
- Created author image function to be used in ghost_head helper.
- Created author url function to be used in the ghost_head helper.
- Created canonical url function to be used in the ghost_head helper.
- Moved meta_description helper logic to a function.
- Moved excerpt helper logic to a function.
- Created an index in data/meta to be used in ghost_head helper to get all data.
- Created keyword function to be used in the ghost_head helper.
- Created modified data function to be used in the ghost_head helper.
- Created next url function to be used in the ghost_head helper.
- Created ogType function to be used in the ghost_head helper.
- Created previous url function to be used in the ghost_head helper.
- Created published data function to be used in the ghost_head helper.
- Created rss url function to be used in the ghost_head helper.
- Created schema function to be used in the ghost_head helper.
- Created structured data function to be used in the ghost_head helper.
- Moved meta_title helper logic to a title function.
- Moved url helper logic to a url function.
- Wrote tests for all the new functions

This is just the first step. I plan on refactoring the ghost head to use these new functions.
2016-01-23 13:58:21 -08:00
Hannah Wolfe
323b57b439 Release should run all prod tasks
refs #6150

For some reason, release was only set to do the ember prod task, not all prod tasks
This ensures ghost-url gets minified and included as well as future proofing any other prod tasks
2015-12-15 21:33:10 +00:00
Austin Burdine
8f89997deb minify ghost.url.api in production
closes #6150
- clean up ghost.url.api script
- switch to inlining config and making the ghost-url.js file an external request
- add minification in production
2015-12-10 08:46:58 -06:00
Hannah Wolfe
739c7d36ed Streamline when grunt init is called in tests
- test-server only needs submodules to be updated
2015-12-04 19:53:50 +00:00
Kevin Ansfield
4a32098b64 Install client dependencies when running TEST_SUITE=lint build
refs #6161
- run the client initialization tasks as part of the `TEST_SUITE=lint` to fix problems with missing `ember-suave` jscs preset
2015-12-04 09:58:03 +00:00
Kevin Ansfield
a102eff0ed Separate the server/client/lint test suites on Travis
no issue
- add separate grunt tasks for validating all/client/server test suites
- modify `grunt validate` to respect the `TEST_SUITE` env var if present
- default to `TEST_SUITE=server` on Travis
- add an individual builds to the Travis matrix that test the client and run linting as separate jobs
- don't run `ensureConfig` task if we're performing client-only tests

Previously we were duplicating the client tests and linting for every node and database version in our build matrix. Duplicating those tasks a waste of time/resources as the client tests are now completely isolated from the server and so different node/database versions have no effect. This PR is an attempt at removing the duplication to speed up our Travis runs.
2015-11-30 15:21:08 +00:00
Kevin Ansfield
3d6856614f Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Sebastian Gierlinger
ac53fc9c3f Merge pull request #6119 from boennemann/chore-grunt-release
Dynamically build file patterns for release task
2015-11-24 11:14:08 +01:00
Stephan Bönnemann
c22c866e93 Dynamically build file patterns for release task
- converted release task to function task
- dynamically setting config for copy task by reading `.npmignore` on demand
- speeds up all other tasks because `.npmignore` is no longer read from filesystem
2015-11-23 22:45:48 +01:00
Hannah Wolfe
2aa16514a3 Rename post_count to count.posts
refs  #6009

- This is a straight rename, no functionality is added
- The dot syntax requires pre/post processing to convert the name
- This PR also includes several updates to the tests, as they weren't being run as part of Travis!
2015-11-20 14:59:58 +00:00
Austin Burdine
250edf2b06 add themes ajax helper
closes #5942
- adds helper script for calling the api in themes
- adds tests for said helper script
2015-11-19 07:13:54 -06:00
Hannah Wolfe
9c691f6d05 Don't run Casper.js tests by default
- remove casper tests from `grunt validate`
- the tests are still in the codebase & runnable manually for now
2015-10-12 18:01:52 +01:00
Gabor Javorszky
309356e90c Make grunt test fail if no filename provided
Closes #5885

Instead of hiding a notice in a sea of printed stack traces among the
eventual error, this change will cause grunt test to halt and output an
error message with some helpful info as to what went wrong.
2015-09-27 18:30:59 +01:00