From 41dd9ccd54322eb7bcdde993c99bc3042e763544 Mon Sep 17 00:00:00 2001 From: iggor_kurr Date: Tue, 18 Aug 2015 21:38:10 +0300 Subject: [PATCH 1/2] update ember --- addon/components/admin-batch-checkbox.js | 2 +- addon/mixins/controllers/attributes.js | 6 +++--- bower.json | 14 ++++++++------ package.json | 4 ++-- tests/acceptance/sorting-test.js | 6 +++--- tests/index.html | 8 ++++++++ 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/addon/components/admin-batch-checkbox.js b/addon/components/admin-batch-checkbox.js index dadcd63..52b08f7 100644 --- a/addon/components/admin-batch-checkbox.js +++ b/addon/components/admin-batch-checkbox.js @@ -12,7 +12,7 @@ var batchCheckbox = Ember.Checkbox.extend({ return this.get('batches').removeObject(this.get('context')); } }), - observerForChangeBatchesCollection: Ember.observer('batches.@each', function() { + observerForChangeBatchesCollection: Ember.observer('batches.[]', function() { return Ember.run.later((function(_this) { return function() { if (_this.get('batches').length === 0 && _this.get('selectAll')) { diff --git a/addon/mixins/controllers/attributes.js b/addon/mixins/controllers/attributes.js index 5242b32..176faf3 100644 --- a/addon/mixins/controllers/attributes.js +++ b/addon/mixins/controllers/attributes.js @@ -2,19 +2,19 @@ import Ember from 'ember'; import Attributes from 'ember-cli-admin/dsl/attributes'; export default Ember.Mixin.create({ - formAttributes: Ember.computed('modelAttributes.@each', { + formAttributes: Ember.computed('modelAttributes.[]', { get: function() { return Attributes.withoutId(this.get("model").constructor); } }), - showAttributes: Ember.computed('modelAttributes.@each', { + showAttributes: Ember.computed('modelAttributes.[]', { get: function(){ return Attributes.withoutId(this.get("model").constructor); } }), - tableAttributes: Ember.computed('modelAttributes.@each', { + tableAttributes: Ember.computed('modelAttributes.[]', { get: function() { return this.get('modelAttributes'); } diff --git a/bower.json b/bower.json index e26e3a5..cbeab8d 100644 --- a/bower.json +++ b/bower.json @@ -2,26 +2,28 @@ "name": "ember-cli-admin", "dependencies": { "jquery": "^1.11.1", - "ember": "1.13.2", - "ember-data": "1.13.4", + "ember": "2.0.0", + "ember-data": "2.0.0-beta.2", "ember-resolver": "~0.1.12", "loader.js": "stefanpenner/loader.js#3.2.1", "ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3", "ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.1.3", "ember-load-initializers": "stefanpenner/ember-load-initializers#0.1.4", - "ember-qunit": "0.4.1", + "ember-qunit": "0.4.7", "ember-qunit-notifications": "0.0.7", "qunit": "~1.17.1", - "pretender": "~0.6.0", + "pretender": "~0.9.0", "bootstrap-datepicker": "~1.4.0", - "ember-inflector": "~1.3.1", "lodash": "~3.7.0", - "Faker": "~2.1.3" + "Faker": "~3.0.0" }, "devDependencies": { "bootstrap-sass-official": "~3.3.4", "typeahead.js": "~0.11.1", "jquery-ui-sortable": "*", "jquery-ui-touch-punch-improved": "*" + }, + "resolutions": { + "ember": "2.0.0" } } diff --git a/package.json b/package.json index ec823d3..3098d76 100644 --- a/package.json +++ b/package.json @@ -52,11 +52,11 @@ "ember-cli-ic-ajax": "0.1.1", "ember-cli-inject-live-reload": "^1.3.0", "ember-cli-map": "0.4.2", - "ember-cli-mirage": "0.1.5", + "ember-cli-mirage": "0.1.8", "ember-cli-qunit": "0.3.15", "ember-cli-sass": "4.0.0-beta.5", "ember-cli-uglify": "1.0.1", - "ember-data": "1.13.4", + "ember-data": "2.0.0-beta.2", "ember-disable-prototype-extensions": "^1.0.0", "ember-disable-proxy-controllers": "^1.0.0", "ember-export-application-global": "^1.0.2", diff --git a/tests/acceptance/sorting-test.js b/tests/acceptance/sorting-test.js index 7922069..922e68f 100644 --- a/tests/acceptance/sorting-test.js +++ b/tests/acceptance/sorting-test.js @@ -47,8 +47,8 @@ test('switching from sorting by one attribute to another works as expected - rec function(assert) { assert.expect(1); - let user = users[2]; - user.name = 'Aaron'; + let user = server.create('user', {id: 3, name: 'Aaron'}); + let avatar = server.create('avatar', {id: 6}); visit('/users'); @@ -59,4 +59,4 @@ test('switching from sorting by one attribute to another works as expected - rec andThen(function() { assert.equal(find('tbody tr:first td[data-column="id"]:contains("3")').length, 1); }); - }); +}); diff --git a/tests/index.html b/tests/index.html index c880453..9eee383 100644 --- a/tests/index.html +++ b/tests/index.html @@ -22,6 +22,14 @@ + {{content-for 'body-footer'}} {{content-for 'test-body-footer'}} From c34b27b11f607e268e151736e732d17edbc1fe34 Mon Sep 17 00:00:00 2001 From: iggor_kurr Date: Tue, 18 Aug 2015 21:43:08 +0300 Subject: [PATCH 2/2] update ember-cli --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3098d76..42bd0df 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "broccoli-concat": "0.0.12", "broccoli-merge-trees": "^0.2.1", "broccoli-static-compiler": "^0.2.1", - "ember-cli": "1.13.1", + "ember-cli": "1.13.8", "ember-cli-app-version": "0.3.3", "ember-cli-bootstrap-datepicker": "0.5.3", "ember-cli-content-security-policy": "0.4.0",