Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Commit

Permalink
Fix deprecation warning for ember v2.1.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
quaertym committed Aug 22, 2015
1 parent f36b452 commit 5e74994
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/initializers/export-application-global.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ember from 'ember';
import config from '../config/environment';

export function initialize(container, application) {
export function initialize(application) {
if (config.exportApplicationGlobal !== false) {
var value = config.exportApplicationGlobal;
var globalName;
Expand Down
7 changes: 5 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ember-export-application-global",
"dependencies": {
"ember": "1.13.3",
"ember": "2.1.0-beta.1",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.5",
Expand All @@ -12,5 +12,8 @@
"jquery": "^1.11.1",
"loader.js": "ember-cli/loader.js#3.2.0",
"qunit": "~1.17.1"
},
"resolutions": {
"ember": "2.1.0-beta.1"
}
}
}
8 changes: 4 additions & 4 deletions tests/unit/initializers/export-application-global-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module('ExportApplicationGlobalInitializer', {
test('it sets the application on window with the classified modulePrefix', function(assert) {
config.modulePrefix = 'foo';
var app = { reopen: function(){} };
initialize(null, app);
initialize(app);

assert.equal(window.Foo, app);
});
Expand All @@ -39,7 +39,7 @@ test('it sets the application on window with the classified modulePrefix when ex
config.modulePrefix = 'foo';
config.exportApplicationGlobal = true;
var app = { reopen: function(){} };
initialize(null, app);
initialize(app);

assert.equal(window.Foo, app);
});
Expand All @@ -48,7 +48,7 @@ test('it does not set the global unless exportApplicationGlobal is true', functi
config.modulePrefix = 'foo';
config.exportApplicationGlobal = false;
var app = { reopen: function(){} };
initialize(null, app);
initialize(app);

assert.ok(window.Foo !== app);
});
Expand All @@ -65,7 +65,7 @@ test('it sets a custom global name if specified', function(assert) {
config.modulePrefix = 'foo';
config.exportApplicationGlobal = 'Catz';
var app = { reopen: function(){} };
initialize(null, app);
initialize(app);

assert.ok(window.Foo !== app);
assert.ok(window.Catz === app);
Expand Down

0 comments on commit 5e74994

Please sign in to comment.