Skip to content

Commit 5b0b447

Browse files
greenkeeper[bot]joshsmith
authored andcommitted
chore(package): update ember-cli to version 2.12.1
Rewrite signup email to use external get/set Update deploy packages to get rid of build deprecations Update ember-cli-test-loader to 2.0.0 Apply new format to helpers/start-app.js Yarn install and change Slack deploy hook
1 parent 5c8f457 commit 5b0b447

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1003
-1594
lines changed

.ember-cli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55

66
Setting `disableAnalytics` to true will prevent any data from being sent.
77
*/
8-
98
"disableAnalytics": false
109
}

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
'plugin:ember-suave/recommended'
1010
],
1111
env: {
12-
'browser': true
12+
browser: true
1313
},
1414
rules: {
1515
'no-console': 'off',

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# See http://help.github.com/ignore-files/ for more about ignoring files.
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
22

33
# compiled output
44
/dist

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
language: node_js
33
node_js:
4-
- "4"
4+
- "6"
55

66
sudo: false
77

app/components/error-formatter.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import Ember from 'ember';
22

3-
const { Component, computed, Object } = Ember;
3+
const {
4+
Component,
5+
computed,
6+
get
7+
} = Ember;
48

59
/**
610
`error-formatter' returns a formatted error message. Place within an 'if'
@@ -37,12 +41,12 @@ export default Component.extend({
3741
@type String
3842
*/
3943
messages: computed('error', function() {
40-
let errorResponse = Object.create(this.get('error'));
41-
let handler = this._findHandler(errorResponse);
44+
let error = get(this, 'error');
45+
let handler = this._findHandler(error);
4246
if (handler) {
43-
return handler(errorResponse);
47+
return handler(error);
4448
} else {
45-
console.error(this.get('error'));
49+
console.error(error);
4650
}
4751
}),
4852

@@ -54,17 +58,17 @@ export default Component.extend({
5458
* @return {Function} Function which takes the error response and returns a list of messages
5559
*/
5660
_findHandler(errorResponse) {
57-
if (errorResponse.get('isFriendlyError')) {
61+
if (get(errorResponse, 'isFriendlyError')) {
5862
return this._friendlyErrorMessages;
59-
} else if (errorResponse.get('isAdapterError')) {
63+
} else if (get(errorResponse, 'isAdapterError')) {
6064
return this._adapterErrorMessages;
61-
} else if (errorResponse.get('error.type') === 'card_error') {
65+
} else if (get(errorResponse, 'error.type') === 'card_error') {
6266
return this._stripeCardErrorMessages;
6367
}
6468
},
6569

6670
_friendlyErrorMessages(errorResponse) {
67-
return (errorResponse.get('errors')).map((e) => `${e.detail}`);
71+
return [get(errorResponse, 'message')];
6872
},
6973

7074
/**
@@ -76,7 +80,7 @@ export default Component.extend({
7680
* @return {Array} Array of message strings
7781
*/
7882
_adapterErrorMessages(errorResponse) {
79-
return (errorResponse.get('errors')).map((e) => `${e.title}: ${e.detail}`);
83+
return (get(errorResponse, 'errors')).map((e) => `${e.title}: ${e.detail}`);
8084
},
8185

8286
/**
@@ -88,6 +92,6 @@ export default Component.extend({
8892
* @return {Array} An array of string messages, containing single string
8993
*/
9094
_stripeCardErrorMessages(errorResponse) {
91-
return [errorResponse.get('error.message')];
95+
return [get(errorResponse, 'error.message')];
9296
}
9397
});

app/components/signup-email-input.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ const {
44
Component,
55
computed,
66
computed: { alias, and, empty, not },
7+
get,
78
inject: { service },
89
observer,
9-
run: { cancel, debounce, once }
10+
run: { cancel, debounce, once },
11+
set
1012
} = Ember;
1113

1214
export default Component.extend({
@@ -34,22 +36,23 @@ export default Component.extend({
3436
isUnavailable: not('isAvailable'),
3537

3638
isSameEmail: computed('cachedEmail', 'email', function() {
37-
return this.get('cachedEmail') === this.get('email');
39+
return get(this, 'cachedEmail') === get(this, 'email');
3840
}),
3941

4042
checkAvailable() {
41-
let email = this.get('email');
43+
let email = get(this, 'email');
4244
this.sendRequest(email).then((result) => {
4345
let { available, valid } = result;
4446
let validation = valid && available;
4547

46-
this.set('cachedEmail', this.get('email'));
47-
this.set('hasCheckedOnce', true);
48-
this.set('isChecking', false);
49-
this.set('isAvailableOnServer', available);
50-
this.set('isValid', valid);
48+
set(this, 'cachedEmail', get(this, 'email'));
49+
set(this, 'hasCheckedOnce', true);
50+
set(this, 'isChecking', false);
51+
set(this, 'isAvailableOnServer', available);
52+
set(this, 'isValid', valid);
53+
54+
set(this, 'canSubmit', validation);
5155

52-
this.set('canSubmit', validation);
5356
this.sendAction('emailValidated', validation);
5457
});
5558
},
@@ -59,7 +62,7 @@ export default Component.extend({
5962
}),
6063

6164
sendRequest(email) {
62-
return this.get('ajax').request('/users/email_available', {
65+
return get(this, 'ajax').request('/users/email_available', {
6366
method: 'GET',
6467
data: {
6568
email
@@ -69,27 +72,27 @@ export default Component.extend({
6972

7073
actions: {
7174
keyDown() {
72-
if (this.get('isNotSameEmail')) {
73-
this.set('isChecking', true);
75+
if (get(this, 'isNotSameEmail')) {
76+
set(this, 'isChecking', true);
7477
}
7578
}
7679
},
7780

7881
_check() {
79-
this.set('isChecking', true);
82+
set(this, 'isChecking', true);
8083

81-
if (this.get('canCheck')) {
82-
cancel(this.get('timer'));
84+
if (get(this, 'canCheck')) {
85+
cancel(get(this, 'timer'));
8386
let deferredAction = debounce(this, function() {
8487
this.checkAvailable();
8588
}, 500);
86-
this.set('timer', deferredAction);
87-
} else if (this.get('isSameEmail') && this.get('isNotEmpty')) {
88-
this.sendAction('emailValidated', this.get('canSubmit'));
89-
this.set('isChecking', false);
89+
set(this, 'timer', deferredAction);
90+
} else if (get(this, 'isSameEmail') && get(this, 'isNotEmpty')) {
91+
this.sendAction('emailValidated', get(this, 'canSubmit'));
92+
set(this, 'isChecking', false);
9093
} else {
9194
this.sendAction('emailValidated', false);
92-
this.set('isChecking', false);
95+
set(this, 'isChecking', false);
9396
}
9497
}
9598
});

app/utils/friendly-error.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { AdapterError } from 'ember-data/adapters/errors';
2-
3-
export default function FriendlyError(message, errors) {
1+
export default function FriendlyError(message) {
42
this.isFriendlyError = true;
5-
AdapterError.call(this, errors, message);
3+
this.message = message;
64
}

config/deploy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = function(deployTarget) {
2929
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
3030
}
3131
ENV.slack = {
32-
webhookURL: 'https://hooks.slack.com/services/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',
32+
webhookURL: 'https://hooks.slack.com/services/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',
3333
username: 'ember-cli-deploy',
3434
iconEmoji: ':rocket:',
3535
}

ember-cli-build.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/*jshint node:true*/
2-
/* global require, module */
3-
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
1+
/* eslint-env node */
2+
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
43

54
module.exports = function(defaults) {
65
var env = EmberApp.env() || 'development';
@@ -46,5 +45,18 @@ module.exports = function(defaults) {
4645
hinting: process.env.EMBER_CLI_TEST_COMMAND || !isProductionLikeBuild
4746
});
4847

48+
// Use `app.import` to add additional libraries to the generated
49+
// output files.
50+
//
51+
// If you need to use different assets in different
52+
// environments, specify an object as the first parameter. That
53+
// object's keys should be the environment name and the values
54+
// should be the asset to use in that environment.
55+
//
56+
// If the library that you are including contains AMD or ES6
57+
// modules that you would like to import into your application
58+
// please specify an object with the list of modules as keys
59+
// along with the exports of each module as its value.
60+
4961
return app.toTree();
5062
};

package.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,26 @@
1616
"devDependencies": {
1717
"broccoli-asset-rev": "^2.4.5",
1818
"coveralls": "^2.11.14",
19-
"ember-ajax": "^2.5.1",
19+
"ember-ajax": "^2.4.1",
2020
"ember-auto-focus": "1.0.5",
2121
"ember-autoresize": "0.5.22",
2222
"ember-can": "^0.8.4",
23-
"ember-cli": "2.11.1",
23+
"ember-cli": "2.12.1",
2424
"ember-cli-app-version": "^2.0.0",
25-
"ember-cli-autoprefixer": "0.6.0",
2625
"ember-cli-babel": "^5.1.7",
2726
"ember-cli-bourbon": "1.2.2",
2827
"ember-cli-code-coverage": "0.3.11",
2928
"ember-cli-dependency-checker": "^1.3.0",
30-
"ember-cli-deploy": "0.6.4",
31-
"ember-cli-deploy-build": "0.1.1",
32-
"ember-cli-deploy-display-revisions": "0.2.2",
33-
"ember-cli-deploy-gzip": "0.2.4",
34-
"ember-cli-deploy-manifest": "0.1.1",
35-
"ember-cli-deploy-revision-data": "0.3.3",
36-
"ember-cli-deploy-s3": "0.4.0",
37-
"ember-cli-deploy-s3-index": "0.5.0",
38-
"ember-cli-deploy-sentry": "0.5.2",
39-
"ember-cli-deploy-slack": "0.1.0",
29+
"ember-cli-deploy": "1.0.0",
30+
"ember-cli-deploy-build": "1.0.0-beta.0",
31+
"ember-cli-deploy-display-revisions": "1.0.0-beta.0",
32+
"ember-cli-deploy-gzip": "1.0.0-beta.0",
33+
"ember-cli-deploy-manifest": "1.0.0-beta.0",
34+
"ember-cli-deploy-revision-data": "1.0.0-beta.0",
35+
"ember-cli-deploy-s3": "1.0.0-beta.0",
36+
"ember-cli-deploy-s3-index": "1.0.0-beta.0",
37+
"ember-cli-deploy-sentry": "^0.5.2",
38+
"ember-cli-deploy-slack": "1.0.0-beta.0",
4039
"ember-cli-dotenv": "1.2.0",
4140
"ember-cli-eslint": "^3.0.3",
4241
"ember-cli-flash": "1.4.2",
@@ -51,18 +50,18 @@
5150
"ember-cli-neat": "0.0.5",
5251
"ember-cli-page-object": "1.8.0",
5352
"ember-cli-password-strength": "1.0.0",
54-
"ember-cli-qunit": "^3.0.1",
53+
"ember-cli-qunit": "^3.1.0",
5554
"ember-cli-release": "^0.2.9",
5655
"ember-cli-sass": "^6.0.0",
5756
"ember-cli-sentry": "^2.4.3",
5857
"ember-cli-shims": "^1.0.2",
5958
"ember-cli-sri": "^2.1.0",
60-
"ember-cli-test-loader": "^1.1.0",
59+
"ember-cli-test-loader": "^2.0.0",
6160
"ember-cli-uglify": "^1.2.0",
6261
"ember-click-outside": "0.1.6",
6362
"ember-composable-helpers": "2.0.0",
6463
"ember-concurrency": "^0.7.11",
65-
"ember-data": "^2.11.1",
64+
"ember-data": "^2.12.0",
6665
"ember-deferred-content": "0.2.0",
6766
"ember-disable-proxy-controllers": "^1.0.1",
6867
"ember-dragula": "1.9.3",
@@ -82,7 +81,7 @@
8281
"ember-simple-auth": "^1.2.1",
8382
"ember-simple-auth-token": "^2.1.0",
8483
"ember-sinon": "0.6.0",
85-
"ember-source": "^2.11.0",
84+
"ember-source": "~2.12.0",
8685
"ember-stripe-elements": "0.1.0-beta.7",
8786
"ember-stripe-service": "4.4.2",
8887
"ember-tether": "0.4.1",
@@ -93,7 +92,7 @@
9392
"ember-watson": "0.8.5",
9493
"emberx-select": "3.0.0",
9594
"eslint-plugin-ember-suave": "^1.0.0",
96-
"loader.js": "^4.0.10",
95+
"loader.js": "^4.2.3",
9796
"normalize.css": "^6.0.0",
9897
"yuidoc-ember-theme": "^1.3.0"
9998
},

testem.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/*jshint node:true*/
1+
/* eslint-env node */
22
module.exports = {
3-
"framework": "qunit",
43
"test_page": "tests/index.html?hidepassed",
54
"disable_watching": true,
65
"launch_in_ci": [

tests/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
env: {
3-
'embertest': true
3+
embertest: true
44
},
55
parserOptions: {
66
ecmaVersion: 8

tests/helpers/start-app.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ const {
88
} = Ember;
99

1010
export default function startApp(attrs) {
11-
let application;
12-
1311
let attributes = merge({}, config.APP);
1412
attributes = merge(attributes, attrs); // use defaults, but you can override;
1513

16-
run(() => {
17-
application = Application.create(attributes);
14+
return run(() => {
15+
let application = Application.create(attributes);
1816
application.setupForTesting();
1917
application.injectTestHelpers();
20-
});
2118

22-
return application;
19+
return application;
20+
});
2321
}

tests/unit/abilities/organization-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { moduleFor, test } from 'ember-qunit';
22

33
moduleFor('ability:organization', 'Unit | Ability | organization', {
44
// Specify the other units that are required for this test.
5-
// needs: ['service:foo']
5+
needs: ['service:current-user']
66
});
77

88
// Replace this with your real tests.

0 commit comments

Comments
 (0)