Skip to content

Commit 88a505c

Browse files
authored
Merge pull request #871 from Turbo87/new-module-imports
Use "New Module Imports"
2 parents f35ca47 + 29e9fe2 commit 88a505c

Some content is hidden

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

82 files changed

+388
-291
lines changed

app/adapters/category-slug.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import ApplicationAdapter from './application';
21
import Ember from 'ember';
2+
import { underscore, decamelize } from '@ember/string';
3+
4+
import ApplicationAdapter from './application';
35

46
export default ApplicationAdapter.extend({
57
pathForType(modelName) {
6-
let decamelized = Ember.String.underscore(
7-
Ember.String.decamelize(modelName)
8+
let decamelized = underscore(
9+
decamelize(modelName)
810
);
911
return Ember.String.pluralize(decamelized);
1012
}

app/app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import Ember from 'ember';
2-
import Resolver from './resolver';
1+
import Application from '@ember/application';
32
import loadInitializers from 'ember-load-initializers';
3+
4+
import Resolver from './resolver';
45
import config from './config/environment';
56

6-
let App = Ember.Application.extend({
7+
let App = Application.extend({
78
modulePrefix: config.modulePrefix,
89
podModulePrefix: config.podModulePrefix,
910
Resolver

app/components/api-token-row.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
2+
import { empty, or } from '@ember/object/computed';
23

3-
export default Ember.Component.extend({
4-
emptyName: Ember.computed.empty('api_token.name'),
5-
disableCreate: Ember.computed.or('api_token.isSaving', 'emptyName'),
4+
export default Component.extend({
5+
emptyName: empty('api_token.name'),
6+
disableCreate: or('api_token.isSaving', 'emptyName'),
67
serverError: null,
78

89
didInsertElement() {

app/components/badge-appveyor.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
import { alias } from '@ember/object/computed';
24

3-
export default Ember.Component.extend({
5+
export default Component.extend({
46
tagName: 'span',
57
classNames: ['badge'],
6-
repository: Ember.computed.alias('badge.attributes.repository'),
7-
branch: Ember.computed('badge.attributes.branch', function() {
8+
9+
repository: alias('badge.attributes.repository'),
10+
11+
branch: computed('badge.attributes.branch', function() {
812
return this.get('badge.attributes.branch') || 'master';
913
}),
10-
service: Ember.computed('badge.attributes.service', function() {
14+
15+
service: computed('badge.attributes.service', function() {
1116
return this.get('badge.attributes.service') || 'github';
1217
}),
13-
text: Ember.computed('badge', function() {
18+
19+
text: computed('badge', function() {
1420
return `Appveyor build status for the ${ this.get('branch') } branch`;
1521
})
1622
});

app/components/badge-codecov.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
import { alias } from '@ember/object/computed';
24

3-
export default Ember.Component.extend({
5+
export default Component.extend({
46
tagName: 'span',
57
classNames: ['badge'],
6-
repository: Ember.computed.alias('badge.attributes.repository'),
7-
branch: Ember.computed('badge.attributes.branch', function() {
8+
repository: alias('badge.attributes.repository'),
9+
branch: computed('badge.attributes.branch', function() {
810
return this.get('badge.attributes.branch') || 'master';
911
}),
10-
service: Ember.computed('badge.attributes.service', function() {
12+
service: computed('badge.attributes.service', function() {
1113
return this.get('badge.attributes.service') || 'github';
1214
}),
13-
text: Ember.computed('branch', function() {
15+
text: computed('branch', function() {
1416
return `CodeCov coverage status for the ${ this.get('branch') } branch`;
1517
})
1618
});

app/components/badge-coveralls.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
import { alias } from '@ember/object/computed';
24

3-
export default Ember.Component.extend({
5+
export default Component.extend({
46
tagName: 'span',
57
classNames: ['badge'],
6-
repository: Ember.computed.alias('badge.attributes.repository'),
7-
branch: Ember.computed('badge.attributes.branch', function() {
8+
repository: alias('badge.attributes.repository'),
9+
branch: computed('badge.attributes.branch', function() {
810
return this.get('badge.attributes.branch') || 'master';
911
}),
10-
service: Ember.computed('badge.attributes.service', function() {
12+
service: computed('badge.attributes.service', function() {
1113
return this.get('badge.attributes.service') || 'github';
1214
}),
13-
text: Ember.computed('branch', function() {
15+
text: computed('branch', function() {
1416
return `Coveralls coverage status for the ${ this.get('branch') } branch`;
1517
})
1618
});

app/components/badge-gitlab.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
import { alias } from '@ember/object/computed';
24

3-
export default Ember.Component.extend({
5+
export default Component.extend({
46
tagName: 'span',
57
classNames: ['badge'],
6-
repository: Ember.computed.alias('badge.attributes.repository'),
7-
branch: Ember.computed('badge.attributes.branch', function() {
8+
repository: alias('badge.attributes.repository'),
9+
branch: computed('badge.attributes.branch', function() {
810
return this.get('badge.attributes.branch') || 'master';
911
}),
10-
text: Ember.computed('badge', function() {
12+
text: computed('badge', function() {
1113
return `GitLab build status for the ${ this.get('branch') } branch`;
1214
})
1315
});
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
import { alias } from '@ember/object/computed';
24

3-
export default Ember.Component.extend({
5+
export default Component.extend({
46
tagName: 'span',
57
classNames: ['badge'],
6-
repository: Ember.computed.alias('badge.attributes.repository'),
7-
text: Ember.computed('badge', function() {
8+
repository: alias('badge.attributes.repository'),
9+
text: computed('badge', function() {
810
return `Is It Maintained average time to resolve an issue`;
911
})
10-
});
12+
});
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
import { alias } from '@ember/object/computed';
24

3-
export default Ember.Component.extend({
5+
export default Component.extend({
46
tagName: 'span',
57
classNames: ['badge'],
6-
repository: Ember.computed.alias('badge.attributes.repository'),
7-
text: Ember.computed('badge', function() {
8+
repository: alias('badge.attributes.repository'),
9+
text: computed('badge', function() {
810
return `Is It Maintained percentage of issues still open`;
911
})
1012
});

app/components/badge-travis-ci.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import Ember from 'ember';
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
import { alias } from '@ember/object/computed';
24

3-
export default Ember.Component.extend({
5+
export default Component.extend({
46
tagName: 'span',
57
classNames: ['badge'],
6-
repository: Ember.computed.alias('badge.attributes.repository'),
7-
branch: Ember.computed('badge.attributes.branch', function() {
8+
repository: alias('badge.attributes.repository'),
9+
branch: computed('badge.attributes.branch', function() {
810
return this.get('badge.attributes.branch') || 'master';
911
}),
10-
text: Ember.computed('branch', function() {
12+
text: computed('branch', function() {
1113
return `Travis CI build status for the ${ this.get('branch') } branch`;
1214
})
1315
});

0 commit comments

Comments
 (0)