mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -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
70b983e167
commit
8332201026
5 changed files with 31 additions and 20 deletions
3
ghost/admin/.watchmanconfig
Normal file
3
ghost/admin/.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…
Add table
Reference in a new issue