Skip to content

Commit

Permalink
⬆️ Ember-Cli 2.15...2.16
Browse files Browse the repository at this point in the history
  • Loading branch information
nadnoslen committed Apr 6, 2022
1 parent 622b7d4 commit db8cddd
Show file tree
Hide file tree
Showing 10 changed files with 235 additions and 251 deletions.
20 changes: 12 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ cache:
- $HOME/.npm

env:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"ember-auto-import": "^1.5.3",
"ember-cli-babel": "^6.3.0",
"ember-cli-babel": "^6.6.0",
"ember-cli-htmlbars": "^2.0.1",
"lodash.startswith": "^4.2.1",
"showdown": "^1.9.1"
Expand All @@ -48,7 +48,7 @@
"bootswatch": "^3.3.7",
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.15.1",
"ember-cli": "~2.16.2",
"ember-cli-bootstrap3-sass": "^1.0.6",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-deploy": "^1.0.2",
Expand All @@ -63,13 +63,13 @@
"ember-cli-sass": "^7.1.1",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-cli-uglify": "^2.0.0",
"ember-cli-update": "^0.40",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.15.0",
"ember-source": "~2.16.0",
"ember-welcome-page": "^3.0.0",
"loader.js": "^4.2.3"
},
Expand Down
15 changes: 9 additions & 6 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ module.exports = {
launch_in_ci: ["Chrome"],
launch_in_dev: ["Chrome"],
browser_args: {
Chrome: [
"--disable-gpu",
"--headless",
"--remote-debugging-port=9222",
"--window-size=1440,900",
],
Chrome: {
mode: "ci",
args: [
"--disable-gpu",
"--headless",
"--remote-debugging-port=9222",
"--window-size=1440,900",
],
},
},
};
4 changes: 2 additions & 2 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Ember from 'ember';
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

const App = Ember.Application.extend({
const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/router.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ember from 'ember';
import EmberRouter from '@ember/routing/router';
import config from './config/environment';

const Router = Ember.Router.extend({
const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});
Expand Down
30 changes: 15 additions & 15 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/* eslint-env node */
'use strict';
"use strict";

module.exports = function (environment) {
let ENV = {
modulePrefix: 'dummy',
modulePrefix: "dummy",
environment,
rootURL: '/',
locationType: 'auto',
rootURL: "/",
locationType: "auto",
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false
}
Date: false,
},
},

APP: {
Expand Down Expand Up @@ -117,32 +117,32 @@ module.exports = function (environment) {
* (boolean) [default false] Enables github @mentions, which link to the username
* mentioned (since showdown-1.6.0).
*/
ghMentions: false
}
}
ghMentions: false,
},
},
};

if (environment === 'development') {
if (environment === "development") {
// ENV.APP.LOG_RESOLVER = true;
// ENV.APP.LOG_ACTIVE_GENERATION = true;
// ENV.APP.LOG_TRANSITIONS = true;
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
// ENV.APP.LOG_VIEW_LOOKUPS = true;
}

if (environment === 'test') {
if (environment === "test") {
// Testem prefers this...
ENV.locationType = 'none';
ENV.locationType = "none";

// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;

ENV.APP.rootElement = '#ember-testing';
ENV.APP.rootElement = "#ember-testing";
}

if (environment === 'production') {
// comment for eslint to shut up
if (environment === "production") {
// here you can enable a production-specific feature
}

return ENV;
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/destroy-app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Ember from 'ember';
import { run } from '@ember/runloop';

export default function destroyApp(application) {
Ember.run(application, 'destroy');
run(application, 'destroy');
}
14 changes: 7 additions & 7 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { module } from 'qunit';
import Ember from 'ember';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
import { module } from "qunit";
import { resolve } from "rsvp";

const {RSVP: {resolve}} = Ember;
import destroyApp from "../helpers/destroy-app";
import startApp from "../helpers/start-app";

export default function (name, options = {}) {
module(name, {
Expand All @@ -16,8 +15,9 @@ export default function (name, options = {}) {
},

afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
let afterEach =
options.afterEach && options.afterEach.apply(this, arguments);
return resolve(afterEach).then(() => destroyApp(this.application));
}
},
});
}
9 changes: 5 additions & 4 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';
import { merge } from '@ember/polyfills';
import { run } from '@ember/runloop';

export default function startApp(attrs) {
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
let attributes = merge({}, config.APP);
attributes = merge(attributes, attrs); // use defaults, but you can override;

return Ember.run(() => {
return run(() => {
let application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
Expand Down
Loading

0 comments on commit db8cddd

Please sign in to comment.