mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
updates Ember-CLI to 0.2.7
No issue - moves the authentication initializer to be an instance initializer - updates dependencies - fixes error with asset-delivery not copying - fixes problem with testing by re-building ember before casper tests
This commit is contained in:
parent
189814cd32
commit
5e7ff40318
6 changed files with 34 additions and 23 deletions
|
@ -636,7 +636,7 @@ var _ = require('lodash'),
|
||||||
// details of each of the test suites.
|
// details of each of the test suites.
|
||||||
//
|
//
|
||||||
grunt.registerTask('test-all', 'Run tests and lint code',
|
grunt.registerTask('test-all', 'Run tests and lint code',
|
||||||
['test-routes', 'test-module', 'test-unit', 'test-integration', 'shell:ember:test', 'test-functional']);
|
['test-routes', 'test-module', 'test-unit', 'test-integration', 'test-ember', 'test-functional']);
|
||||||
|
|
||||||
// ### Lint
|
// ### Lint
|
||||||
//
|
//
|
||||||
|
@ -734,7 +734,7 @@ var _ = require('lodash'),
|
||||||
);
|
);
|
||||||
|
|
||||||
// ### Ember unit tests *(sub task)*
|
// ### Ember unit tests *(sub task)*
|
||||||
// `grunt testem` will run just the ember unit tests
|
// `grunt test-ember` will run just the ember unit tests
|
||||||
grunt.registerTask('test-ember', 'Run the ember unit tests',
|
grunt.registerTask('test-ember', 'Run the ember unit tests',
|
||||||
['test-setup', 'shell:ember:test']
|
['test-setup', 'shell:ember:test']
|
||||||
);
|
);
|
||||||
|
@ -758,7 +758,7 @@ var _ = require('lodash'),
|
||||||
// The purpose of the functional tests is to ensure that Ghost is working as is expected from a user perspective
|
// The purpose of the functional tests is to ensure that Ghost is working as is expected from a user perspective
|
||||||
// including buttons and other important interactions in the admin UI.
|
// including buttons and other important interactions in the admin UI.
|
||||||
grunt.registerTask('test-functional', 'Run functional interface tests (CasperJS)',
|
grunt.registerTask('test-functional', 'Run functional interface tests (CasperJS)',
|
||||||
['test-setup', 'cleanDatabase', 'express:test', 'spawnCasperJS', 'express:test:stop', 'test-functional-setup']
|
['test-setup', 'shell:ember:dev', 'cleanDatabase', 'express:test', 'spawnCasperJS', 'express:test:stop', 'test-functional-setup']
|
||||||
);
|
);
|
||||||
|
|
||||||
// ### Functional tests for the setup process
|
// ### Functional tests for the setup process
|
||||||
|
|
3
core/client/.watchmanconfig
Normal file
3
core/client/.watchmanconfig
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"ignore_dirs": ["tmp"]
|
||||||
|
}
|
|
@ -1,16 +1,16 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
import Session from 'simple-auth/session';
|
|
||||||
import OAuth2 from 'simple-auth-oauth2/authenticators/oauth2';
|
|
||||||
|
|
||||||
var AuthenticationInitializer = {
|
var AuthenticationInitializer = {
|
||||||
name: 'authentication',
|
name: 'authentication',
|
||||||
before: 'simple-auth',
|
|
||||||
after: 'registerTrailingLocationHistory',
|
|
||||||
|
|
||||||
initialize: function (container) {
|
initialize: function (instance) {
|
||||||
|
var store = instance.container.lookup('store:main'),
|
||||||
|
Session = instance.container.lookup('simple-auth-session:main'),
|
||||||
|
OAuth2 = instance.container.lookup('simple-auth-authenticator:oauth2-password-grant');
|
||||||
|
|
||||||
Session.reopen({
|
Session.reopen({
|
||||||
user: Ember.computed(function () {
|
user: Ember.computed(function () {
|
||||||
return container.lookup('store:main').find('user', 'me');
|
return store.find('user', 'me');
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
|
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
|
||||||
"ember-cli-test-loader": "0.1.3",
|
"ember-cli-test-loader": "0.1.3",
|
||||||
"ember-data": "1.0.0-beta.18",
|
"ember-data": "1.0.0-beta.18",
|
||||||
"ember-load-initializers": "ember-cli/ember-load-initializers#0.0.2",
|
|
||||||
"ember-mocha": "0.7.0",
|
"ember-mocha": "0.7.0",
|
||||||
|
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
|
||||||
"ember-resolver": "0.1.15",
|
"ember-resolver": "0.1.15",
|
||||||
"ember-simple-auth": "0.8.0-beta.2",
|
"ember-simple-auth": "0.8.0-beta.2",
|
||||||
"fastclick": "1.0.6",
|
"fastclick": "1.0.6",
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'asset-delivery',
|
name: 'asset-delivery',
|
||||||
postBuild: function (results) {
|
postBuild: function (results) {
|
||||||
var fs = this.project.require('fs-extra');
|
var fs = this.project.require('fs-extra'),
|
||||||
|
cpd = this.project.require('ember-cli-copy-dereference'),
|
||||||
|
templateOut = '../server/views/default.hbs',
|
||||||
|
assetsOut = '../built/assets';
|
||||||
|
|
||||||
fs.copySync(results.directory + '/index.html', '../server/views/default.hbs');
|
fs.removeSync(templateOut);
|
||||||
fs.copySync('./dist/assets', '../built/assets');
|
fs.removeSync(assetsOut);
|
||||||
}
|
fs.ensureDirSync(assetsOut);
|
||||||
};
|
|
||||||
|
cpd.sync(results.directory + '/index.html', templateOut);
|
||||||
|
cpd.sync(results.directory + '/assets', assetsOut);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -20,19 +20,20 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"broccoli-asset-rev": "^2.0.2",
|
"broccoli-asset-rev": "^2.0.2",
|
||||||
"ember-cli": "0.2.2",
|
"ember-cli": "0.2.7",
|
||||||
"ember-cli-app-version": "0.3.3",
|
"ember-cli-app-version": "0.3.3",
|
||||||
"ember-cli-babel": "^4.1.0",
|
"ember-cli-babel": "^5.0.0",
|
||||||
"ember-cli-content-security-policy": "0.4.0",
|
"ember-cli-content-security-policy": "0.4.0",
|
||||||
"ember-cli-dependency-checker": "0.0.8",
|
"ember-cli-copy-dereference": "1.0.0",
|
||||||
|
"ember-cli-dependency-checker": "^1.0.0",
|
||||||
"ember-cli-fastclick": "1.0.3",
|
"ember-cli-fastclick": "1.0.3",
|
||||||
"ember-cli-htmlbars": "^0.7.4",
|
"ember-cli-htmlbars": "0.7.6",
|
||||||
"ember-cli-ic-ajax": "0.1.1",
|
"ember-cli-ic-ajax": "0.1.1",
|
||||||
"ember-cli-inject-live-reload": "^1.3.0",
|
"ember-cli-inject-live-reload": "^1.3.0",
|
||||||
"ember-cli-mocha": "^0.7.0",
|
"ember-cli-mocha": "^0.7.0",
|
||||||
"ember-cli-simple-auth": "0.8.0-beta.2",
|
"ember-cli-simple-auth": "0.8.0-beta.2",
|
||||||
"ember-cli-simple-auth-oauth2": "0.8.0-beta.2",
|
"ember-cli-simple-auth-oauth2": "0.8.0-beta.2",
|
||||||
"ember-cli-uglify": "1.0.1",
|
"ember-cli-uglify": "^1.0.1",
|
||||||
"ember-data": "1.0.0-beta.18",
|
"ember-data": "1.0.0-beta.18",
|
||||||
"ember-export-application-global": "^1.0.2",
|
"ember-export-application-global": "^1.0.2",
|
||||||
"ember-myth": "0.0.2",
|
"ember-myth": "0.0.2",
|
||||||
|
|
Loading…
Reference in a new issue