Permalink
Browse files

Merge pull request #819 from stefanpenner/upgradeEmberAndReadOnly

Upgrade ember so Computed#readOnly is available
  • Loading branch information...
2 parents 4a18479 + 9df9b44 commit 57d6c01cd23f22150cbc27774a79c0f7a2cdee8d @stefanpenner stefanpenner committed Mar 18, 2013
Showing with 2,391 additions and 1,806 deletions.
  1. +1 −2 Gemfile
  2. +7 −7 Gemfile.lock
  3. +4 −4 packages/ember-data/lib/system/application_ext.js
  4. +1 −4 packages/ember-data/lib/system/model/model.js
  5. +2,378 −1,789 packages/ember/lib/main.js
View
@@ -3,5 +3,4 @@ source "https://rubygems.org"
gem "rake-pipeline", :git => "https://github.com/livingsocial/rake-pipeline.git"
gem "ember-dev", :git => "https://github.com/emberjs/ember-dev.git", :branch => "master"
-# Change to "1.0.0.rc1.2" to test rc1
-gem "ember-source", "1.0.0.pre4.2"
+gem "ember-source", "1.0.0.rc1.4"
View
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/emberjs/ember-dev.git
- revision: a0e3e6816bfd093d7a732b77d7f08395ab48a61e
+ revision: 2f17d36959adb2dc7b172fe9c8b34a4b99725507
branch: master
specs:
ember-dev (0.1)
@@ -17,7 +17,7 @@ GIT
GIT
remote: https://github.com/livingsocial/rake-pipeline.git
- revision: ee992cbcda5172075062be035bcbef2cf1b0ff5d
+ revision: 65b1e744defa208e313703d89f3453447cc103b2
specs:
rake-pipeline (0.8.0)
json
@@ -29,21 +29,21 @@ GEM
specs:
colored (1.2)
diff-lcs (1.2.1)
- ember-source (1.0.0.pre4.2)
- handlebars-source (>= 1.0.0.rc2, < 1.0.0.rc3)
+ ember-source (1.0.0.rc1.4)
+ handlebars-source (>= 1.0.0.rc3, < 1.0.0.rc4)
execjs (1.4.0)
multi_json (~> 1.0)
grit (2.5.0)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
- handlebars-source (1.0.0.rc.2)
+ handlebars-source (1.0.0.rc.3)
json (1.7.7)
kicker (2.6.1)
listen
listen (0.7.3)
mime-types (1.21)
- multi_json (1.6.1)
+ multi_json (1.7.0)
posix-spawn (0.3.6)
rack (1.5.2)
rake (10.0.3)
@@ -60,5 +60,5 @@ PLATFORMS
DEPENDENCIES
ember-dev!
- ember-source (= 1.0.0.pre4.2)
+ ember-source (= 1.0.0.rc1.4)
rake-pipeline!
@@ -69,7 +69,7 @@ Ember.onLoad('Ember.Application', function(Application) {
name: "store",
initialize: function(container, application) {
- container.register('store', 'main', application.Store);
+ application.register('store:main', application.Store);
// Eagerly generate the store so defaultStore is populated.
// TODO: Do this in a finisher hook
@@ -80,9 +80,9 @@ Ember.onLoad('Ember.Application', function(Application) {
Application.initializer({
name: "injectStore",
- initialize: function(container) {
- container.typeInjection('controller', 'store', 'store:main');
- container.typeInjection('route', 'store', 'store:main');
+ initialize: function(container, application) {
+ application.inject('controller', 'store', 'store:main');
+ application.inject('route', 'store', 'store:main');
}
});
}
@@ -6,11 +6,8 @@ var LoadPromise = DS.LoadPromise; // system/mixins/load_promise
var get = Ember.get, set = Ember.set, map = Ember.EnumerableUtils.map;
var retrieveFromCurrentState = Ember.computed(function(key, value) {
- if (arguments.length > 1) {
- throw new Error('Cannot Set: ' + key + ' on: ' + this.toString() );
- }
return get(get(this, 'stateManager.currentState'), key);
-}).property('stateManager.currentState');
+}).property('stateManager.currentState').readOnly();
DS.Model = Ember.Object.extend(Ember.Evented, LoadPromise, {
isLoaded: retrieveFromCurrentState,
Oops, something went wrong. Retry.

0 comments on commit 57d6c01

Please sign in to comment.