Skip to content

Commit

Permalink
Merge pull request #62 from LevelbossMike/upgrade-ember-cli
Browse files Browse the repository at this point in the history
Upgrade ember-cli to 2.5.0
  • Loading branch information
LevelbossMike committed Apr 21, 2016
2 parents 13a07ee + 96894bc commit d0993c9
Show file tree
Hide file tree
Showing 19 changed files with 147 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp"]
"ignore_dirs": ["tmp", "dist"]
}
17 changes: 5 additions & 12 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{
"name": "ember-cli-deploy-s3-index",
"dependencies": {
"ember": "1.13.7",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.8",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
"ember-qunit": "0.4.9",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.18",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.2.1",
"qunit": "~1.18.0"
"ember": "~2.5.0",
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0"
}
}
}
52 changes: 36 additions & 16 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,54 @@
/*jshint node:true*/
module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
bower: {
dependencies: { }
}
},
{
name: 'ember-1.13',
bower: {
dependencies: {
'ember': '~1.13.0'
},
resolutions: {
'ember': '~1.13.0'
}
}
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
bower: {
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
}
},
{
name: 'ember-beta',
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
bower: {
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
}
}
},
{
name: 'ember-canary',
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
bower: {
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
}
}
}
]
Expand Down
1 change: 1 addition & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*jshint node:true*/
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
7 changes: 4 additions & 3 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-addon');
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberApp(defaults, {
var app = new EmberAddon(defaults, {
// Add options here
});

/*
This build file specifes the options for the dummy test app of this
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
Expand Down
42 changes: 22 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,33 @@
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.1.2",
"broccoli-asset-rev": "^2.4.2",
"chai": "^3.3.0",
"chai-as-promised": "^5.1.0",
"ember-cli": "1.13.8",
"ember-cli-app-version": "0.5.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.0.1",
"ember-cli-htmlbars": "0.7.9",
"ember-cli-htmlbars-inline-precompile": "^0.2.0",
"ember-cli-ic-ajax": "0.2.1",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "^1.0.0",
"ember-cli-release": "0.2.3",
"ember-cli-sri": "^1.0.3",
"ember-cli": "2.5.0",
"ember-ajax": "0.7.1",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
"ember-cli-qunit": "^1.4.0",
"ember-cli-release": "0.2.8",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "1.13.8",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.3",
"ember-try": "0.0.6",
"github": "^0.2.4",
"glob": "^5.0.15",
"mocha": "^2.3.3",
"mocha-jshint": "^2.3.1",
"multiline": "^1.0.2"
"multiline": "^1.0.2",
"ember-data": "^2.5.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"ember-try": "^0.2.2",
"loader.js": "^4.0.1"
},
"keywords": [
"ember-addon",
Expand All @@ -51,11 +53,11 @@
"dependencies": {
"aws-sdk": "^2.1.48",
"core-object": "^1.1.0",
"ember-cli-babel": "^5.1.3",
"ember-cli-babel": "^5.1.6",
"ember-cli-deploy-plugin": "^0.2.1",
"mime-types": "^2.1.9"
},
"ember-addon": {
"configPath": "tests/dummy/config"
}
}
}
13 changes: 13 additions & 0 deletions testem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*jshint node:true*/
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
]
};
8 changes: 4 additions & 4 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

var App;
let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver: Resolver
Resolver
});

loadInitializers(App, config.modulePrefix);
Expand Down
8 changes: 4 additions & 4 deletions tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for 'head'}}
{{content-for "head"}}

<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/dummy.css">

{{content-for 'head-footer'}}
{{content-for "head-footer"}}
</head>
<body>
{{content-for 'body'}}
{{content-for "body"}}

<script src="assets/vendor.js"></script>
<script src="assets/dummy.js"></script>

{{content-for 'body-footer'}}
{{content-for "body-footer"}}
</body>
</html>
3 changes: 3 additions & 0 deletions tests/dummy/app/resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Resolver from 'ember-resolver';

export default Resolver;
2 changes: 1 addition & 1 deletion tests/dummy/app/router.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ember from 'ember';
import config from './config/environment';

var Router = Ember.Router.extend({
const Router = Ember.Router.extend({
location: config.locationType
});

Expand Down
8 changes: 8 additions & 0 deletions tests/helpers/assert.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');

chai.use(chaiAsPromised);

module.exports = chai.assert;
5 changes: 5 additions & 0 deletions tests/helpers/destroy-app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Ember from 'ember';

export default function destroyApp(application) {
Ember.run(application, 'destroy');
}
23 changes: 23 additions & 0 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { module } from 'qunit';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';

export default function(name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();

if (options.beforeEach) {
options.beforeEach.apply(this, arguments);
}
},

afterEach() {
if (options.afterEach) {
options.afterEach.apply(this, arguments);
}

destroyApp(this.application);
}
});
}
4 changes: 2 additions & 2 deletions tests/helpers/resolver.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Resolver from 'ember/resolver';
import Resolver from '../../resolver';
import config from '../../config/environment';

var resolver = Resolver.create();
const resolver = Resolver.create();

resolver.namespace = {
modulePrefix: config.modulePrefix,
Expand Down
6 changes: 3 additions & 3 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import Application from '../../app';
import config from '../../config/environment';

export default function startApp(attrs) {
var application;
let application;

var attributes = Ember.merge({}, config.APP);
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;

Ember.run(function() {
Ember.run(() => {
application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
Expand Down
19 changes: 10 additions & 9 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,28 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for 'head'}}
{{content-for 'test-head'}}
{{content-for "head"}}
{{content-for "test-head"}}

<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/dummy.css">
<link rel="stylesheet" href="assets/test-support.css">

{{content-for 'head-footer'}}
{{content-for 'test-head-footer'}}
{{content-for "head-footer"}}
{{content-for "test-head-footer"}}
</head>
<body>
{{content-for "body"}}
{{content-for "test-body"}}

{{content-for 'body'}}
{{content-for 'test-body'}}
<script src="testem.js" integrity=""></script>
<script src="assets/vendor.js"></script>
<script src="assets/test-support.js"></script>
<script src="assets/dummy.js"></script>
<script src="testem.js"></script>
<script src="assets/tests.js"></script>
<script src="assets/test-loader.js"></script>

{{content-for 'body-footer'}}
{{content-for 'test-body-footer'}}
{{content-for "body-footer"}}
{{content-for "test-body-footer"}}
</body>
</html>
2 changes: 1 addition & 1 deletion tests/unit/index-nodetest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var CoreObject = require('core-object');
var Promise = require('ember-cli/lib/ext/promise');
var assert = require('ember-cli/tests/helpers/assert');
var assert = require('./../helpers/assert');

var stubProject = {
name: function(){
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lib/s3-nodetest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var assert = require('ember-cli/tests/helpers/assert');
var assert = require('./../../helpers/assert');

describe('s3', function() {
var S3, mockUi, s3Client, plugin, subject, options, listParams, headParams, copyParams, revisionsData, currentData;
Expand Down

0 comments on commit d0993c9

Please sign in to comment.