diff --git a/.jscsrc b/.jscsrc index e24512d0..a7d4b061 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,3 +1,4 @@ { - "preset": "ember-suave" + "preset": "ember-suave", + "disallowConstOutsideModuleScope": null } diff --git a/.npmignore b/.npmignore index 49996f5a..076a740e 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 +ember-cli-build.js testem.json diff --git a/LICENSE.md b/LICENSE.md index 00e9fbbf..02000b56 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 +Copyright (c) 2016 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/bower.json b/bower.json index 8c97467f..f8965a58 100644 --- a/bower.json +++ b/bower.json @@ -1,25 +1,10 @@ { "name": "ember-ajax", "dependencies": { - "ember": "1.13.10", - "ember-cli-shims": "0.0.6", - "ember-cli-test-loader": "0.2.1", - "ember-data": "1.13.15", - "ember-load-initializers": "0.1.7", - "ember-qunit": "0.4.16", + "ember": "~2.4.1", + "ember-cli-shims": "0.1.0", + "ember-cli-test-loader": "0.2.2", "ember-qunit-notifications": "0.1.0", - "ember-resolver": "~0.1.20", - "jquery": "1.11.3", - "loader.js": "ember-cli/loader.js#3.2.1", - "qunit": "~1.20.0", - "pretender": "^0.10.1", - "ember-inflector": "~1.3.1", - "lodash": "~3.7.0", - "Faker": "~3.0.0" - }, - "resolutions": { - "pretender": "^0.9.0", - "loader.js": "ember-cli/loader.js#3.4.0", - "qunit": "~1.20.0" + "pretender": "^0.10.1" } } diff --git a/config/ember-try.js b/config/ember-try.js index 3e88bc61..7ded6fc4 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -3,33 +3,52 @@ module.exports = { scenarios: [ { name: 'default', - dependencies: { } + bower: { + dependencies: { } + } + }, + { + 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/ember-cli-build.js b/ember-cli-build.js index 0560dc5e..d8a0ea64 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -7,7 +7,7 @@ module.exports = function(defaults) { }); /* - This build file specifes the options for the dummy test app of this + This build file specifies the options for the dummy test app of this addon, located in `/tests/dummy` This build file does *not* influence how the addon or the app using it behave. You most likely want to be modifying `./index.js` or app's build file diff --git a/package.json b/package.json index 4fab332e..9307410e 100644 --- a/package.json +++ b/package.json @@ -19,24 +19,26 @@ "license": "MIT", "devDependencies": { "broccoli-asset-rev": "^2.2.0", - "ember-cli": "^1.13.13", + "ember-cli": "2.4.3", "ember-cli-app-version": "^1.0.0", "ember-cli-content-security-policy": "0.4.0", - "ember-cli-dependency-checker": "^1.1.0", + "ember-cli-dependency-checker": "^1.2.0", "ember-cli-htmlbars": "^1.0.1", "ember-cli-htmlbars-inline-precompile": "^0.3.1", "ember-cli-inject-live-reload": "^1.3.1", "ember-cli-pretender": "0.5.0", - "ember-cli-qunit": "^1.0.4", + "ember-cli-qunit": "^1.3.0", "ember-cli-release": "0.2.8", - "ember-cli-sri": "^1.2.0", + "ember-cli-sri": "^2.1.0", "ember-cli-uglify": "^1.2.0", - "ember-data": "1.13.15", - "ember-disable-prototype-extensions": "^1.0.0", + "ember-disable-prototype-extensions": "^1.1.0", "ember-disable-proxy-controllers": "^1.0.1", "ember-export-application-global": "^1.0.4", - "ember-suave": "1.2.3", - "ember-try": "~0.0.8" + "ember-load-initializers": "^0.5.0", + "ember-resolver": "^2.0.3", + "ember-suave": "^2.0.1", + "ember-try": "^0.1.2", + "loader.js": "^4.0.0" }, "keywords": [ "ember-addon" diff --git a/testem.js b/testem.js new file mode 100644 index 00000000..5cdd66ac --- /dev/null +++ b/testem.js @@ -0,0 +1,15 @@ +/* jshint node:true */ +/* jscs:disable */ + +module.exports = { + framework: 'qunit', + test_page: 'tests/index.html?hidepassed', + disable_watching: true, + launch_in_ci: [ + 'PhantomJS' + ], + launch_in_dev: [ + 'PhantomJS', + 'Chrome' + ] +}; diff --git a/testem.json b/testem.json deleted file mode 100644 index 0f35392c..00000000 --- a/testem.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "framework": "qunit", - "test_page": "tests/index.html?hidepassed", - "disable_watching": true, - "launch_in_ci": [ - "PhantomJS" - ], - "launch_in_dev": [ - "PhantomJS", - "Chrome" - ] -} diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.js index 8b234d6d..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 'ember/resolver'; -import loadInitializers from 'ember/load-initializers'; +import Resolver from './resolver'; +import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; let App; diff --git a/tests/dummy/app/resolver.js b/tests/dummy/app/resolver.js new file mode 100644 index 00000000..2fb563d6 --- /dev/null +++ b/tests/dummy/app/resolver.js @@ -0,0 +1,3 @@ +import Resolver from 'ember-resolver'; + +export default Resolver; diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js index ed23003d..d4a7ca0f 100644 --- a/tests/helpers/module-for-acceptance.js +++ b/tests/helpers/module-for-acceptance.js @@ -8,16 +8,16 @@ export default function(name, options = {}) { this.application = startApp(); if (options.beforeEach) { - options.beforeEach.apply(this, arguments); + options.beforeEach.call(this, ...arguments); } }, afterEach() { - destroyApp(this.application); - if (options.afterEach) { - options.afterEach.apply(this, arguments); + options.afterEach.call(this, ...arguments); } + + destroyApp(this.application); } }); } diff --git a/tests/helpers/resolver.js b/tests/helpers/resolver.js index ebfb4e4d..b208d38d 100644 --- a/tests/helpers/resolver.js +++ b/tests/helpers/resolver.js @@ -1,4 +1,4 @@ -import Resolver from 'ember/resolver'; +import Resolver from '../../resolver'; import config from '../../config/environment'; const resolver = Resolver.create();