diff --git a/.editorconfig b/.editorconfig index 47c54384..219985c2 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 08096eff..d421faa3 100644 --- a/.jshintrc +++ b/.jshintrc @@ -27,6 +27,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true, + "esversion": 6, "unused": true } diff --git a/.npmignore b/.npmignore index 49996f5a..fa8b147a 100644 --- a/.npmignore +++ b/.npmignore @@ -1,14 +1,16 @@ -bower_components/ -tests/ -tmp/ -dist/ - +/bower_components +/config/ember-try.js +/dist +/tests +/tmp +**/.gitkeep .bowerrc .editorconfig .ember-cli +.gitignore +.jshintrc +.watchmanconfig .travis.yml -.npmignore -**/.gitkeep bower.json -Brocfile.js -testem.json +ember-cli-build.js +testem.js diff --git a/bower.json b/bower.json index d1e8f298..eb62383d 100644 --- a/bower.json +++ b/bower.json @@ -1,15 +1,8 @@ { "name": "ember-test-selectors", "dependencies": { - "ember": "2.3.0", - "ember-cli-shims": "0.1.0", - "ember-cli-test-loader": "0.2.2", - "ember-load-initializers": "0.1.7", - "ember-qunit-notifications": "0.1.0", - "jquery": "1.11.3", - "loader.js": "^3.5.0" - }, - "resolutions": { - "ember": "2.2.0" + "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 910cf9ad..2743c3b5 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -2,43 +2,47 @@ module.exports = { scenarios: [ { - name: 'default', - dependencies: { } - }, - { - name: 'ember-1-13', - dependencies: { - 'ember': 'components/ember#1.13' - }, - resolutions: { - 'ember': '1.13' + 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' + } } } ] diff --git a/package.json b/package.json index 370280c2..15e3e956 100644 --- a/package.json +++ b/package.json @@ -17,24 +17,25 @@ "author": "", "license": "MIT", "devDependencies": { - "broccoli-asset-rev": "^2.2.0", - "ember-ajax": "0.7.1", - "ember-cli": "2.3.0-beta.1", + "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-sri": "^2.0.0", + "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.3.0", - "ember-disable-prototype-extensions": "^1.0.0", - "ember-disable-proxy-controllers": "^1.0.1", - "ember-export-application-global": "^1.0.4", + "ember-data": "^2.7.0", + "ember-disable-prototype-extensions": "^1.1.0", + "ember-export-application-global": "^1.0.5", "ember-resolver": "^2.0.3", - "ember-try": "~0.0.8", + "loader.js": "^4.0.1", "mocha": "^1.21.4", "mocha-jshint": "^2.3.1" }, diff --git a/testem.json b/testem.js similarity index 81% rename from testem.json rename to testem.js index 0f35392c..26044b2f 100644 --- a/testem.json +++ b/testem.js @@ -1,4 +1,5 @@ -{ +/*jshint node:true*/ +module.exports = { "framework": "qunit", "test_page": "tests/index.html?hidepassed", "disable_watching": true, @@ -9,4 +10,4 @@ "PhantomJS", "Chrome" ] -} +}; diff --git a/tests/.jshintrc b/tests/.jshintrc index 6ec0b7c1..d2bd1134 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/app.js b/tests/dummy/app/app.js index d8e5c713..831ad610 100644 --- a/tests/dummy/app/app.js +++ b/tests/dummy/app/app.js @@ -1,6 +1,6 @@ import Ember from 'ember'; import Resolver from './resolver'; -import loadInitializers from 'ember/load-initializers'; +import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; let App; diff --git a/tests/dummy/app/index.html b/tests/dummy/app/index.html index c9b43270..5120bd73 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 3bba78eb..cdc25787 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 c59bcd53..2529939c 100644 --- a/tests/dummy/config/environment.js +++ b/tests/dummy/config/environment.js @@ -4,7 +4,7 @@ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, - baseURL: '/', + rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { @@ -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 ed23003d..76996fd0 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() { - destroyApp(this.application); - - if (options.afterEach) { - options.afterEach.apply(this, arguments); - } + 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 64cb47e3..f7ff6521 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"}}