ember-metrics
Advanced tools
Comparing version 0.5.2 to 0.5.3
import Ember from 'ember'; | ||
import getOwner from 'ember-getowner-polyfill'; | ||
@@ -59,2 +60,5 @@ const { | ||
const adapters = getWithDefault(this, 'options.metricsAdapters', emberArray()); | ||
const owner = getOwner(this); | ||
owner.registerOptionsForType('ember-metrics@metrics-adapter', { instantiate: false }); | ||
owner.registerOptionsForType('metrics-adapter', { instantiate: false }); | ||
set(this, 'appEnvironment', getWithDefault(this, 'options.environment', 'development')); | ||
@@ -170,10 +174,7 @@ set(this, '_adapters', {}); | ||
_lookupAdapter(adapterName) { | ||
const { container } = this; | ||
assert('[ember-metrics] The service is missing its container.', container); | ||
assert('[ember-metrics] Could not find metrics adapter without a name.', adapterName); | ||
const dasherizedAdapterName = dasherize(adapterName); | ||
const availableAdapter = container.lookupFactory(`ember-metrics@metrics-adapter:${dasherizedAdapterName}`); | ||
const localAdapter = container.lookupFactory(`metrics-adapter:${dasherizedAdapterName}`); | ||
const availableAdapter = getOwner(this).lookup(`ember-metrics@metrics-adapter:${dasherizedAdapterName}`); | ||
const localAdapter = getOwner(this).lookup(`metrics-adapter:${dasherizedAdapterName}`); | ||
@@ -180,0 +181,0 @@ return localAdapter ? localAdapter : availableAdapter; |
@@ -1,3 +0,2 @@ | ||
/* jshint node: true */ | ||
/*jshint node:true*/ | ||
module.exports = { | ||
@@ -19,11 +18,38 @@ scenarios: [ | ||
{ | ||
name: 'ember-1.12.1', | ||
name: 'ember-1.12', | ||
dependencies: { | ||
'ember': '1.12.1' | ||
'ember': '~1.12.0' | ||
}, | ||
resolutions: { | ||
'ember': '1.12.1' | ||
'ember': '~1.12.0' | ||
} | ||
}, | ||
{ | ||
name: 'ember-1.13', | ||
dependencies: { | ||
'ember': '~1.13.0' | ||
}, | ||
resolutions: { | ||
'ember': '~1.13.0' | ||
} | ||
}, | ||
{ | ||
name: 'ember-2.0', | ||
dependencies: { | ||
'ember': '~2.0.0' | ||
}, | ||
resolutions: { | ||
'ember': '~2.0.0' | ||
} | ||
}, | ||
{ | ||
name: 'ember-2.1', | ||
dependencies: { | ||
'ember': '~2.1.0' | ||
}, | ||
resolutions: { | ||
'ember': '~2.1.0' | ||
} | ||
}, | ||
{ | ||
name: 'ember-release', | ||
@@ -30,0 +56,0 @@ dependencies: { |
@@ -0,1 +1,2 @@ | ||
/*jshint node:true*/ | ||
'use strict'; | ||
@@ -2,0 +3,0 @@ |
{ | ||
"name": "ember-metrics", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Send data to multiple analytics integrations without re-implementing new API", | ||
@@ -31,18 +31,18 @@ "directories": { | ||
"devDependencies": { | ||
"broccoli-asset-rev": "^2.1.2", | ||
"ember-cli": "1.13.8", | ||
"ember-cli-app-version": "0.5.0", | ||
"ember-cli-dependency-checker": "^1.0.1", | ||
"ember-cli-htmlbars-inline-precompile": "^0.2.0", | ||
"ember-cli-ic-ajax": "0.2.1", | ||
"broccoli-asset-rev": "^2.2.0", | ||
"ember-cli": "1.13.13", | ||
"ember-cli-app-version": "^1.0.0", | ||
"ember-cli-dependency-checker": "^1.1.0", | ||
"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-qunit": "^1.0.0", | ||
"ember-cli-release": "0.2.5", | ||
"ember-cli-sri": "^1.0.3", | ||
"ember-cli-qunit": "^1.0.4", | ||
"ember-cli-release": "0.2.8", | ||
"ember-cli-sri": "^1.2.0", | ||
"ember-cli-uglify": "^1.2.0", | ||
"ember-disable-prototype-extensions": "^1.0.1", | ||
"ember-disable-proxy-controllers": "^1.0.0", | ||
"ember-export-application-global": "^1.0.3", | ||
"ember-sinon": "0.2.1", | ||
"ember-try": "0.0.7" | ||
"ember-disable-prototype-extensions": "^1.0.0", | ||
"ember-disable-proxy-controllers": "^1.0.1", | ||
"ember-export-application-global": "^1.0.4", | ||
"ember-sinon": "0.3.0", | ||
"ember-try": "~0.0.8" | ||
}, | ||
@@ -60,4 +60,5 @@ "keywords": [ | ||
"dependencies": { | ||
"ember-cli-htmlbars": "0.7.9", | ||
"ember-cli-babel": "^5.1.3" | ||
"ember-cli-babel": "^5.1.5", | ||
"ember-cli-htmlbars": "^1.0.1", | ||
"ember-getowner-polyfill": "^1.0.0" | ||
}, | ||
@@ -64,0 +65,0 @@ "ember-addon": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35070
31
688
3
7693
+ Addedember-cli-htmlbars@1.3.5(transitive)
+ Addedember-cli-version-checker@2.2.0(transitive)
+ Addedember-factory-for-polyfill@1.3.1(transitive)
+ Addedember-getowner-polyfill@1.2.5(transitive)
+ Addedis-utf8@0.2.1(transitive)
+ Addedstrip-bom@2.0.0(transitive)
- Removedbroccoli-filter@0.1.14(transitive)
- Removedbroccoli-kitchen-sink-helpers@0.2.9(transitive)
- Removedbroccoli-writer@0.1.1(transitive)
- Removedember-cli-htmlbars@0.7.9(transitive)
- Removedmkdirp@0.3.5(transitive)
- Removedwalk-sync@0.1.3(transitive)
Updatedember-cli-babel@^5.1.5
Updatedember-cli-htmlbars@^1.0.1