Permalink
Browse files

Update Ember CLI and libraries

  • Loading branch information...
1 parent 8d53eca commit a51b7071092685c93034aedd797072484c03a119 @marcoow marcoow committed Feb 29, 2016
View
@@ -1,4 +1,5 @@
{
"preset": "ember-suave",
- "requireCommentsToIncludeAccess": false
+ "requireCommentsToIncludeAccess": false,
+ "disallowConstOutsideModuleScope": false
}
View
@@ -1,16 +1,17 @@
-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
ember-cli-build.js
-Brocfile.js
testem.json
-node-tests
+node-tests/
View
@@ -1,20 +1,13 @@
{
"name": "ember-simple-auth",
"dependencies": {
- "bootstrap": "~3.3.5",
- "ember": "~2.3.0",
+ "bootstrap": "~3.3.6",
+ "ember": "~2.4.1",
"ember-cli-shims": "0.1.0",
- "ember-cli-test-loader": "0.2.1",
- "ember-load-initializers": "0.1.7",
+ "ember-cli-test-loader": "0.2.2",
"ember-mocha": "~0.8.7",
- "ember-resolver": "~0.1.20",
- "jquery": "1.11.3",
- "loader.js": "ember-cli/loader.js#3.4.0",
"sinonjs": "~1.17.1",
"base64": "~0.3.0",
- "pretender": "^0.10.1"
- },
- "resolutions": {
- "ember": "~2.2.0"
+ "pretender": "^0.12.0"
}
-}
+}
@@ -1,3 +1,4 @@
+/*jshint node:true*/
'use strict';
module.exports = function(/* environment, appConfig */) {
View
@@ -4,7 +4,7 @@ const yuidoc = require('broccoli-yuidoc');
const version = require('git-repo-version')();
const Handlebars = require('handlebars');
const mergeTrees = require('broccoli-merge-trees');
-const merge = require('lodash/object/merge');
+const merge = require('lodash/merge');
var sourceTrees = [];
@@ -9,6 +9,7 @@ describe('Acceptance: ember generate and destroy authenticator', function() {
setupTestHooks(this);
it('generates a torii authenticator', function() {
+ debugger;
return generateAndDestroy(['authenticator', 'application', '--base-class=torii'], {
files: [
{ file: 'app/authenticators/application.js', contains: ['\
@@ -20,7 +21,7 @@ export default Torii.extend({' + EOL + '\
});' + EOL + '\
']}
]
- });
+ }).then(function() { debugger; }, function() { debugger; });
});
it('generates an OAuth 2.0 authenticator', function() {
@@ -0,0 +1,22 @@
+{
+ "name": "my-addon",
+ "version": "0.0.0",
+ "description": "Addon fixture package for ember-cli-blueprint-test-helpers",
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "devDependencies": {
+ "ember-cli": "*",
+ "ember-simple-auth": "*"
+ },
+ "keywords": [
+ "ember-addon"
+ ],
+ "dependencies": {
+ "ember-cli-htmlbars": "*",
+ "ember-cli-babel": "*"
+ },
+ "ember-addon": {
+ "configPath": "tests/dummy/config"
+ }
+}
@@ -0,0 +1,13 @@
+{
+ "name": "my-app",
+ "version": "0.0.0",
+ "description": "App fixture package for ember-cli-blueprint-test-helpers",
+ "private": true,
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "devDependencies": {
+ "ember-cli": "*",
+ "ember-simple-auth": "*"
+ }
+}
@@ -21,7 +21,11 @@ var mocha = new Mocha({
reporter: 'spec'
});
var testFiles = glob.sync(root + '/**/*-test.js');
+/*var jshintPosition = testFiles.indexOf('tests/unit/jshint-test.js');
+var jshint = testFiles.splice(jshintPosition, 1);
+testFiles = jshint.concat(testFiles);
+*/
if (optionOrFile === 'all') {
addFiles(mocha, testFiles);
addFiles(mocha, 'node-tests/**/*-test.js');
View
@@ -21,42 +21,45 @@
"devDependencies": {
"body-parser": "^1.2.0",
"broccoli-asset-rev": "^2.2.0",
- "broccoli-merge-trees": "^0.2.3",
+ "broccoli-merge-trees": "^1.1.1",
"broccoli-yuidoc": "~2.1.0",
- "ember-browserify": "~1.1.4",
- "ember-cli": "1.13.13",
+ "ember-ajax": "0.7.1",
+ "ember-browserify": "~1.1.7",
+ "ember-cli": "2.4.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-base64": "~0.0.1",
- "ember-cli-blueprint-test-helpers": "0.7.0",
- "ember-cli-content-security-policy": "0.4.0",
- "ember-cli-dependency-checker": "^1.1.0",
+ "ember-cli-blueprint-test-helpers": "~0.10.0",
+ "ember-cli-content-security-policy": "~0.5.0",
+ "ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
- "ember-cli-ic-ajax": "0.2.4",
"ember-cli-inject-live-reload": "^1.3.1",
- "ember-cli-internal-test-helpers": "^0.5.0",
- "ember-cli-mocha": "~0.9.7",
+ "ember-cli-internal-test-helpers": "^0.7.0",
+ "ember-cli-mocha": "~0.10.0",
"ember-cli-pretender": "~0.5.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": "~2.3.0",
- "ember-disable-prototype-extensions": "^1.0.0",
+ "ember-data": "2.5.0-beta.3",
+ "ember-disable-prototype-extensions": "^1.1.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
- "ember-sinon": "~0.3.0",
- "ember-suave": "~1.2.2",
- "ember-try": "~0.0.8",
+ "ember-load-initializers": "^0.5.0",
+ "ember-resolver": "^2.0.3",
+ "ember-sinon": "~0.5.0",
+ "ember-suave": "~2.0.1",
+ "ember-try": "^0.1.2",
"express": "^4.12.3",
"git-repo-version": "^0.3.0",
"glob": "^5.0.13",
- "handlebars": "~3.0.3",
- "lodash": "^3.10.1",
+ "handlebars": "~4.0.5",
+ "loader.js": "^4.0.0",
+ "lodash": "^4.5.1",
"marked": "^0.3.5",
"mocha": "^2.4.5",
- "mocha-only-detector": "0.0.2",
+ "mocha-only-detector": "0.1.0",
"morgan": "^1.5.2",
- "rimraf": "^2.3.2",
+ "rimraf": "^2.5.2",
"sinon-chai": "~2.8.0",
"torii": "~0.6.1"
},
@@ -1,5 +1,6 @@
-{
- "framework": "mocha",
+/*jshint node:true*/
+module.exports = {
+ "framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
@@ -9,4 +10,4 @@
"PhantomJS",
"Chrome"
]
-}
+};
@@ -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;
@@ -1,30 +1,28 @@
import Ember from 'ember';
import Torii from 'ember-simple-auth/authenticators/torii';
-import raw from 'ic-ajax';
-const { RSVP } = Ember;
-const { service } = Ember.inject;
+const { inject: { service } } = Ember;
export default Torii.extend({
- torii: service('torii'),
+ torii: service(),
+ ajax: service(),
authenticate() {
- return new RSVP.Promise((resolve, reject) => {
- this._super(...arguments).then((data) => {
- raw({
- url: '/token',
- type: 'POST',
- dataType: 'json',
- data: { 'grant_type': 'facebook_auth_code', 'auth_code': data.authorizationCode }
- }).then((response) => {
- resolve({
- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
- access_token: response.access_token,
- // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
- provider: data.provider
- });
- }, reject);
- }, reject);
+ const ajax = this.get('ajax');
+
+ return this._super(...arguments).then((data) => {
+ return ajax.request('/token', {
+ type: 'POST',
+ dataType: 'json',
+ data: { 'grant_type': 'facebook_auth_code', 'auth_code': data.authorizationCode }
+ }).then((response) => {
+ return {
+ // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
+ access_token: response.access_token,
+ // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
+ provider: data.provider
+ };
+ });
});
}
});
@@ -7,19 +7,19 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
- {{content-for 'head'}}
+ {{content-for "head"}}
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/dummy.css">
- {{content-for 'head-footer'}}
+ {{content-for "head-footer"}}
</head>
<body>
- {{content-for 'body'}}
+ {{content-for "body"}}
<script src="assets/vendor.js"></script>
<script src="assets/dummy.js"></script>
- {{content-for 'body-footer'}}
+ {{content-for "body-footer"}}
</body>
</html>
@@ -0,0 +1,3 @@
+import Resolver from 'ember-resolver';
+
+export default Resolver;
@@ -0,0 +1,27 @@
+import { module } from 'qunit';
+import startApp from '../helpers/start-app';
+import destroyApp from '../helpers/destroy-app';
+
+export default function(name, options = {}) {
+ module(name, {
+ beforeEach() {
+ this.application = startApp();
+
+ if (options.beforeEach) {
+ // jscs:disable requireSpread
+ options.beforeEach.apply(this, arguments);
+ // jscs:enable requireSpread
+ }
+ },
+
+ afterEach() {
+ if (options.afterEach) {
+ // jscs:disable requireSpread
+ options.afterEach.apply(this, arguments);
+ // jscs:enable requireSpread
+ }
+
+ destroyApp(this.application);
+ }
+ });
+}
@@ -1,4 +1,4 @@
-import Resolver from 'ember/resolver';
+import Resolver from '../../resolver';
import config from '../../config/environment';
const resolver = Resolver.create();
View
@@ -7,28 +7,28 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
- {{content-for 'head'}}
- {{content-for 'test-head'}}
+ {{content-for "head"}}
+ {{content-for "test-head"}}
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/dummy.css">
<link rel="stylesheet" href="assets/test-support.css">
- {{content-for 'head-footer'}}
- {{content-for 'test-head-footer'}}
+ {{content-for "head-footer"}}
+ {{content-for "test-head-footer"}}
</head>
<body>
- {{content-for 'body'}}
- {{content-for 'test-body'}}
+ {{content-for "body"}}
+ {{content-for "test-body"}}
+ <script src="testem.js" integrity=""></script>
<script src="assets/vendor.js"></script>
<script src="assets/test-support.js"></script>
<script src="assets/dummy.js"></script>
- <script src="testem.js" integrity=""></script>
<script src="assets/tests.js"></script>
<script src="assets/test-loader.js"></script>
- {{content-for 'body-footer'}}
- {{content-for 'test-body-footer'}}
+ {{content-for "body-footer"}}
+ {{content-for "test-body-footer"}}
</body>
</html>

0 comments on commit a51b707

Please sign in to comment.