Skip to content

Commit

Permalink
Update to Ember 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dgavey committed Mar 29, 2017
1 parent c0fe207 commit 7f3c00f
Show file tree
Hide file tree
Showing 18 changed files with 103 additions and 75 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
"no-console": 0
}
};
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
testem.log
.idea/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.jshintrc
.watchmanconfig
.travis.yml
Expand Down
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ cache:

env:
- EMBER_TRY_SCENARIO=default
- EMBER_TRY_SCENARIO=ember-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.4
- EMBER_TRY_SCENARIO=ember-lts-2.8
- 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 All @@ -26,8 +28,8 @@ before_install:
- npm config set spin false
- npm install -g bower
- bower --version
- npm install phantomjs-prebuilt
- node_modules/phantomjs-prebuilt/bin/phantomjs --version
- npm install -g bower phantomjs-prebuilt
- phantomjs --version

install:
- npm install
Expand Down
5 changes: 1 addition & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"name": "ember-drag-drop",
"dependencies": {
"ember": "~2.10.0",
"ember-cli-shims": "0.1.3"
}
"dependencies": {}
}
60 changes: 37 additions & 23 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,35 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
scenarios: [
{
name: 'default',
bower: {
dependencies: { }
}
},
{
name: 'ember-1.13',
name: 'ember-lts-2.4',
bower: {
dependencies: {
'ember': '~1.13.0'
'ember': 'components/ember#lts-2-4'
},
resolutions: {
'ember': '~1.13.0'
'ember': 'lts-2-4'
}
}
},
{
name: 'ember-2.4',
bower: {
dependencies: {
'ember': '~2.4'
},
resolutions: {
'ember': '~2.4'
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-2.8',
name: 'ember-lts-2.8',
bower: {
dependencies: {
'ember': '~2.8'
'ember': 'components/ember#lts-2-8'
},
resolutions: {
'ember': '~2.8'
'ember': 'lts-2-8'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
Expand All @@ -49,6 +42,11 @@ module.exports = {
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -60,6 +58,11 @@ module.exports = {
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
Expand All @@ -71,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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*jshint node:true*/
/* eslint-env node */
'use strict';

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

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

/*
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
@@ -1,4 +1,4 @@
/* jshint node: true */
/* eslint-env node */
'use strict';

module.exports = {
Expand Down
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ember-drag-drop",
"version": "0.4.2",
"version": "0.4.3",
"description": "Addon for Ember CLI to do drag and drop",
"directories": {
"doc": "doc",
Expand All @@ -23,32 +23,31 @@
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "2.8.0",
"ember-cli-app-version": "^2.0.0",
"ember-cli": "^2.12.1",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-htmlbars": "^1.0.10",
"ember-cli-htmlbars-inline-precompile": "^0.3.3",
"ember-cli-github-pages": "0.1.2",
"ember-cli-eslint": "^3.0.0",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.6",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^2.0.1",
"ember-cli-qunit": "^3.0.1",
"ember-cli-release": "^0.2.9",
"ember-cli-qunit": "^3.1.0",
"ember-cli-shims": "^1.0.2",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.10.0",
"ember-data": "^2.12.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-load-initializers": "^0.6.0",
"ember-resolver": "^2.0.3",
"ember-welcome-page": "^1.0.1",
"loader.js": "^4.0.1",
"ember-cli-github-pages": "0.1.2"
"ember-source": "~2.12.0",
"ember-welcome-page": "^2.0.2",
"loader.js": "^4.2.3"
},
"keywords": [
"ember-addon"
],
"dependencies": {
"ember-cli-babel": "^5.1.7"
"ember-cli-babel": "^5.2.4"
},
"ember-addon": {
"configPath": "tests/dummy/config",
Expand Down
3 changes: 1 addition & 2 deletions testem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*jshint node:true*/
/* eslint-env node */
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
Expand Down
5 changes: 5 additions & 0 deletions tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
env: {
embertest: true
}
};
1 change: 1 addition & 0 deletions tests/helpers/assertions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* global equal*/
import Ember from 'ember';
const $ = this.$;

var f = function() {
Ember.Test.registerAsyncHelper('hasActivePage', function(app, num, context) {
Expand Down
13 changes: 5 additions & 8 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ import Application from '../../app';
import config from '../../config/environment';

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

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

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

return application;
}
2 changes: 1 addition & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{content-for "body"}}
{{content-for "test-body"}}

<script src="{{rootURL}}testem.js" integrity=""></script>
<script src="/testem.js" integrity=""></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/dummy.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/components/helpers-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test('drag helper drags to a draggable object target and calls the action upon d

test('drag helper allows a callback to be called before dropping', function(assert) {
assert.expect(3);

const $ = this.$;
let coordinator = Coordinator.create();

coordinator.on('objectMoved', function(ops) {
Expand Down
16 changes: 8 additions & 8 deletions tests/integration/components/sortable-objects-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ test('sortable object renders draggable objects', function(assert) {
this.on('sortEndAction', function() {
const pojoObj = self.get('pojoData');
//make sure object is in the right order
assert.equal(pojoObj[0].id, 2);
assert.equal(pojoObj[1].id, 1);
assert.equal(pojoObj[2].id, 3);
assert.equal(pojoObj[3].id, 4);
assert.equal(pojoObj[0].id, 2, 'Pojo item one is correct');
assert.equal(pojoObj[1].id, 1, 'Pojo item two is correct');
assert.equal(pojoObj[2].id, 3, 'Pojo item three is correct');
assert.equal(pojoObj[3].id, 4, 'Pojo item four is correct');

});
this.render(hbs`
Expand Down Expand Up @@ -143,10 +143,10 @@ test('sortable object renders draggable objects using shift algorithm', function
this.on('sortEndAction', function() {
const pojoObj = self.get('pojoData');
//make sure object is in the right order
assert.equal(pojoObj[0].id, 2);
assert.equal(pojoObj[1].id, 3);
assert.equal(pojoObj[2].id, 1);
assert.equal(pojoObj[3].id, 4);
assert.equal(pojoObj[0].id, 2, 'Pojo item one is correct');
assert.equal(pojoObj[1].id, 3, 'Pojo item two is correct');
assert.equal(pojoObj[2].id, 1, 'Pojo item three is correct');
assert.equal(pojoObj[3].id, 4, 'Pojo item four is correct');

});
this.render(hbs`
Expand Down
6 changes: 3 additions & 3 deletions todo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1. Get X axis working for detecting if drag object is active
2. Test Ember 2.9 and fix it on glimmer2
3. Restore beta testing to travis
4. Make issue for future plans for the re-write of the library
2. Make issue for future plans for the re-write of the library
3. Get sort container to accept drop when nothing is in it.
4. Add docs for the onMouse events from PR 80

0 comments on commit 7f3c00f

Please sign in to comment.