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/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
.firebaserc
# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try

View file

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

View file

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

View file

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

View file

@ -1,9 +1,10 @@
/* jshint node: true */
/* eslint-env node */
'use strict';
module.exports = function(environment) {
var ENV = {
let ENV = {
modulePrefix: 'ccdb-web',
environment: environment,
environment,
rootURL: '/',
locationType: 'auto',
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*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
/* eslint-env node */
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
let app = new EmberApp(defaults, {
// Add options here
});

View file

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

View file

@ -1,13 +1,12 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'PhantomJS'
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
launch_in_dev: [
'PhantomJS',
'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 destroyApp from '../helpers/destroy-app';
const { RSVP: { Promise } } = Ember;
const { RSVP: { resolve } } = Ember;
export default function(name, options = {}) {
module(name, {
@ -17,7 +17,7 @@ export default function(name, options = {}) {
afterEach() {
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';
export default function startApp(attrs) {
let application;
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
Ember.run(() => {
application = Application.create(attributes);
return Ember.run(() => {
let application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
return application;
});
return application;
}

View file

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