MAINT: Upgrade ember to 2.14 (#10)

This commit is contained in:
Matthew Ryan Dillon 2017-07-10 05:41:30 -07:00 committed by GitHub
parent d58b4e218c
commit 4c58b0c331
14 changed files with 84 additions and 62 deletions

13
.eslintrc.js Normal file
View file

@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
};

7
.gitignore vendored
View file

@ -14,6 +14,11 @@
/coverage/* /coverage/*
/libpeerconnection.log /libpeerconnection.log
npm-debug.log* npm-debug.log*
yarn-error.log
testem.log testem.log
.firebaserc .firebaserc
# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try

View file

@ -1,24 +1,21 @@
--- ---
language: node_js language: node_js
node_js: node_js:
- "4" - "6"
sudo: false sudo: false
cache: cache:
directories: directories:
- $HOME/.npm - $HOME/.npm
- $HOME/.cache # includes bowers cache
before_install: before_install:
- npm config set spin false - npm config set spin false
- npm install -g bower phantomjs-prebuilt - npm install -g phantomjs-prebuilt
- bower --version
- phantomjs --version - phantomjs --version
install: install:
- npm install - npm install
- bower install
script: script:
- npm test - npm test

View file

@ -9,7 +9,6 @@ You will need the following things properly installed on your computer.
* [Git](https://git-scm.com/) * [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with NPM) * [Node.js](https://nodejs.org/) (with NPM)
* [Bower](https://bower.io/)
* [Ember CLI](https://ember-cli.com/) * [Ember CLI](https://ember-cli.com/)
* [PhantomJS](http://phantomjs.org/) * [PhantomJS](http://phantomjs.org/)
@ -18,7 +17,6 @@ You will need the following things properly installed on your computer.
* `git clone <repository-url>` this repository * `git clone <repository-url>` this repository
* `cd ccdb-web` * `cd ccdb-web`
* `npm install` * `npm install`
* `bower install`
## Running / Development ## Running / Development

View file

@ -5,8 +5,6 @@ import config from './config/environment';
let App; let App;
Ember.MODEL_FACTORY_INJECTIONS = true;
App = Ember.Application.extend({ App = Ember.Application.extend({
modulePrefix: config.modulePrefix, modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix, podModulePrefix: config.podModulePrefix,

View file

@ -1,9 +1,10 @@
/* jshint node: true */ /* eslint-env node */
'use strict';
module.exports = function(environment) { module.exports = function(environment) {
var ENV = { let ENV = {
modulePrefix: 'ccdb-web', modulePrefix: 'ccdb-web',
environment: environment, environment,
rootURL: '/', rootURL: '/',
locationType: 'auto', locationType: 'auto',
EmberENV: { EmberENV: {

9
config/targets.js Normal file
View file

@ -0,0 +1,9 @@
/* eslint-env node */
module.exports = {
browsers: [
'ie 9',
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
]
};

View file

@ -1,9 +1,10 @@
/*jshint node:true*/ /* eslint-env node */
/* global require, module */ 'use strict';
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) { module.exports = function(defaults) {
var app = new EmberApp(defaults, { let app = new EmberApp(defaults, {
// Add options here // Add options here
}); });

View file

@ -16,39 +16,37 @@
}, },
"devDependencies": { "devDependencies": {
"broccoli-asset-rev": "^2.4.5", "broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1", "ember-ajax": "^3.0.0",
"ember-cli": "2.11.1", "ember-cli": "~2.14.0",
"ember-cli-app-version": "^2.0.0", "ember-cli-app-version": "^3.0.0",
"ember-cli-babel": "^5.1.7", "ember-cli-babel": "^6.3.0",
"ember-cli-dependency-checker": "^1.3.0", "ember-cli-dependency-checker": "^1.3.0",
"ember-cli-flash": "1.3.16", "ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars": "^1.1.1", "ember-cli-flash": "1.4.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.6", "ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.3",
"ember-cli-inject-live-reload": "^1.4.1", "ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^2.0.1", "ember-cli-mirage": "0.3.4",
"ember-cli-mirage": "0.2.1", "ember-cli-qunit": "^4.0.0",
"ember-cli-moment-shim": "2.0.0", "ember-cli-shims": "^1.1.0",
"ember-cli-qunit": "^3.0.1",
"ember-cli-release": "^0.2.9",
"ember-cli-shims": "^1.0.2",
"ember-cli-sri": "^2.1.0", "ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0", "ember-cli-uglify": "^1.2.0",
"ember-data": "^2.11.0", "ember-data": "~2.14.3",
"ember-export-application-global": "^1.0.5", "ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^0.6.0", "ember-inflector": "^2.0.1",
"ember-resolver": "^2.0.3", "ember-load-initializers": "^1.0.0",
"ember-source": "~2.11.0", "ember-resolver": "^4.0.0",
"ember-django-adapter": "1.1.2", "ember-source": "~2.14.0",
"ember-moment": "7.0.0-beta.3", "ember-django-adapter": "1.1.3",
"ember-power-select": "1.0.0-alpha.14", "ember-moment": "7.3.1",
"ember-power-select-with-create": "0.1.10", "ember-power-select": "1.8.5",
"ember-simple-auth": "1.1.0", "ember-power-select-with-create": "0.4.3",
"ember-welcome-page": "^2.0.2", "ember-simple-auth": "1.3.0",
"loader.js": "^4.0.10" "ember-welcome-page": "^3.0.0",
"loader.js": "^4.2.3"
}, },
"engines": { "engines": {
"node": ">= 0.12.0" "node": "^4.5 || 6.* || >= 7.*"
}, },
"private": true "private": true
} }

View file

@ -1,13 +1,12 @@
/*jshint node:true*/ /* eslint-env node */
module.exports = { module.exports = {
"framework": "qunit", test_page: 'tests/index.html?hidepassed',
"test_page": "tests/index.html?hidepassed", disable_watching: true,
"disable_watching": true, launch_in_ci: [
"launch_in_ci": [ 'PhantomJS'
"PhantomJS"
], ],
"launch_in_dev": [ launch_in_dev: [
"PhantomJS", 'PhantomJS',
"Chrome" 'Chrome'
] ]
}; };

5
tests/.eslintrc.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
env: {
embertest: true
}
};

View file

@ -3,7 +3,7 @@ import Ember from 'ember';
import startApp from '../helpers/start-app'; import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app'; import destroyApp from '../helpers/destroy-app';
const { RSVP: { Promise } } = Ember; const { RSVP: { resolve } } = Ember;
export default function(name, options = {}) { export default function(name, options = {}) {
module(name, { module(name, {
@ -17,7 +17,7 @@ export default function(name, options = {}) {
afterEach() { afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments); let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() => destroyApp(this.application)); return resolve(afterEach).then(() => destroyApp(this.application));
} }
}); });
} }

View file

@ -3,16 +3,13 @@ import Application from '../../app';
import config from '../../config/environment'; import config from '../../config/environment';
export default function startApp(attrs) { export default function startApp(attrs) {
let application;
let attributes = Ember.merge({}, config.APP); let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
Ember.run(() => { return Ember.run(() => {
application = Application.create(attributes); let application = Application.create(attributes);
application.setupForTesting(); application.setupForTesting();
application.injectTestHelpers(); application.injectTestHelpers();
return application;
}); });
return application;
} }

View file

@ -1,8 +1,9 @@
import resolver from './helpers/resolver'; import resolver from './helpers/resolver';
import './helpers/flash-message'; import './helpers/flash-message';
import { import {
setResolver setResolver
} from 'ember-qunit'; } from 'ember-qunit';
import { start } from 'ember-cli-qunit';
setResolver(resolver); setResolver(resolver);
start();