ember-metrics
Advanced tools
Comparing version 0.2.0 to 0.3.0
import Ember from 'ember'; | ||
const { | ||
LinkComponent, | ||
inject, | ||
isPresent, | ||
get, | ||
getWithDefault, | ||
String: { camelize } | ||
} = Ember; | ||
const LinkComponent = Ember.LinkComponent || Ember.LinkView; | ||
@@ -15,3 +16,3 @@ export default LinkComponent.reopen({ | ||
click() { | ||
const attrs = Object.keys(get(this, 'attrs')); | ||
const attrs = Object.keys(getWithDefault(this, 'attrs', this)); | ||
const metricsProperties = this._deserializeEvent(attrs); | ||
@@ -32,4 +33,3 @@ const hasMetricsKeys = isPresent(Object.keys(metricsProperties)); | ||
if (attr.indexOf('metrics') !== -1) { | ||
const strippedAttr = attr.replace('metrics', ''); | ||
const camelizedAttr = camelize(strippedAttr); | ||
const camelizedAttr = camelize(attr.replace('metrics', '')); | ||
metricsProperties[camelizedAttr] = get(this, attr); | ||
@@ -36,0 +36,0 @@ } |
import Ember from 'ember'; | ||
import LinkComponent from 'ember-metrics/ext/link'; | ||
const { isBlank } = Ember; | ||
export function initialize() { | ||
if (isBlank(Ember.LinkComponent)) { | ||
Ember.LinkView = Ember.LinkComponent; | ||
return; | ||
} | ||
Ember.LinkComponent = LinkComponent; | ||
@@ -6,0 +13,0 @@ } |
@@ -0,1 +1,3 @@ | ||
/* jshint node: true */ | ||
module.exports = { | ||
@@ -8,2 +10,20 @@ scenarios: [ | ||
{ | ||
name: 'ember-1.11', | ||
dependencies: { | ||
'ember': '~1.11.0' | ||
}, | ||
resolutions: { | ||
'ember': '~1.11.0' | ||
} | ||
}, | ||
{ | ||
name: 'ember-1.12.1', | ||
dependencies: { | ||
'ember': '1.12.1' | ||
}, | ||
resolutions: { | ||
'ember': '1.12.1' | ||
} | ||
}, | ||
{ | ||
name: 'ember-release', | ||
@@ -10,0 +30,0 @@ dependencies: { |
{ | ||
"name": "ember-metrics", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Send data to multiple analytics integrations without re-implementing new API", | ||
@@ -35,3 +35,2 @@ "directories": { | ||
"ember-cli-dependency-checker": "^1.0.1", | ||
"ember-cli-htmlbars": "0.7.9", | ||
"ember-cli-htmlbars-inline-precompile": "^0.2.0", | ||
@@ -61,2 +60,3 @@ "ember-cli-ic-ajax": "0.2.1", | ||
"dependencies": { | ||
"ember-cli-htmlbars": "0.7.9", | ||
"ember-cli-babel": "^5.1.3" | ||
@@ -63,0 +63,0 @@ }, |
@@ -45,2 +45,5 @@ # ember-metrics | ||
## Compatibility | ||
This addon is tested against the `release`, `beta`, and `canary` channels, as well as `~1.11.0`, and `1.12.1`. | ||
## Configuration | ||
@@ -47,0 +50,0 @@ |
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
30389
16
600
307
2
+ Addedember-cli-htmlbars@0.7.9
+ Addedbroccoli-filter@0.1.14(transitive)
+ Addedbroccoli-kitchen-sink-helpers@0.2.9(transitive)
+ Addedbroccoli-writer@0.1.1(transitive)
+ Addedember-cli-htmlbars@0.7.9(transitive)
+ Addedmkdirp@0.3.5(transitive)
+ Addedwalk-sync@0.1.3(transitive)