Skip to content

Commit

Permalink
Upgrade addon CLI to 2.12.1 (#183)
Browse files Browse the repository at this point in the history
* Upgrade ember-cli 2.11.0

* Upgrade to ember-cli 2.12.1

* Update mocha tests

* ember#release seems to be borked.

* Skip test related to testing thrown errors

According to this
ticket (emberjs/ember.js#15013) and this
ticket (emberjs/ember-mocha#141) ember 2.11
broke testing exceptions.
  • Loading branch information
Robdel12 committed Mar 24, 2017
1 parent ff0eaa4 commit 8b88a69
Show file tree
Hide file tree
Showing 19 changed files with 1,271 additions and 1,129 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Expand Up @@ -8,7 +8,7 @@
.editorconfig
.ember-cli
.gitignore
.jshintrc
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
Expand Down
16 changes: 9 additions & 7 deletions .travis.yml
@@ -1,12 +1,15 @@
---
language: node_js
node_js:
- "4"
- "6"

sudo: false

cache:
yarn: true
directories:
- $HOME/.npm
- $HOME/.cache # includes bowers cache

env:
# we recommend testing LTS's and latest stable release (bonus points to beta/canary)
Expand All @@ -15,21 +18,20 @@ env:
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

before_install:
- npm install -g yarn
- yarn add global bower
- yarn add global bower phantomjs-prebuilt
- bower --version
- yarn add phantomjs-prebuilt
- node_modules/phantomjs-prebuilt/bin/phantomjs --version
- phantomjs --version

install:
- yarn
- yarn install
- bower install

after_success:
Expand All @@ -38,4 +40,4 @@ after_success:
script:
# 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
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016
Copyright (c) 2017

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:

Expand Down
6 changes: 2 additions & 4 deletions bower.json
@@ -1,13 +1,11 @@
{
"name": "emberx-select",
"dependencies": {
"ember-mocha": "0.8.8",
"ember-mocha": "0.11.0",
"chai-jquery": "~2.0.0",
"sinon-chai": "~2.8.0",
"bootstrap": "v4.0.0-alpha.4",
"marked": "^0.3.6",
"highlightjs": "^9.6.0",
"ember": "~2.10.0",
"ember-cli-shims": "0.1.3"
"highlightjs": "^9.6.0"
}
}
35 changes: 33 additions & 2 deletions config/ember-try.js
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
scenarios: [
{
Expand All @@ -10,6 +10,11 @@ module.exports = {
resolutions: {
'ember': 'lts-2-4'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -21,17 +26,27 @@ module.exports = {
resolutions: {
'ember': 'lts-2-8'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-release',
bower: {
dependencies: {
'ember': 'components/ember#release'
'ember': '2.12.0' // TODO: Come back to this when release is some crazy broken version.
},
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -43,6 +58,11 @@ module.exports = {
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -54,6 +74,17 @@ module.exports = {
resolutions: {
'ember': 'canary'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion config/environment.js
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
59 changes: 30 additions & 29 deletions package.json
Expand Up @@ -2,58 +2,59 @@
"name": "emberx-select",
"version": "3.0.0",
"description": "A Select component based on html select.",
"keywords": [
"ember-addon",
"select",
"ember select",
"emberx-select",
"select box",
"ember select component"
],
"license": "MIT",
"author": "The Frontside",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "https://github.com/thefrontside/emberx-select",
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:each"
},
"repository": "https://github.com/thefrontside/emberx-select",
"dependencies": {
"ember-cli-babel": "^5.1.7",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-version-checker": "^1.2.0"
},
"devDependencies": {
"ember-cli-deploy": "0.5.1",
"ember-cli-eslint": "3.0.0",
"ember-cli-document-title": "0.3.3",
"ember-cli-mocha": "0.10.4",
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "2.10.0",
"ember-cli-app-version": "^2.0.0",
"ember-cli": "2.12.1",
"ember-cli-chai": "^0.2.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-htmlbars-inline-precompile": "^0.3.3",
"ember-cli-deploy": "0.5.1",
"ember-cli-document-title": "0.3.3",
"ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars-inline-precompile": "^0.3.6",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-release": "^0.2.9",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-mocha": "0.13.2",
"ember-cli-shims": "^1.0.2",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.10.0",
"ember-data": "^2.12.1",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-pagefront": "0.11.2",
"ember-load-initializers": "^0.6.0",
"ember-resolver": "^2.0.3",
"ember-sinon": "0.5.1",
"ember-source": "~2.12.0",
"eslint-plugin-prefer-let": "^0.1.0",
"fs-branding": "0.1.3",
"markdown-code-highlighting": "0.1.0",
"loader.js": "^4.0.10"
},
"keywords": [
"ember-addon",
"select",
"ember select",
"emberx-select",
"select box",
"ember select component"
],
"dependencies": {
"ember-cli-babel": "^5.1.7",
"ember-cli-htmlbars": "^1.0.10",
"ember-cli-version-checker": "^1.1.6"
"loader.js": "^4.2.3",
"markdown-code-highlighting": "0.1.0"
},
"engines": {
"node": ">= 0.12.0"
"node": ">= 4"
},
"ember-addon": {
"demoURL": "http://emberx-select.pagefrontapp.com",
Expand Down
3 changes: 1 addition & 2 deletions testem.js
@@ -1,6 +1,5 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
"framework": "mocha",
"test_page": "tests/index.html",
"disable_watching": true,
"launch_in_ci": [
Expand Down
2 changes: 1 addition & 1 deletion tests/.eslintrc.js
@@ -1,5 +1,5 @@
module.exports = {
env: {
'embertest': true
embertest: true
}
};
3 changes: 1 addition & 2 deletions tests/acceptance/shared/attr-test.js
@@ -1,6 +1,5 @@
/*global expect */
import { beforeEach, describe } from 'mocha';
import { it } from 'ember-mocha';
import { beforeEach, describe, it } from 'mocha';

export function shouldBindAttrs() {
describe('native select element attributes', function() {
Expand Down
12 changes: 9 additions & 3 deletions tests/acceptance/x-select-multiple-test.js
Expand Up @@ -2,8 +2,12 @@
/* jshint expr:true */
import Ember from 'ember';
import startApp from '../helpers/start-app';
import { it } from 'ember-mocha';
import { beforeEach, afterEach, describe } from 'mocha';
import {
beforeEach,
afterEach,
describe,
it
} from 'mocha';
import { select } from 'dummy/tests/helpers/x-select';
import { shouldBindAttrs } from './shared/attr-test';

Expand Down Expand Up @@ -67,7 +71,9 @@ describe('XSelect: Multiple Selection', function() {
});
});

describe("trying to set the value to a non-array", function() {
// TODO: come back to this when https://github.com/emberjs/ember.js/issues/15013 is resolved.
// Ember 2.11 broke testing code that throws exceptions.
describe.skip("trying to set the value to a non-array", function() {
beforeEach(function() {
try {
Ember.run(() => {
Expand Down
8 changes: 6 additions & 2 deletions tests/acceptance/x-select-single-test.js
Expand Up @@ -3,8 +3,12 @@

import Ember from 'ember';
import startApp from '../helpers/start-app';
import { it } from 'ember-mocha';
import { beforeEach, afterEach, describe } from 'mocha';
import {
beforeEach,
afterEach,
describe,
it
} from 'mocha';
import { select } from 'dummy/tests/helpers/x-select';
import { stanley } from 'dummy/mixins/folks';
import { shouldBindAttrs } from './shared/attr-test';
Expand Down
8 changes: 6 additions & 2 deletions tests/acceptance/x-select-zany-embedded-html-test.js
Expand Up @@ -3,8 +3,12 @@

import Ember from 'ember';
import startApp from '../helpers/start-app';
import { it } from 'ember-mocha';
import { beforeEach, afterEach, describe } from 'mocha';
import {
beforeEach,
afterEach,
describe,
it
} from 'mocha';


let App;
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/environment.js
@@ -1,4 +1,4 @@
/* jshint node: true */
/* eslint-env node */

module.exports = function(environment) {
var ENV = {
Expand Down
12 changes: 3 additions & 9 deletions tests/helpers/start-app.js
Expand Up @@ -4,19 +4,13 @@ import config from '../../config/environment';
import './get-component-by-id';

export default function startApp(attrs) {
let application;

// Warning for the Ember-CLI upgrader:
// Don't update this line to Ember.assign because we must test in
// versions of ember that don't have Ember.assign.
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;

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

return application;
}

0 comments on commit 8b88a69

Please sign in to comment.