Skip to content

Commit

Permalink
Run ember init after ember-cli upgrade. (#202)
Browse files Browse the repository at this point in the history
Ember CLI was upgraded in #201.
  • Loading branch information
Ben Limmer authored and offirgolan committed Jun 1, 2016
1 parent 2f3ad1f commit e76871f
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 46 deletions.
21 changes: 11 additions & 10 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
bower_components/
tests/
tmp/
dist/
docs/

/bower_components
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.codeclimate.yml
.editorconfig
.ember-cli
.gitignore
.jshintrc
.watchmanconfig
.travis.yml
.npmignore
**/.gitkeep
bower.json
Brocfile.js
testem.json
ember-cli-build.js
testem.js
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "ember-cp-validations",
"dependencies": {
"ember": "2.3.1",
"ember-cli-shims": "0.1.0",
"ember": "~2.5.0",
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0",
"moment": ">= 2.8.0",
Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright 2016, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/

/* jshint node:true */
'use strict';

module.exports = function( /* environment, appConfig */ ) {
Expand Down
3 changes: 2 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* Copyright 2016, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/

/*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@
],
"license": "BSD-3-Clause",
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "^2.0.0-beta.2",
"ember-cli": "2.5.1",
"ember-cli-app-version": "^1.0.0",
"ember-cli-blanket": "0.9.4",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-github-pages": "^0.0.8",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-moment-shim": "1.3.0",
"ember-cli-qunit": "^2.0.2",
"ember-cli-release": "^1.0.0-beta.1",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-cli-yuidoc": "0.8.3",
"ember-data": "^2.3.0",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-data": "^2.5.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-moment": "6.1.0",
"ember-resolver": "^2.0.3",
Expand All @@ -73,7 +73,7 @@
"model"
],
"dependencies": {
"ember-cli-babel": "^5.1.5",
"ember-cli-babel": "^5.1.6",
"ember-cli-version-checker": "^1.1.4",
"ember-getowner-polyfill": "^1.0.1",
"exists-sync": "0.0.3",
Expand Down
9 changes: 2 additions & 7 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
/**
* Copyright 2016, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/

import Ember from 'ember';
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
2 changes: 1 addition & 1 deletion tests/dummy/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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
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
11 changes: 4 additions & 7 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import Ember from 'ember';
import Application from '../../app';
import Router from '../../router';
import config from '../../config/environment';

const assign = Ember.assign || Ember.merge;

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

var attributes = assign({}, config.APP);
attributes = assign(attributes, attrs); // use defaults, but you can override;
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
17 changes: 9 additions & 8 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<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">
Expand Down Expand Up @@ -43,13 +43,14 @@
}
</style>

{{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>
Expand All @@ -59,7 +60,7 @@
<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>

0 comments on commit e76871f

Please sign in to comment.