Skip to content
This repository
Browse code

Merge pull request #819 from stefanpenner/upgradeEmberAndReadOnly

Upgrade ember so Computed#readOnly is available
  • Loading branch information...
commit 57d6c01cd23f22150cbc27774a79c0f7a2cdee8d 2 parents 4a18479 + 9df9b44
Stefan Penner authored
3  Gemfile
@@ -3,5 +3,4 @@ source "https://rubygems.org"
3 3
 gem "rake-pipeline", :git => "https://github.com/livingsocial/rake-pipeline.git"
4 4
 gem "ember-dev", :git => "https://github.com/emberjs/ember-dev.git", :branch => "master"
5 5
 
6  
-# Change to "1.0.0.rc1.2" to test rc1
7  
-gem "ember-source", "1.0.0.pre4.2"
  6
+gem "ember-source", "1.0.0.rc1.4"
14  Gemfile.lock
... ...
@@ -1,6 +1,6 @@
1 1
 GIT
2 2
   remote: https://github.com/emberjs/ember-dev.git
3  
-  revision: a0e3e6816bfd093d7a732b77d7f08395ab48a61e
  3
+  revision: 2f17d36959adb2dc7b172fe9c8b34a4b99725507
4 4
   branch: master
5 5
   specs:
6 6
     ember-dev (0.1)
@@ -17,7 +17,7 @@ GIT
17 17
 
18 18
 GIT
19 19
   remote: https://github.com/livingsocial/rake-pipeline.git
20  
-  revision: ee992cbcda5172075062be035bcbef2cf1b0ff5d
  20
+  revision: 65b1e744defa208e313703d89f3453447cc103b2
21 21
   specs:
22 22
     rake-pipeline (0.8.0)
23 23
       json
@@ -29,21 +29,21 @@ GEM
29 29
   specs:
30 30
     colored (1.2)
31 31
     diff-lcs (1.2.1)
32  
-    ember-source (1.0.0.pre4.2)
33  
-      handlebars-source (>= 1.0.0.rc2, < 1.0.0.rc3)
  32
+    ember-source (1.0.0.rc1.4)
  33
+      handlebars-source (>= 1.0.0.rc3, < 1.0.0.rc4)
34 34
     execjs (1.4.0)
35 35
       multi_json (~> 1.0)
36 36
     grit (2.5.0)
37 37
       diff-lcs (~> 1.1)
38 38
       mime-types (~> 1.15)
39 39
       posix-spawn (~> 0.3.6)
40  
-    handlebars-source (1.0.0.rc.2)
  40
+    handlebars-source (1.0.0.rc.3)
41 41
     json (1.7.7)
42 42
     kicker (2.6.1)
43 43
       listen
44 44
     listen (0.7.3)
45 45
     mime-types (1.21)
46  
-    multi_json (1.6.1)
  46
+    multi_json (1.7.0)
47 47
     posix-spawn (0.3.6)
48 48
     rack (1.5.2)
49 49
     rake (10.0.3)
@@ -60,5 +60,5 @@ PLATFORMS
60 60
 
61 61
 DEPENDENCIES
62 62
   ember-dev!
63  
-  ember-source (= 1.0.0.pre4.2)
  63
+  ember-source (= 1.0.0.rc1.4)
64 64
   rake-pipeline!
8  packages/ember-data/lib/system/application_ext.js
@@ -69,7 +69,7 @@ Ember.onLoad('Ember.Application', function(Application) {
69 69
       name: "store",
70 70
 
71 71
       initialize: function(container, application) {
72  
-        container.register('store', 'main', application.Store);
  72
+        application.register('store:main', application.Store);
73 73
 
74 74
         // Eagerly generate the store so defaultStore is populated.
75 75
         // TODO: Do this in a finisher hook
@@ -80,9 +80,9 @@ Ember.onLoad('Ember.Application', function(Application) {
80 80
     Application.initializer({
81 81
       name: "injectStore",
82 82
 
83  
-      initialize: function(container) {
84  
-        container.typeInjection('controller', 'store', 'store:main');
85  
-        container.typeInjection('route', 'store', 'store:main');
  83
+      initialize: function(container, application) {
  84
+        application.inject('controller', 'store', 'store:main');
  85
+        application.inject('route', 'store', 'store:main');
86 86
       }
87 87
     });
88 88
   }
5  packages/ember-data/lib/system/model/model.js
@@ -6,11 +6,8 @@ var LoadPromise = DS.LoadPromise; // system/mixins/load_promise
6 6
 var get = Ember.get, set = Ember.set, map = Ember.EnumerableUtils.map;
7 7
 
8 8
 var retrieveFromCurrentState = Ember.computed(function(key, value) {
9  
-  if (arguments.length > 1) {
10  
-    throw new Error('Cannot Set: ' + key + ' on: ' + this.toString() );
11  
-  }
12 9
   return get(get(this, 'stateManager.currentState'), key);
13  
-}).property('stateManager.currentState');
  10
+}).property('stateManager.currentState').readOnly();
14 11
 
15 12
 DS.Model = Ember.Object.extend(Ember.Evented, LoadPromise, {
16 13
   isLoaded: retrieveFromCurrentState,
4,167  packages/ember/lib/main.js
2378 additions, 1789 deletions not shown

0 notes on commit 57d6c01

Please sign in to comment.
Something went wrong with that request. Please try again.