ember-cli-bugsnag
Advanced tools
Comparing version 0.0.9 to 0.0.10
import Ember from 'ember'; | ||
import config from '../config/environment'; | ||
import { getContext, generateError } from 'ember-cli-bugsnag/utils/errors'; | ||
@@ -14,3 +15,3 @@ var currentEnv = config.environment; | ||
Ember.onerror = function (error) { | ||
Bugsnag.context = container.lookup('router:main').get('location').getURL(); | ||
Bugsnag.context = getContext(container.lookup('router:main')); | ||
Bugsnag.notifyException(error); | ||
@@ -21,3 +22,3 @@ console.error(error.stack); | ||
Ember.RSVP.on('error', function(error) { | ||
Bugsnag.context = container.lookup('router:main').get('location').getURL(); | ||
Bugsnag.context = getContext(container.lookup('router:main')); | ||
Bugsnag.notifyException(error); | ||
@@ -28,4 +29,4 @@ console.error(error.stack); | ||
Ember.Logger.error = function (message, cause, stack) { | ||
Bugsnag.context = container.lookup('router:main').get('location').getURL(); | ||
Bugsnag.notifyException(new Error(message), null, { cause: cause, stack: stack }); | ||
Bugsnag.context = getContext(container.lookup('router:main')); | ||
Bugsnag.notifyException(generateError(cause, stack), message); | ||
console.error(stack); | ||
@@ -32,0 +33,0 @@ }; |
@@ -11,8 +11,6 @@ 'use strict'; | ||
afterInstall: function() { | ||
this.insertIntoFile('.jshintrc', ' "Bugsnag",', { | ||
return this.insertIntoFile('.jshintrc', ' "Bugsnag",', { | ||
after: '"predef": [\n' | ||
}); | ||
return this.insertIntoFile('.gitignore', '.bugsnag'); | ||
} | ||
}; |
@@ -20,3 +20,3 @@ /* jshint node: true */ | ||
if (!envApiKey || !envReleases) { | ||
console.error('Environment variables `BUGSNAG_API_KEY` and `BUGSNAG_NOTIFY_RELEASE` are not specfied. Bugsnag will not be injected.'); | ||
console.error('Environment variables `BUGSNAG_API_KEY` and `BUGSNAG_NOTIFY_RELEASE` are not specified. Bugsnag will not be injected.'); | ||
@@ -38,3 +38,3 @@ return ''; | ||
'<script ', | ||
'src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js" ', | ||
'src="https://d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js" ', | ||
'data-appversion="' + config.currentRevision + '" ', | ||
@@ -44,4 +44,6 @@ 'data-apikey="' + bugsnagConfig.apiKey + '">', | ||
'<script>', | ||
'if (typeof Bugsnag !== "undefined") {', | ||
'Bugsnag.releaseStage = "' + config.environment + '";', | ||
'Bugsnag.notifyReleaseStages = ["' + envArray.join('","') + '"];', | ||
'}', | ||
'</script>' | ||
@@ -48,0 +50,0 @@ ]; |
{ | ||
"name": "ember-cli-bugsnag", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Integrates Bugsnag reporting service into your Ember CLI app.", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -10,11 +10,5 @@ # Ember-cli-bugsnag | ||
```sh | ||
npm install ember-cli-bugsnag --save-dev | ||
ember install ember-cli-bugsnag | ||
``` | ||
Run `ember-cli-bugsnag` generator: | ||
```sh | ||
ember g ember-cli-bugsnag | ||
``` | ||
## Configuration | ||
@@ -21,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6960
9
100
34
1