Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ember CLI and deps #28

Merged
merged 1 commit into from
Jul 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 10 additions & 9 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,15 +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
ember-cli-build.js
Brocfile.js
testem.json
testem.js
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
language: node_js
node_js:
- "0.12"
- "4"

sudo: false

Expand All @@ -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
Expand All @@ -21,14 +22,15 @@ 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
- npm install phantomjs-prebuilt

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 $EMBER_TRY_SCENARIO test --skip-cleanup
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp"]
"ignore_dirs": ["tmp", "dist"]
}
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
12 changes: 4 additions & 8 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
"name": "emberx-file-input",
"dependencies": {
"ember": "1.13.0",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-mocha": "~0.8.0",
"ember-mocha": "~0.8.11",
"chai-jquery": "~2.0.0",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.8",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
"ember-resolver": "~0.1.18",
"jquery": "1.11.3",
"loader.js": "ember-cli/loader.js#3.2.1"
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-qunit-notifications": "0.1.0"
}
}
52 changes: 36 additions & 16 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,54 @@
/*jshint node:true*/
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'
}
}
}
]
Expand Down
1 change: 1 addition & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*jshint node:true*/
'use strict';

module.exports = function(/* environment, appConfig */) {
Expand Down
8 changes: 4 additions & 4 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-addon');
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
var app = new EmberApp(defaults, {
var app = new EmberAddon(defaults, {
// Add options here
});

app.import('vendor/style.css');
app.import('bower_components/chai-jquery/chai-jquery.js', {type: 'test'});

/*
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
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ module.exports = {
included: function(app) {
this._super.included(app);

this.import('vendor/style.css');
app.import('vendor/style.css');
}
};
37 changes: 18 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:testall"
"test": "ember try:each"
},
"repository": "https://github.com/thefrontside/emberx-file-input",
"engines": {
Expand All @@ -18,23 +18,22 @@
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.1.2",
"ember-cli": "1.13.8",
"ember-cli-app-version": "0.5.0",
"ember-cli-dependency-checker": "^1.0.1",
"ember-cli-github-pages": "0.0.6",
"ember-cli-htmlbars-inline-precompile": "^0.2.0",
"ember-cli-ic-ajax": "0.2.1",
"ember-cli-import-polyfill": "0.1.0",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-mocha": "~0.8.0",
"ember-cli-release": "0.2.3",
"ember-cli-sri": "^1.0.3",
"ember-cli-mocha": "0.10.4",
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "^2.0.1",
"ember-cli": "2.6.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
"ember-cli-jshint": "^1.0.0",
"ember-cli-release": "^0.2.9",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.3",
"ember-try": "0.0.6"
"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",
"loader.js": "^4.0.1"
},
"keywords": [
"ember-addon",
Expand All @@ -43,8 +42,8 @@
"custom file input"
],
"dependencies": {
"ember-cli-htmlbars": "0.7.4",
"ember-cli-babel": "^5.1.3"
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-babel": "^5.1.6"
},
"ember-addon": {
"configPath": "tests/dummy/config",
Expand Down
13 changes: 13 additions & 0 deletions testem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*jshint node:true*/
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"PhantomJS"
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
]
};
8 changes: 4 additions & 4 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

var App;
let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver: Resolver
Resolver
});

loadInitializers(App, config.modulePrefix);
Expand Down
9 changes: 4 additions & 5 deletions tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for 'head'}}
{{content-for "head"}}

<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/dummy.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">

{{content-for 'head-footer'}}
{{content-for "head-footer"}}
</head>
<body>
{{content-for 'body'}}
{{content-for "body"}}

<script src="assets/vendor.js"></script>
<script src="assets/dummy.js"></script>

{{content-for 'body-footer'}}
{{content-for "body-footer"}}
</body>
</html>
3 changes: 3 additions & 0 deletions tests/dummy/app/resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Resolver from 'ember-resolver';

export default Resolver;
2 changes: 1 addition & 1 deletion tests/dummy/app/router.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ember from 'ember';
import config from './config/environment';

var Router = Ember.Router.extend({
const Router = Ember.Router.extend({
location: config.locationType
});

Expand Down
5 changes: 5 additions & 0 deletions tests/helpers/destroy-app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Ember from 'ember';

export default function destroyApp(application) {
Ember.run(application, 'destroy');
}
23 changes: 23 additions & 0 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
@@ -0,0 +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) {
return options.beforeEach.apply(this, arguments);
}
},

afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
}
});
}
4 changes: 2 additions & 2 deletions tests/helpers/resolver.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Resolver from 'ember/resolver';
import Resolver from '../../resolver';
import config from '../../config/environment';

var resolver = Resolver.create();
const resolver = Resolver.create();

resolver.namespace = {
modulePrefix: config.modulePrefix,
Expand Down
6 changes: 3 additions & 3 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import Application from '../../app';
import config from '../../config/environment';

export default function startApp(attrs) {
var application;
let application;

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

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