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:
Austin Burdine 2015-06-03 00:25:56 -06:00
parent 70b983e167
commit 8332201026
5 changed files with 31 additions and 20 deletions

View File

@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp"]
}

View File

@ -1,16 +1,16 @@
import Ember from 'ember';
import Session from 'simple-auth/session';
import OAuth2 from 'simple-auth-oauth2/authenticators/oauth2';
var AuthenticationInitializer = {
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({
user: Ember.computed(function () {
return container.lookup('store:main').find('user', 'me');
return store.find('user', 'me');
})
});

View File

@ -8,8 +8,8 @@
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "0.1.3",
"ember-data": "1.0.0-beta.18",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.0.2",
"ember-mocha": "0.7.0",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
"ember-resolver": "0.1.15",
"ember-simple-auth": "0.8.0-beta.2",
"fastclick": "1.0.6",

View File

@ -1,9 +1,16 @@
module.exports = {
name: 'asset-delivery',
postBuild: function (results) {
var fs = this.project.require('fs-extra');
module.exports = {
name: 'asset-delivery',
postBuild: function (results) {
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.copySync('./dist/assets', '../built/assets');
}
};
fs.removeSync(templateOut);
fs.removeSync(assetsOut);
fs.ensureDirSync(assetsOut);
cpd.sync(results.directory + '/index.html', templateOut);
cpd.sync(results.directory + '/assets', assetsOut);
}
};

View File

@ -20,19 +20,20 @@
"license": "MIT",
"devDependencies": {
"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-babel": "^4.1.0",
"ember-cli-babel": "^5.0.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-htmlbars": "^0.7.4",
"ember-cli-htmlbars": "0.7.6",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-mocha": "^0.7.0",
"ember-cli-simple-auth": "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-export-application-global": "^1.0.2",
"ember-myth": "0.0.2",