From 16d3d99687a042c1637581f4322363bafa91083c Mon Sep 17 00:00:00 2001 From: Jacob Jewell Date: Thu, 18 Feb 2016 23:32:11 -0500 Subject: [PATCH 1/3] allow passing in raygun options --- addon/initializers/ember-cli-raygun.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/initializers/ember-cli-raygun.js b/addon/initializers/ember-cli-raygun.js index b3feb89..44d89bf 100644 --- a/addon/initializers/ember-cli-raygun.js +++ b/addon/initializers/ember-cli-raygun.js @@ -18,7 +18,7 @@ export default function(config) { }; Raygun.init(raygunConfig.apiKey, - null, + raygunConfig.options, Ember.merge(defaultCustomData, raygunConfig.customData) ).attach(); From 06316f83afbd18590c1f6951e7c72e3757c93aef Mon Sep 17 00:00:00 2001 From: Jacob Jewell Date: Fri, 19 Feb 2016 09:39:45 -0500 Subject: [PATCH 2/3] add a test for raygun options --- .../ember-cli-raygun-test.js | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/unit/instance-initializers/ember-cli-raygun-test.js b/tests/unit/instance-initializers/ember-cli-raygun-test.js index 20a262f..7593616 100644 --- a/tests/unit/instance-initializers/ember-cli-raygun-test.js +++ b/tests/unit/instance-initializers/ember-cli-raygun-test.js @@ -90,3 +90,37 @@ test('Raygun is called if we log an error with ember', function(assert) { Raygun.send = oldSend; }); + +test('Additional options can be passed into raygun', function(assert) { + assert.expect(2); + let done = assert.async(); + + let config = { + raygun: { + apiKey: "abc123", + enabled: true, + options: { + allowInsecureSubmissions: true + } + }, + APP: { + name: "testing!" + } + }; + + let oldInit = Raygun.init; + + Raygun.init = function(apiKey, options) { + assert.deepEqual(options, { allowInsecureSubmissions: true }); + return { + attach() { + assert.ok(true); + done(); + } + }; + }; + + initializeWithConfig(config); + + Raygun.init = oldInit; +}); From 630a6e283b1fa18521120a67572728c559bc667c Mon Sep 17 00:00:00 2001 From: Jacob Jewell Date: Tue, 26 Jul 2016 18:23:22 -0400 Subject: [PATCH 3/3] upgrade to ember-cli 2.7 --- .editorconfig | 14 ------- .jshintrc | 2 +- .npmignore | 20 +++++---- .travis.yml | 16 ++++--- LICENSE.md | 2 +- bower.json | 16 ++----- config/ember-try.js | 51 ++++++++++++++++------- ember-cli-build.js | 2 +- package.json | 43 ++++++++++--------- testem.json => testem.js | 5 ++- tests/.jshintrc | 2 +- tests/dummy/app/app.js | 4 +- tests/dummy/app/index.html | 16 +++---- tests/dummy/app/resolver.js | 3 ++ tests/dummy/app/router.js | 3 +- tests/dummy/app/templates/application.hbs | 5 --- tests/dummy/config/environment.js | 3 +- tests/helpers/module-for-acceptance.js | 12 +++--- tests/helpers/resolver.js | 2 +- tests/index.html | 33 +++++++-------- 20 files changed, 129 insertions(+), 125 deletions(-) rename testem.json => testem.js (81%) create mode 100644 tests/dummy/app/resolver.js delete mode 100644 tests/dummy/app/templates/application.hbs diff --git a/.editorconfig b/.editorconfig index 47c5438..219985c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,22 +13,8 @@ insert_final_newline = true indent_style = space indent_size = 2 -[*.js] -indent_style = space -indent_size = 2 - [*.hbs] insert_final_newline = false -indent_style = space -indent_size = 2 - -[*.css] -indent_style = space -indent_size = 2 - -[*.html] -indent_style = space -indent_size = 2 [*.{diff,md}] trim_trailing_whitespace = false diff --git a/.jshintrc b/.jshintrc index 08096ef..d421faa 100644 --- a/.jshintrc +++ b/.jshintrc @@ -27,6 +27,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true, + "esversion": 6, "unused": true } diff --git a/.npmignore b/.npmignore index 49996f5..fa8b147 100644 --- a/.npmignore +++ b/.npmignore @@ -1,14 +1,16 @@ -bower_components/ -tests/ -tmp/ -dist/ - +/bower_components +/config/ember-try.js +/dist +/tests +/tmp +**/.gitkeep .bowerrc .editorconfig .ember-cli +.gitignore +.jshintrc +.watchmanconfig .travis.yml -.npmignore -**/.gitkeep bower.json -Brocfile.js -testem.json +ember-cli-build.js +testem.js diff --git a/.travis.yml b/.travis.yml index 8197d31..68b59ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "0.12" + - "4" sudo: false @@ -11,6 +11,7 @@ cache: env: - EMBER_TRY_SCENARIO=default + - EMBER_TRY_SCENARIO=ember-1.13 - EMBER_TRY_SCENARIO=ember-release - EMBER_TRY_SCENARIO=ember-beta - EMBER_TRY_SCENARIO=ember-canary @@ -21,14 +22,17 @@ matrix: - env: EMBER_TRY_SCENARIO=ember-canary before_install: - - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH - - "npm config set spin false" - - "npm install -g npm@^2" + - npm config set spin false + - npm install -g bower + - bower --version + - npm install phantomjs-prebuilt + - phantomjs --version install: - - npm install -g bower - npm install - bower install script: - - ember try $EMBER_TRY_SCENARIO test + # Usually, it's ok to finish the test scenario without reverting + # to the addon's original dependency state, skipping "cleanup". + - ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup diff --git a/LICENSE.md b/LICENSE.md index 00e9fbb..02000b5 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 +Copyright (c) 2016 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/bower.json b/bower.json index e0c01a0..bd8b107 100644 --- a/bower.json +++ b/bower.json @@ -1,17 +1,9 @@ { "name": "ember-cli-raygun", "dependencies": { - "ember": "1.13.11", - "ember-cli-shims": "0.0.6", - "ember-cli-test-loader": "0.2.1", - "ember-load-initializers": "0.1.7", - "ember-qunit": "0.4.16", + "ember": "~2.7.0", + "ember-cli-shims": "0.1.1", "ember-qunit-notifications": "0.1.0", - "ember-resolver": "~0.1.20", - "jquery": "^1.11.3", - "loader.js": "ember-cli/loader.js#3.4.0", - "qunit": "~1.20.0", - "raygun4js": "~2.0.3" - }, - "devDependencies": {} + "raygun4js": "~2.3.4" + } } diff --git a/config/ember-try.js b/config/ember-try.js index 3e88bc6..014f603 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -3,33 +3,52 @@ module.exports = { scenarios: [ { name: 'default', - dependencies: { } + bower: { + dependencies: { } + } + }, + { + name: 'ember-1.13', + bower: { + dependencies: { + 'ember': '~1.13.0' + }, + resolutions: { + 'ember': '~1.13.0' + } + } }, { name: 'ember-release', - dependencies: { - 'ember': 'components/ember#release' - }, - resolutions: { - 'ember': 'release' + bower: { + dependencies: { + 'ember': 'components/ember#release' + }, + resolutions: { + 'ember': 'release' + } } }, { name: 'ember-beta', - dependencies: { - 'ember': 'components/ember#beta' - }, - resolutions: { - 'ember': 'beta' + bower: { + dependencies: { + 'ember': 'components/ember#beta' + }, + resolutions: { + 'ember': 'beta' + } } }, { name: 'ember-canary', - dependencies: { - 'ember': 'components/ember#canary' - }, - resolutions: { - 'ember': 'canary' + bower: { + dependencies: { + 'ember': 'components/ember#canary' + }, + resolutions: { + 'ember': 'canary' + } } } ] diff --git a/ember-cli-build.js b/ember-cli-build.js index c8c48f8..4ac3913 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -8,7 +8,7 @@ module.exports = function(defaults) { }); /* - This build file specifes the options for the dummy test app of this + This build file specifies the options for the dummy test app of this addon, located in `/tests/dummy` This build file does *not* influence how the addon or the app using it behave. You most likely want to be modifying `./index.js` or app's build file diff --git a/package.json b/package.json index 3c6eb85..e1d5d9f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "scripts": { "build": "ember build", "start": "ember server", - "test": "ember try:testall" + "test": "ember try:each" }, "repository": { "type": "git", @@ -21,23 +21,26 @@ "author": "Nik Wakelin", "license": "MIT", "devDependencies": { - "broccoli-asset-rev": "^2.2.0", - "ember-cli": "^1.13.13", + "broccoli-asset-rev": "^2.4.2", + "ember-ajax": "^2.0.1", + "ember-cli": "2.7.0", "ember-cli-app-version": "^1.0.0", - "ember-cli-content-security-policy": "0.4.0", - "ember-cli-dependency-checker": "^1.1.0", - "ember-cli-htmlbars": "^1.0.1", + "ember-cli-dependency-checker": "^1.2.0", + "ember-cli-htmlbars": "^1.0.3", "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.4", - "ember-cli-release": "0.2.8", - "ember-cli-sri": "^1.2.0", + "ember-cli-inject-live-reload": "^1.4.0", + "ember-cli-jshint": "^1.0.0", + "ember-cli-qunit": "^2.0.0", + "ember-cli-release": "^0.2.9", + "ember-cli-sri": "^2.1.0", + "ember-cli-test-loader": "^1.1.0", "ember-cli-uglify": "^1.2.0", - "ember-disable-prototype-extensions": "^1.0.0", - "ember-disable-proxy-controllers": "^1.0.1", - "ember-export-application-global": "^1.0.4", - "ember-try": "~0.0.8" + "ember-disable-prototype-extensions": "^1.1.0", + "ember-export-application-global": "^1.0.5", + "ember-load-initializers": "^0.5.1", + "ember-resolver": "^2.0.3", + "ember-welcome-page": "^1.0.1", + "loader.js": "^4.0.1" }, "keywords": [ "ember-addon", @@ -46,11 +49,11 @@ "error reporting" ], "dependencies": { - "ember-cli-babel": "^5.1.5", - "chalk": "1.1.0", - "ember-lodash": "0.0.3", - "fs-extra": "0.22.1", - "rsvp": "3.0.18" + "ember-cli-babel": "^5.1.6", + "chalk": "^1.1.3", + "ember-lodash": "^0.0.10", + "fs-extra": "^0.30.0", + "rsvp": "^3.2.1" }, "ember-addon": { "configPath": "tests/dummy/config" diff --git a/testem.json b/testem.js similarity index 81% rename from testem.json rename to testem.js index 0f35392..26044b2 100644 --- a/testem.json +++ b/testem.js @@ -1,4 +1,5 @@ -{ +/*jshint node:true*/ +module.exports = { "framework": "qunit", "test_page": "tests/index.html?hidepassed", "disable_watching": true, @@ -9,4 +10,4 @@ "PhantomJS", "Chrome" ] -} +}; diff --git a/tests/.jshintrc b/tests/.jshintrc index 6ec0b7c..d2bd113 100644 --- a/tests/.jshintrc +++ b/tests/.jshintrc @@ -47,6 +47,6 @@ "strict": false, "white": false, "eqnull": true, - "esnext": true, + "esversion": 6, "unused": true } diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.js index 8b234d6..3fcfa9d 100644 --- a/tests/dummy/app/app.js +++ b/tests/dummy/app/app.js @@ -1,6 +1,6 @@ import Ember from 'ember'; -import Resolver from 'ember/resolver'; -import loadInitializers from 'ember/load-initializers'; +import Resolver from 'ember-resolver'; +import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; let App; diff --git a/tests/dummy/app/index.html b/tests/dummy/app/index.html index 1c49d36..5120bd7 100644 --- a/tests/dummy/app/index.html +++ b/tests/dummy/app/index.html @@ -7,19 +7,19 @@ - {{content-for 'head'}} + {{content-for "head"}} - - + + - {{content-for 'head-footer'}} + {{content-for "head-footer"}} - {{content-for 'body'}} + {{content-for "body"}} - - + + - {{content-for 'body-footer'}} + {{content-for "body-footer"}} diff --git a/tests/dummy/app/resolver.js b/tests/dummy/app/resolver.js new file mode 100644 index 0000000..2fb563d --- /dev/null +++ b/tests/dummy/app/resolver.js @@ -0,0 +1,3 @@ +import Resolver from 'ember-resolver'; + +export default Resolver; diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.js index 3bba78e..cdc2578 100644 --- a/tests/dummy/app/router.js +++ b/tests/dummy/app/router.js @@ -2,7 +2,8 @@ import Ember from 'ember'; import config from './config/environment'; const Router = Ember.Router.extend({ - location: config.locationType + location: config.locationType, + rootURL: config.rootURL }); Router.map(function() { diff --git a/tests/dummy/app/templates/application.hbs b/tests/dummy/app/templates/application.hbs deleted file mode 100644 index 23b6d70..0000000 --- a/tests/dummy/app/templates/application.hbs +++ /dev/null @@ -1,5 +0,0 @@ -

Raygun Test Harness

- - - -{{outlet}} diff --git a/tests/dummy/config/environment.js b/tests/dummy/config/environment.js index c59bcd5..2529939 100644 --- a/tests/dummy/config/environment.js +++ b/tests/dummy/config/environment.js @@ -4,7 +4,7 @@ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, - baseURL: '/', + rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { @@ -29,7 +29,6 @@ module.exports = function(environment) { if (environment === 'test') { // Testem prefers this... - ENV.baseURL = '/'; ENV.locationType = 'none'; // keep test console output quieter diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js index ed23003..76996fd 100644 --- a/tests/helpers/module-for-acceptance.js +++ b/tests/helpers/module-for-acceptance.js @@ -1,23 +1,23 @@ import { module } from 'qunit'; +import Ember from 'ember'; import startApp from '../helpers/start-app'; import destroyApp from '../helpers/destroy-app'; +const { RSVP: { Promise } } = Ember; + export default function(name, options = {}) { module(name, { beforeEach() { this.application = startApp(); if (options.beforeEach) { - options.beforeEach.apply(this, arguments); + return options.beforeEach.apply(this, arguments); } }, afterEach() { - destroyApp(this.application); - - if (options.afterEach) { - options.afterEach.apply(this, arguments); - } + let afterEach = options.afterEach && options.afterEach.apply(this, arguments); + return Promise.resolve(afterEach).then(() => destroyApp(this.application)); } }); } diff --git a/tests/helpers/resolver.js b/tests/helpers/resolver.js index ebfb4e4..ac94b1b 100644 --- a/tests/helpers/resolver.js +++ b/tests/helpers/resolver.js @@ -1,4 +1,4 @@ -import Resolver from 'ember/resolver'; +import Resolver from 'ember-resolver'; import config from '../../config/environment'; const resolver = Resolver.create(); diff --git a/tests/index.html b/tests/index.html index 5e88e5e..f7ff652 100644 --- a/tests/index.html +++ b/tests/index.html @@ -7,28 +7,27 @@ - {{content-for 'head'}} - {{content-for 'test-head'}} + {{content-for "head"}} + {{content-for "test-head"}} - - - + + + - {{content-for 'head-footer'}} - {{content-for 'test-head-footer'}} + {{content-for "head-footer"}} + {{content-for "test-head-footer"}} - {{content-for 'body'}} - {{content-for 'test-body'}} + {{content-for "body"}} + {{content-for "test-body"}} - - - - - - + + + + + - {{content-for 'body-footer'}} - {{content-for 'test-body-footer'}} + {{content-for "body-footer"}} + {{content-for "test-body-footer"}}