From 3e58aed42bea2ef598fd8d7030ef232bc3263584 Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Fri, 12 Aug 2016 08:17:38 -0400 Subject: [PATCH] Update ember-cli to 2.7.0, ember init --- .editorconfig | 14 ------------ .jshintrc | 2 +- .travis.yml | 17 +++++++++------ bower.json | 5 ++--- config/ember-try.js | 2 +- package.json | 30 +++++++++++++------------- tests/.jshintrc | 2 +- tests/dummy/app/index.html | 8 +++---- tests/dummy/app/router.js | 3 ++- tests/dummy/config/environment.js | 5 ++--- tests/helpers/module-for-acceptance.js | 12 +++++------ tests/index.html | 17 +++++++-------- 12 files changed, 52 insertions(+), 65 deletions(-) diff --git a/.editorconfig b/.editorconfig index 47c5438..219985c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,22 +13,8 @@ insert_final_newline = true indent_style = space indent_size = 2 -[*.js] -indent_style = space -indent_size = 2 - [*.hbs] insert_final_newline = false -indent_style = space -indent_size = 2 - -[*.css] -indent_style = space -indent_size = 2 - -[*.html] -indent_style = space -indent_size = 2 [*.{diff,md}] trim_trailing_whitespace = false diff --git a/.jshintrc b/.jshintrc index 08096ef..d421faa 100644 --- a/.jshintrc +++ b/.jshintrc @@ -27,6 +27,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true, + "esversion": 6, "unused": true } diff --git a/.travis.yml b/.travis.yml index caf4b7c..68b59ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "0.12" + - "4" sudo: false @@ -11,7 +11,7 @@ cache: env: - EMBER_TRY_SCENARIO=default - - EMBER_TRY_SCENARIO=ember-1-13 + - EMBER_TRY_SCENARIO=ember-1.13 - EMBER_TRY_SCENARIO=ember-release - EMBER_TRY_SCENARIO=ember-beta - EMBER_TRY_SCENARIO=ember-canary @@ -22,14 +22,17 @@ matrix: - env: EMBER_TRY_SCENARIO=ember-canary before_install: - - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH - - "npm config set spin false" - - "npm install -g npm@^2" + - npm config set spin false + - npm install -g bower + - bower --version + - npm install phantomjs-prebuilt + - phantomjs --version install: - - npm install -g bower - npm install - bower install script: - - ember try $EMBER_TRY_SCENARIO test + # Usually, it's ok to finish the test scenario without reverting + # to the addon's original dependency state, skipping "cleanup". + - ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup diff --git a/bower.json b/bower.json index 3f792d4..a32946d 100644 --- a/bower.json +++ b/bower.json @@ -1,9 +1,8 @@ { "name": "ember-scroll-operator", "dependencies": { - "ember": "~2.4.1", - "ember-cli-shims": "0.1.0", - "ember-cli-test-loader": "0.2.2", + "ember": "~2.7.0", + "ember-cli-shims": "0.1.1", "ember-qunit-notifications": "0.1.0" } } diff --git a/config/ember-try.js b/config/ember-try.js index 7ded6fc..014f603 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -8,7 +8,7 @@ module.exports = { } }, { - name: 'ember-1-13', + name: 'ember-1.13', bower: { dependencies: { 'ember': '~1.13.0' diff --git a/package.json b/package.json index 46f2369..2b673d0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "ember build", "start": "ember server", - "test": "ember try:testall" + "test": "ember try:each" }, "repository": "https://github.com/bttf/ember-scroll-operator", "engines": { @@ -18,26 +18,26 @@ "author": "", "license": "MIT", "devDependencies": { - "broccoli-asset-rev": "^2.2.0", - "ember-ajax": "0.7.1", - "ember-cli": "2.4.2", + "broccoli-asset-rev": "^2.4.2", + "ember-ajax": "^2.0.1", + "ember-cli": "2.7.0", "ember-cli-app-version": "^1.0.0", "ember-cli-dependency-checker": "^1.2.0", - "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-qunit": "^1.2.1", - "ember-cli-release": "0.2.8", + "ember-cli-inject-live-reload": "^1.4.0", + "ember-cli-jshint": "^1.0.0", + "ember-cli-qunit": "^2.0.0", + "ember-cli-release": "^0.2.9", "ember-cli-sri": "^2.1.0", + "ember-cli-test-loader": "^1.1.0", "ember-cli-uglify": "^1.2.0", - "ember-data": "^2.4.0", + "ember-data": "^2.7.0", "ember-disable-prototype-extensions": "^1.1.0", - "ember-disable-proxy-controllers": "^1.0.1", - "ember-export-application-global": "^1.0.4", - "ember-load-initializers": "^0.5.0", + "ember-export-application-global": "^1.0.5", + "ember-load-initializers": "^0.5.1", "ember-resolver": "^2.0.3", - "ember-try": "^0.1.2", - "loader.js": "^4.0.0" + "loader.js": "^4.0.1" }, "keywords": [ "ember-addon", @@ -46,7 +46,7 @@ "browser history" ], "dependencies": { - "ember-cli-babel": "^5.1.5" + "ember-cli-babel": "^5.1.6" }, "ember-addon": { "configPath": "tests/dummy/config" diff --git a/tests/.jshintrc b/tests/.jshintrc index 6ec0b7c..d2bd113 100644 --- a/tests/.jshintrc +++ b/tests/.jshintrc @@ -47,6 +47,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true, + "esversion": 6, "unused": true } diff --git a/tests/dummy/app/index.html b/tests/dummy/app/index.html index c9b4327..5120bd7 100644 --- a/tests/dummy/app/index.html +++ b/tests/dummy/app/index.html @@ -9,16 +9,16 @@ {{content-for "head"}} - - + + {{content-for "head-footer"}} {{content-for "body"}} - - + + {{content-for "body-footer"}} diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.js index 936b281..d4d3d4b 100644 --- a/tests/dummy/app/router.js +++ b/tests/dummy/app/router.js @@ -2,7 +2,8 @@ import Ember from 'ember'; import config from './config/environment'; const Router = Ember.Router.extend({ - location: config.locationType + location: config.locationType, + rootURL: config.rootURL }); Router.map(function() { diff --git a/tests/dummy/config/environment.js b/tests/dummy/config/environment.js index 07db5ce..2529939 100644 --- a/tests/dummy/config/environment.js +++ b/tests/dummy/config/environment.js @@ -4,8 +4,8 @@ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, - baseURL: '/', - locationType: 'hash', + rootURL: '/', + locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build @@ -29,7 +29,6 @@ module.exports = function(environment) { if (environment === 'test') { // Testem prefers this... - ENV.baseURL = '/'; ENV.locationType = 'none'; // keep test console output quieter diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js index 8c8b74e..76996fd 100644 --- a/tests/helpers/module-for-acceptance.js +++ b/tests/helpers/module-for-acceptance.js @@ -1,23 +1,23 @@ import { module } from 'qunit'; +import Ember from 'ember'; import startApp from '../helpers/start-app'; import destroyApp from '../helpers/destroy-app'; +const { RSVP: { Promise } } = Ember; + export default function(name, options = {}) { module(name, { beforeEach() { this.application = startApp(); if (options.beforeEach) { - options.beforeEach.apply(this, arguments); + return options.beforeEach.apply(this, arguments); } }, afterEach() { - if (options.afterEach) { - options.afterEach.apply(this, arguments); - } - - destroyApp(this.application); + let afterEach = options.afterEach && options.afterEach.apply(this, arguments); + return Promise.resolve(afterEach).then(() => destroyApp(this.application)); } }); } diff --git a/tests/index.html b/tests/index.html index 64cb47e..f7ff652 100644 --- a/tests/index.html +++ b/tests/index.html @@ -10,9 +10,9 @@ {{content-for "head"}} {{content-for "test-head"}} - - - + + + {{content-for "head-footer"}} {{content-for "test-head-footer"}} @@ -21,12 +21,11 @@ {{content-for "body"}} {{content-for "test-body"}} - - - - - - + + + + + {{content-for "body-footer"}} {{content-for "test-body-footer"}}