Remove Ember 2.3 deprecation warnings

This commit is contained in:
Curtis Ekstrom 2016-04-14 09:38:59 +02:00
parent f8d05dea78
commit fe8a5a13e1
No known key found for this signature in database
GPG Key ID: CDE831E4F18FEB65
8 changed files with 19 additions and 17 deletions

View File

@ -15,7 +15,7 @@ var Router = Ember.Router.extend({
// we should probably think about a more general way to // we should probably think about a more general way to
// do this, location should not know about auth status // do this, location should not know about auth status
return Location.create({ return Location.create({
auth: this.container.lookup('service:auth') auth: Ember.getOwner(this).lookup('service:auth')
}); });
} }
}.property(), }.property(),

View File

@ -1,4 +1,5 @@
import config from 'travis/config/environment'; import config from 'travis/config/environment';
import getOwner from 'ember-getowner-polyfill';
import Ember from 'ember'; import Ember from 'ember';
export default Ember.Service.extend({ export default Ember.Service.extend({
@ -214,7 +215,7 @@ export default Ember.Service.extend({
// as a direct response to either manual sign in or autoSignIn (right now // as a direct response to either manual sign in or autoSignIn (right now
// we treat both cases behave the same in terms of sent events which I think // we treat both cases behave the same in terms of sent events which I think
// makes it more complicated than it should be). // makes it more complicated than it should be).
router = this.container.lookup('router:main'); router = Ember.getOwner(this).lookup('router:main');
try { try {
return router.send(name); return router.send(name);
} catch (error1) { } catch (error1) {

View File

@ -1,7 +1,7 @@
{ {
"name": "travis", "name": "travis",
"dependencies": { "dependencies": {
"ember": "2.2.1", "ember": "2.3.2",
"ember-cli-shims": "0.1.1", "ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2", "ember-cli-test-loader": "0.2.2",
"ember-load-initializers": "0.1.7", "ember-load-initializers": "0.1.7",

View File

@ -29,7 +29,7 @@
"ember-cli-babel": "^5.1.6", "ember-cli-babel": "^5.1.6",
"ember-cli-dependency-checker": "^1.2.0", "ember-cli-dependency-checker": "^1.2.0",
"ember-cli-deprecation-workflow": "0.1.6", "ember-cli-deprecation-workflow": "0.1.6",
"ember-cli-document-title": "0.2.0", "ember-cli-document-title": "0.3.1",
"ember-cli-htmlbars": "^1.0.3", "ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1", "ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0", "ember-cli-inject-live-reload": "^1.4.0",

View File

@ -3,7 +3,7 @@ import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
import fillIn from '../../helpers/fill-in'; import fillIn from '../../helpers/fill-in';
import DS from 'ember-data'; import DS from 'ember-data';
import getOwner from 'ember-getowner-polyfill';
moduleForComponent('add-env-var', 'Integration | Component | add env-var', { moduleForComponent('add-env-var', 'Integration | Component | add env-var', {
integration: true integration: true
@ -14,7 +14,7 @@ test('it adds an env var on submit', function(assert) {
// this shouldn't be needed, probably some bug in tests setup with new ember-data // this shouldn't be needed, probably some bug in tests setup with new ember-data
this.registry.register('transform:boolean', DS.BooleanTransform); this.registry.register('transform:boolean', DS.BooleanTransform);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
assert.equal(store.peekAll('envVar').get('length'), 0, 'precond: store should be empty'); assert.equal(store.peekAll('envVar').get('length'), 0, 'precond: store should be empty');
var repo; var repo;
@ -66,7 +66,7 @@ test('it adds a public env var on submit', function(assert) {
assert.expect(6); assert.expect(6);
this.registry.register('transform:boolean', DS.BooleanTransform); this.registry.register('transform:boolean', DS.BooleanTransform);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
assert.equal(store.peekAll('envVar').get('length'), 0, 'precond: store should be empty'); assert.equal(store.peekAll('envVar').get('length'), 0, 'precond: store should be empty');
var repo; var repo;

View File

@ -3,6 +3,7 @@ import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
import fillIn from '../../helpers/fill-in'; import fillIn from '../../helpers/fill-in';
import DS from 'ember-data'; import DS from 'ember-data';
import getOwner from 'ember-getowner-polyfill';
moduleForComponent('add-ssh-key', 'Integration | Component | add ssh-key', { moduleForComponent('add-ssh-key', 'Integration | Component | add ssh-key', {
integration: true integration: true
@ -12,7 +13,7 @@ test('it adds an ssh key on submit', function(assert) {
assert.expect(6); assert.expect(6);
this.registry.register('transform:boolean', DS.BooleanTransform); this.registry.register('transform:boolean', DS.BooleanTransform);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
var repo; var repo;
Ember.run(function() { Ember.run(function() {
@ -47,7 +48,7 @@ test('it throws an error if value for ssh key is blank', function(assert) {
assert.expect(5); assert.expect(5);
this.registry.register('transform:boolean', DS.BooleanTransform); this.registry.register('transform:boolean', DS.BooleanTransform);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
var repo; var repo;
Ember.run(function() { Ember.run(function() {

View File

@ -3,7 +3,7 @@ import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
import fillIn from '../../helpers/fill-in'; import fillIn from '../../helpers/fill-in';
import DS from 'ember-data'; import DS from 'ember-data';
import getOwner from 'ember-getowner-polyfill';
moduleForComponent('env-var', 'Integration | Component | env-var', { moduleForComponent('env-var', 'Integration | Component | env-var', {
integration: true integration: true
@ -13,7 +13,7 @@ test('it renders an env-var with private value', function(assert) {
assert.expect(2); assert.expect(2);
this.registry.register('transform:boolean', DS.BooleanTransform); this.registry.register('transform:boolean', DS.BooleanTransform);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
Ember.run(() => { Ember.run(() => {
var envVar = store.push({data: { id: 1, type: 'env-var', attributes: { name: 'foo', value: 'bar', public: false}}}); var envVar = store.push({data: { id: 1, type: 'env-var', attributes: { name: 'foo', value: 'bar', public: false}}});
this.set('envVar', envVar); this.set('envVar', envVar);
@ -30,7 +30,7 @@ test('it renders an env-var with public value', function(assert) {
assert.expect(2); assert.expect(2);
this.registry.register('transform:boolean', DS.BooleanTransform); this.registry.register('transform:boolean', DS.BooleanTransform);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
Ember.run(() => { Ember.run(() => {
var envVar = store.push({data: { id: 1, type: 'env-var', attributes: { name: 'foo', value: 'bar', public: true}}}); var envVar = store.push({data: { id: 1, type: 'env-var', attributes: { name: 'foo', value: 'bar', public: true}}});
this.set('envVar', envVar); this.set('envVar', envVar);

View File

@ -2,7 +2,7 @@ import Ember from 'ember';
import { moduleForComponent, test } from 'ember-qunit'; import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
import fillIn from '../../helpers/fill-in'; import fillIn from '../../helpers/fill-in';
import getOwner from 'ember-getowner-polyfill';
moduleForComponent('ssh-key', 'Integration | Component | ssh-key', { moduleForComponent('ssh-key', 'Integration | Component | ssh-key', {
integration: true integration: true
@ -11,7 +11,7 @@ moduleForComponent('ssh-key', 'Integration | Component | ssh-key', {
test('it renders the default ssh key if no custom key is set', function(assert) { test('it renders the default ssh key if no custom key is set', function(assert) {
assert.expect(2); assert.expect(2);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
var key = Ember.Object.create({fingerprint: 'fingerprint'}); var key = Ember.Object.create({fingerprint: 'fingerprint'});
this.set('key', key); this.set('key', key);
@ -25,7 +25,7 @@ test('it renders the default ssh key if no custom key is set', function(assert)
test('it renders the custom ssh key if custom key is set', function(assert) { test('it renders the custom ssh key if custom key is set', function(assert) {
assert.expect(2); assert.expect(2);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
var key; var key;
Ember.run(function() { Ember.run(function() {
@ -44,7 +44,7 @@ test('it renders the custom ssh key if custom key is set', function(assert) {
test('it deletes a custom key if permissions are right', function(assert) { test('it deletes a custom key if permissions are right', function(assert) {
assert.expect(1); assert.expect(1);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
var key; var key;
Ember.run(function() { Ember.run(function() {
@ -67,7 +67,7 @@ test('it deletes a custom key if permissions are right', function(assert) {
test('it does not delete the custom key if permissions are insufficient', function(assert) { test('it does not delete the custom key if permissions are insufficient', function(assert) {
assert.expect(1); assert.expect(1);
var store = this.container.lookup('service:store'); var store = Ember.getOwner(this).lookup('service:store');
var key; var key;
Ember.run(function() { Ember.run(function() {