motion-prime 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjkxNWIwMDczNzQ2YmQ4ZDI0MTYzZTgyZWZmNjU5NjA1M2JmYzk4Yw==
4
+ MDNjNmUxZTA5MDQxMjZlMWZlYzU5YTQ5NDExZmU2NzRlNjA2ZGQ1Mw==
5
5
  data.tar.gz: !binary |-
6
- ZTcyODg5OGMxNDY3YjUyYmM4ZDIzZjEzY2JjYzg2ZjIxYzE5M2NkYw==
6
+ MDY0MzhiNjc1MzU0YWExMTA1ZDdkOGM0MjYzOWM2Yzk0NGZkN2Q3OA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YzA4OGEzZTg0NWFkN2QwYmRlZjc3MTljMGM4MDk0MDU3NzY5MzAzMTQzNDJi
10
- YzU5ODE5NmRjMjRhMDE3MjRlYzRiNWU3M2U2YWVkZGFjNjA0Nzc5NjYwZGY5
11
- NmVmNzAwNDU5OGM2MmQ4NzY0NzJjNmJiMGJmYWFiYjUzOWQ4MDc=
9
+ MzVhOTRjNjA3NDI1ODNlMzNkZWQ0NzlkYTU2ZmRkMzA5ZjljMGUwYTk5Zjlm
10
+ MzIxMmIwZjA0MDkyMjg0MDk3YzdlNDZiZmEzNDM1NTE5YjMwNTJkYmJkZDBh
11
+ OGIxYmE0ZWZjZmU1MmNmZWNiY2Q5MzAyYWVjODViZGIzNWQyMTE=
12
12
  data.tar.gz: !binary |-
13
- ODkxN2E4Y2ExZWQ1OGY4NjRiMmQ2ZTM3ZDU4NThiMDQ0MTliZDcyMzgwYmRl
14
- ZjUxZDg5YjIwMzEyYzQ1NmZlZDA0YzhjOWU0MDUyNzZiNjhkNDRmOGIzZGMy
15
- NGJjNDI4NGY0OTNhODFhYWI0NDUxMDM4MmMwMmYxM2M3MDZiOWY=
13
+ YzBlZjk3NmRjM2I3NzA0NjU5ZTllMmEzNjYwY2VmNDhjMzY1YWYyMjc5OTA2
14
+ ZGVkZGUxMDVlNzFlNDA3NGVjMGVjZmY1NjgyOTI2N2Y4MGI0MTJjOTRiNGJm
15
+ Y2MxODBlMWUyOWZiZmVkZTU4NTFhOWYyZTBlM2E4MDljODZhMDc=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.8.7
2
+ * Refactored and improved model attributes convertion.
3
+ * Refactored and improved model#dirty.
4
+ * Added auto-generating model id by default.
5
+
1
6
  === 0.8.6
2
7
  * Ability to pass :after_render to form field.
3
8
  * Ability to append data to collection on sync.
data/Gemfile CHANGED
@@ -1,5 +1,4 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  gem 'motion-cocoapods', '~> 1.4.0'
4
- gem 'motion-support', '~> 0.2.4'
5
4
  gemspec
data/Gemfile.lock CHANGED
@@ -1,49 +1,51 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- motion-prime (0.8.6)
4
+ motion-prime (0.8.7)
5
5
  afmotion (~> 2.0.0)
6
- bubble-wrap (~> 1.4.0)
6
+ bubble-wrap (~> 1.5.0)
7
7
  cocoapods
8
8
  methadone
9
9
  motion-cocoapods
10
10
  motion-require
11
- motion-support
11
+ motion-support (~> 0.2.6)
12
12
  rm-digest
13
- sugarcube (~> 1.3.11)
13
+ sugarcube (~> 1.5.2)
14
14
 
15
15
  GEM
16
16
  remote: http://rubygems.org/
17
17
  specs:
18
- activesupport (3.2.16)
18
+ activesupport (3.2.17)
19
19
  i18n (~> 0.6, >= 0.6.4)
20
20
  multi_json (~> 1.0)
21
21
  afmotion (2.0.0)
22
22
  motion-cocoapods (~> 1.4.0)
23
23
  motion-require (~> 0.0.7)
24
- bubble-wrap (1.4.0)
24
+ bubble-wrap (1.5.0)
25
25
  claide (0.4.0)
26
- cocoapods (0.28.0)
26
+ cocoapods (0.29.0)
27
27
  activesupport (>= 3.2.15, < 4)
28
28
  claide (~> 0.4.0)
29
- cocoapods-core (= 0.28.0)
30
- cocoapods-downloader (~> 0.2.0)
29
+ cocoapods-core (= 0.29.0)
30
+ cocoapods-downloader (~> 0.3.0)
31
+ cocoapods-try-release-fix (~> 0.1.1)
31
32
  colored (~> 1.2)
32
33
  escape (~> 0.0.4)
33
34
  json_pure (~> 1.8)
35
+ nap (~> 0.5)
34
36
  open4 (~> 1.3)
35
37
  xcodeproj (~> 0.14.1)
36
- cocoapods-core (0.28.0)
38
+ cocoapods-core (0.29.0)
37
39
  activesupport (>= 3.2.15, < 4)
38
40
  fuzzy_match (~> 2.0.4)
39
- json (~> 1.8)
41
+ json_pure (~> 1.8)
40
42
  nap (~> 0.5)
41
- cocoapods-downloader (0.2.0)
43
+ cocoapods-downloader (0.3.0)
44
+ cocoapods-try-release-fix (0.1.2)
42
45
  colored (1.2)
43
46
  escape (0.0.4)
44
47
  fuzzy_match (2.0.4)
45
48
  i18n (0.6.9)
46
- json (1.8.1)
47
49
  json_pure (1.8.1)
48
50
  methadone (1.3.2)
49
51
  bundler
@@ -51,15 +53,15 @@ GEM
51
53
  cocoapods (>= 0.26.2)
52
54
  motion-redgreen (0.1.0)
53
55
  motion-require (0.0.7)
54
- motion-stump (0.3.0)
55
- motion-support (0.2.5)
56
+ motion-stump (0.3.1)
57
+ motion-support (0.2.6)
56
58
  motion-require (>= 0.0.6)
57
- multi_json (1.8.2)
59
+ multi_json (1.9.0)
58
60
  nap (0.6.0)
59
- open4 (1.3.0)
60
- rake (10.1.0)
61
+ open4 (1.3.3)
62
+ rake (10.1.1)
61
63
  rm-digest (0.0.2)
62
- sugarcube (1.3.11)
64
+ sugarcube (1.5.2)
63
65
  xcodeproj (0.14.1)
64
66
  activesupport (~> 3.0)
65
67
  colored (~> 1.2)
@@ -73,5 +75,4 @@ DEPENDENCIES
73
75
  motion-prime!
74
76
  motion-redgreen
75
77
  motion-stump
76
- motion-support (~> 0.2.4)
77
78
  rake
data/ROADMAP.md CHANGED
@@ -2,7 +2,7 @@
2
2
  * Move api_client and model sync mixin to prime_api gem.
3
3
  * Move bind keyboard events to forms.
4
4
 
5
- === 0.1.0
5
+ === 1.0.0
6
6
  * bug: if mp label do not have text and was set as hidden, it should unhide after setting text
7
7
  * bug: size_to_fit works incorrect with relative width.
8
8
  * bug: bind_keyboard_close breaks bind_guesture
@@ -23,4 +23,4 @@
23
23
  * add computed_options.get(), this will allow to make sure that options is computed.
24
24
  * add testing framework
25
25
  * add DSL for ViewStyles#setValue conditions
26
- * add embed/regular has many types. embedded by default.
26
+ * add embed/regular has many types. embedded by default.
data/files/Gemfile CHANGED
@@ -1,9 +1,7 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  gem 'motion-cocoapods', '~> 1.4.0'
4
- gem 'motion-support', '~> 0.2.4'
5
-
6
- gem 'motion-prime', '0.8.6'
4
+ gem 'motion-prime', '0.8.7'
7
5
 
8
6
  # add reside menu for sidebar support
9
7
  gem 'prime_reside_menu', '~> 0.1.4'
@@ -1,3 +1,17 @@
1
1
  Prime::Config.configure do |config|
2
-
2
+ # Uncomments following if you don't want auto generating id for model on save
3
+ #
4
+ # config.model.auto_generate_id = false
5
+
6
+ # After defining colors you will be able to use it via <uilabel>.text_color = :app_base.uicolor
7
+ # config.colors do |colors|
8
+ # colors.base = 0x1b75bc
9
+ # colors.dark = 0x333333
10
+ # colors.error = 0xef471f
11
+ # end
12
+
13
+ # After defining fonts you will be able to use it via <uilabel>.font = :app_base.uifont
14
+ # config.fonts do |fonts|
15
+ # fonts.base = "Ubuntu"
16
+ # end
3
17
  end
data/motion-prime.gemspec CHANGED
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency "cocoapods"
24
24
  spec.add_dependency "motion-cocoapods"
25
25
  spec.add_dependency "motion-require"
26
- spec.add_dependency "motion-support"
27
- spec.add_dependency 'bubble-wrap', '~> 1.4.0'
28
- spec.add_dependency 'sugarcube', '~> 1.3.11'
26
+ spec.add_dependency "motion-support", '~> 0.2.6'
27
+ spec.add_dependency 'bubble-wrap', '~> 1.5.0'
28
+ spec.add_dependency 'sugarcube', '~> 1.5.2'
29
29
  spec.add_dependency 'afmotion', '~> 2.0.0'
30
30
  spec.add_dependency "methadone"
31
31
  spec.add_dependency "rm-digest"
@@ -5,6 +5,7 @@ MotionPrime::Config.configure do |config|
5
5
  else
6
6
  config.model.store_type = :file
7
7
  end
8
+ config.model.auto_generate_id = true
8
9
 
9
10
  config.fonts do |fonts|
10
11
  fonts.base = :system
@@ -10,6 +10,7 @@ module MotionPrime
10
10
  #
11
11
  # @return [Prime::Model] model
12
12
  def save
13
+ set_default_id_if_needed
13
14
  raise StoreError, 'No store provided' unless self.store
14
15
  error_ptr = Pointer.new(:id)
15
16
  self.store.addObject(self, error: error_ptr)
@@ -112,6 +113,41 @@ module MotionPrime
112
113
  self.class.new(self.info.select { |key, value| !key.to_s.ends_with?('_bag') })
113
114
  end
114
115
 
116
+ protected
117
+ def set_default_id_if_needed
118
+ if !self.id && MotionPrime::Config.model.auto_generate_id
119
+ self.id = RmDigest::MD5.hexdigest(Time.now.to_s + self.object_id.to_s)
120
+ end
121
+ end
122
+
123
+ def attribute_convert_out(value, type)
124
+ return value if value.nil? || type.blank?
125
+ case type.to_s
126
+ when 'integer'
127
+ value.to_i
128
+ when 'float'
129
+ value.to_f
130
+ when 'time'
131
+ Time.short_iso8601(value)
132
+ else
133
+ value
134
+ end
135
+ end
136
+
137
+ def attribute_convert_in(value, type)
138
+ return value if value.nil? || type.blank?
139
+ case type.to_s
140
+ when 'integer'
141
+ value.to_i
142
+ when 'float'
143
+ value.to_f
144
+ when 'time'
145
+ value.to_short_iso8601 unless value.is_a?(String)
146
+ else
147
+ value
148
+ end
149
+ end
150
+
115
151
  module ClassMethods
116
152
  # Initialize a new object
117
153
  #
@@ -123,17 +159,8 @@ module MotionPrime
123
159
  # @option options [Boolean] :validate_attribute_presence Raise error if model do not have attribute
124
160
  # @return MotionPrime::Model unsaved model
125
161
  def new(data = {}, options = {})
126
- data.keys.each do |key|
127
- unless self.attributes.member? key.to_sym
128
- if options[:validate_attribute_presence]
129
- raise StoreError, "unknown attribute: '#{key}'"
130
- else
131
- data.delete(key)
132
- end
133
- end
134
- end
135
-
136
- object = self.nanoObjectWithDictionary(data)
162
+ object = self.nanoObjectWithDictionary({})
163
+ object.assign_attributes(data, options)
137
164
  object
138
165
  end
139
166
 
@@ -162,47 +189,26 @@ module MotionPrime
162
189
  def attribute(name, options = {})
163
190
  attributes << name
164
191
 
165
- define_method(name) do |*args, &block|
166
- value = self.info[name]
167
- case options[:type].to_s
168
- when 'time'
169
- value = Time.short_iso8601(value) if value
192
+ define_method(:"#{name}=") do |value, &block|
193
+ track_changed_attributes do
194
+ if options[:convert] || !options.has_key?(:convert)
195
+ self.info[name] = attribute_convert_in(value, options[:type])
196
+ else
197
+ self.info[name] = value
198
+ end
170
199
  end
171
- value
172
- end
173
-
174
- define_method((name + "=").to_sym) do |*args, &block|
175
- value = args[0]
176
- case options[:type].to_s
177
- when 'integer'
178
- value = value.to_i
179
- when 'float'
180
- value = value.to_f
181
- when 'time'
182
- value = value.to_short_iso8601 unless value.is_a?(String)
183
- end unless value.nil?
184
-
185
- self.info[name] = value
186
200
  end
187
201
 
188
202
  define_method(name.to_sym) do
189
- value = self.info[name]
190
- case options[:type].to_s
191
- when 'integer'
192
- value.to_i
193
- when 'float'
194
- value.to_f
195
- when 'time' && !value.is_a?(String)
196
- value.to_short_iso8601
203
+ if options[:convert] || !options.has_key?(:convert)
204
+ attribute_convert_out(self.info[name], options[:type])
197
205
  else
198
- value
206
+ self.info[name]
199
207
  end
200
- end if options[:convert]
208
+ end
201
209
 
202
- if options[:type].to_s == 'boolean'
203
- define_method("#{name}?") do
204
- !!self.info[name]
205
- end
210
+ define_method("#{name}?") do
211
+ self.info[name].present?
206
212
  end
207
213
  end
208
214
 
@@ -25,13 +25,41 @@ module MotionPrime
25
25
  result
26
26
  end
27
27
 
28
- def has_changed?(key = nil)
28
+ def changed_attributes
29
29
  @_changed_attributes ||= {}
30
+ end
31
+
32
+ def reset_changed_attributes
33
+ @_changed_attributes = {}
34
+ end
35
+
36
+ # Return true if model was changed
37
+ #
38
+ # @param key [Symbol,String] (not required) will return result only for that attribute if specified
39
+ # @return result [Boolean] result
40
+ def has_changed?(key = nil)
30
41
  if key
31
- @_changed_attributes.has_key?(key.to_s)
42
+ changed_attributes.has_key?(key.to_s)
32
43
  else
33
- @_changed_attributes.present?
44
+ changed_attributes.present?
45
+ end
46
+ end
47
+
48
+ def save
49
+ super
50
+ reset_changed_attributes
51
+ self
52
+ end
53
+
54
+ # Reverts model changes and returns saved version
55
+ #
56
+ # @return model [MotionPrime::Model] reloaded model
57
+ def reload
58
+ changed_attributes.each do |key, value|
59
+ self.info[key] = value
34
60
  end
61
+ reset_changed_attributes
62
+ self
35
63
  end
36
64
  end
37
65
  end
@@ -1,3 +1,3 @@
1
1
  module MotionPrime
2
- VERSION = "0.8.6"
2
+ VERSION = "0.8.7"
3
3
  end
@@ -1,15 +1,10 @@
1
1
  class User < MotionPrime::Model
2
2
  attributes :name, :age, :created_at
3
3
  end
4
-
5
4
  class Plane < MotionPrime::Model
6
5
  attributes :name, :age
7
6
  end
8
7
 
9
- class Listing < MotionPrime::Model
10
- attribute :name
11
- end
12
-
13
8
  class Todo < MotionPrime::Model
14
9
  attribute :title
15
10
  bag :items
@@ -25,14 +20,6 @@ class Page < MotionPrime::Model
25
20
  attribute :index
26
21
  end
27
22
 
28
- class Animal < MotionPrime::Model
29
- attribute :name
30
- end
31
-
32
- class Autobot < MotionPrime::Model
33
- attribute :name
34
- end
35
-
36
23
  class Organization < MotionPrime::Model
37
24
  attribute :name
38
25
  has_many :projects
@@ -42,6 +29,13 @@ class Project < MotionPrime::Model
42
29
  attribute :title
43
30
  end
44
31
 
32
+ class Autobot < MotionPrime::Model
33
+ attribute :name
34
+ attribute :uid, type: :integer
35
+ attribute :release_at, type: :time
36
+ attribute :strength, type: :float
37
+ end
38
+
45
39
  module CustomModule; end
46
40
  class CustomModule::Car < MotionPrime::Model
47
41
  attribute :name
@@ -0,0 +1,34 @@
1
+ describe MotionPrime::Model do
2
+ before do
3
+ MotionPrime::Store.connect
4
+ @store = MotionPrime::Store.shared_store
5
+ end
6
+
7
+ after do
8
+ @store.clear
9
+ end
10
+
11
+ describe "has_changed?" do
12
+ before do
13
+ @user = stub_user("Bob", 10, Time.now)
14
+ @user.save
15
+ end
16
+
17
+ it "should be false after save" do
18
+ puts @user.changed_attributes
19
+ @user.has_changed?.should.be.false
20
+ end
21
+
22
+ it "should be true after attribute change" do
23
+ @user.name = "Smith"
24
+ @user.has_changed?.should.be.true
25
+ end
26
+
27
+ it "should be false after reload" do
28
+ @user.name = "Smith"
29
+ @user.reload
30
+ @user.has_changed?.should.be.false
31
+ @user.name.should == "Bob"
32
+ end
33
+ end
34
+ end
@@ -73,8 +73,8 @@ describe MotionPrime::Model do
73
73
 
74
74
  it "create object in their class" do
75
75
  @store.allObjectClasses.should == []
76
- Autobot.create(:name => "Bumblebee")
77
- @store.allObjectClasses.should == ["Autobot"]
76
+ Organization.create(:name => "Bumblebee")
77
+ @store.allObjectClasses.should == ["Organization"]
78
78
  end
79
79
  end
80
80
 
@@ -85,6 +85,17 @@ describe MotionPrime::Model do
85
85
  @store.count(User).should == 1
86
86
  end
87
87
 
88
+ it "should set default id" do
89
+ user1 = User.new
90
+ user2 = User.new
91
+ user1.id = 123
92
+ user1.save
93
+ user2.save
94
+
95
+ user1.id.should == 123
96
+ user2.id.present?.should.be.true
97
+ end
98
+
88
99
  # per object store since NanoStore 2.5.1
89
100
  it "user per instance store to save" do
90
101
  store1 = MotionPrime::Store.create
@@ -207,4 +218,17 @@ describe MotionPrime::Model do
207
218
  Plane.count.should == 1
208
219
  end
209
220
  end
221
+
222
+ describe "#attribute" do
223
+ it "should correctly save non-string attributes" do
224
+ release = Time.now + 1.day.to_i
225
+ Autobot.create(name: "Optimus Prime", uid: 1, release_at: release, strength: 15.7)
226
+ autobot = Autobot.find(uid: 1).first
227
+ autobot.name.is_a?(String).should.be.true
228
+ autobot.uid.is_a?(Integer).should.be.true
229
+ autobot.release_at.is_a?(Time).should.be.true
230
+ autobot.strength.is_a?(Float).should.be.true
231
+ autobot.release_at.should == release
232
+ end
233
+ end
210
234
  end
@@ -21,13 +21,13 @@ describe "Prime::Model Store Extension" do
21
21
  end
22
22
 
23
23
  it "should add, delete objects and count them" do
24
- obj1 = Animal.new
24
+ obj1 = Organization.new
25
25
  obj1.name = "Cat"
26
- obj2 = Animal.new
26
+ obj2 = Organization.new
27
27
  obj2.name = "Dog"
28
- obj3 = Animal.new
28
+ obj3 = Organization.new
29
29
  obj3.name = "Cow"
30
- obj4 = Animal.new
30
+ obj4 = Organization.new
31
31
  obj4.name = "Duck"
32
32
 
33
33
  @store << obj1
@@ -35,86 +35,86 @@ describe "Prime::Model Store Extension" do
35
35
  @store += obj4
36
36
 
37
37
  @store.save
38
- Animal.count.should == 4
38
+ Organization.count.should == 4
39
39
 
40
40
  @store.delete(obj1)
41
- Animal.count.should == 3
41
+ Organization.count.should == 3
42
42
 
43
43
  @store.delete_keys([obj2.key])
44
- Animal.count.should == 2
44
+ Organization.count.should == 2
45
45
 
46
46
  @store.clear
47
- Animal.count.should == 0
47
+ Organization.count.should == 0
48
48
  end
49
49
 
50
50
  it "should discard unsave changes" do
51
51
  @store.save_interval = 1000 # must use save_interval= to set auto save interval first
52
52
  @store.engine.synchronousMode = SynchronousModeFull
53
53
 
54
- Animal.count.should == 0
55
- obj1 = Animal.new
54
+ Organization.count.should == 0
55
+ obj1 = Organization.new
56
56
  obj1.name = "Cat"
57
- obj2 = Animal.new
57
+ obj2 = Organization.new
58
58
  obj2.name = "Dog"
59
59
 
60
60
  @store << [obj1, obj2]
61
61
  @store.changed?.should.be.true
62
62
  @store.discard
63
63
  @store.changed?.should.be.false
64
- Animal.count.should == 0
64
+ Organization.count.should == 0
65
65
  @store.save_interval = 1
66
66
  end
67
67
 
68
68
  it "should create a transaction and commit" do
69
69
  @store.transaction do |the_store|
70
- Animal.count.should == 0
71
- obj1 = Animal.new
70
+ Organization.count.should == 0
71
+ obj1 = Organization.new
72
72
  obj1.name = "Cat"
73
73
  obj1.save
74
74
 
75
- obj2 = Animal.new
75
+ obj2 = Organization.new
76
76
  obj2.name = "Dog"
77
77
  obj2.save
78
- Animal.count.should == 2
78
+ Organization.count.should == 2
79
79
  end
80
80
  @store.save
81
- Animal.count.should == 2
81
+ Organization.count.should == 2
82
82
  end
83
83
 
84
84
  it "should create a transaction and rollback when fail" do
85
85
  begin
86
86
  @store.transaction do |the_store|
87
- Animal.count.should == 0
88
- obj1 = Animal.new
87
+ Organization.count.should == 0
88
+ obj1 = Organization.new
89
89
  obj1.name = "Cat"
90
90
  obj1.save
91
91
 
92
- obj2 = Animal.new
92
+ obj2 = Organization.new
93
93
  obj2.name = "Dog"
94
94
  obj2.save
95
- Animal.count.should == 2
95
+ Organization.count.should == 2
96
96
  raise "error"
97
97
  end
98
98
  rescue
99
99
  end
100
100
  @store.save
101
- Animal.count.should == 0
101
+ Organization.count.should == 0
102
102
  end
103
103
 
104
104
  it "should save in batch" do
105
105
  @store.save_interval = 1000
106
106
 
107
- Animal.count.should == 0
108
- obj1 = Animal.new
107
+ Organization.count.should == 0
108
+ obj1 = Organization.new
109
109
  obj1.name = "Cat"
110
110
  @store << obj1
111
111
 
112
- obj2 = Animal.new
112
+ obj2 = Organization.new
113
113
  obj2.name = "Dog"
114
114
  @store << obj2
115
115
  @store.save
116
116
 
117
- Animal.count.should == 2
117
+ Organization.count.should == 2
118
118
  end
119
119
 
120
120
  end
@@ -32,14 +32,14 @@ describe "Prime::Model Store" do
32
32
  end
33
33
 
34
34
  it "should use shared_store if a model has no store defined" do
35
- Autobot.store = nil
35
+ Organization.store = nil
36
36
  MotionPrime::Store.connect
37
- Autobot.store.should.not.be.nil
37
+ Organization.store.should.not.be.nil
38
38
  MotionPrime::Store.shared_store.should.not.be.nil
39
- Autobot.store.should == MotionPrime::Store.shared_store
39
+ Organization.store.should == MotionPrime::Store.shared_store
40
40
 
41
- Autobot.store = MotionPrime::Store.create :temp
42
- Autobot.store.should.not == MotionPrime::Store.shared_store
41
+ Organization.store = MotionPrime::Store.create :temp
42
+ Organization.store.should.not == MotionPrime::Store.shared_store
43
43
  end
44
44
 
45
45
  it "should enable and disable debug mode" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-prime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Haziev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-28 00:00:00.000000000 Z
12
+ date: 2014-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -99,44 +99,44 @@ dependencies:
99
99
  name: motion-support
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ! '>='
102
+ - - ~>
103
103
  - !ruby/object:Gem::Version
104
- version: '0'
104
+ version: 0.2.6
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ! '>='
109
+ - - ~>
110
110
  - !ruby/object:Gem::Version
111
- version: '0'
111
+ version: 0.2.6
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: bubble-wrap
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ~>
117
117
  - !ruby/object:Gem::Version
118
- version: 1.4.0
118
+ version: 1.5.0
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - ~>
124
124
  - !ruby/object:Gem::Version
125
- version: 1.4.0
125
+ version: 1.5.0
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: sugarcube
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - ~>
131
131
  - !ruby/object:Gem::Version
132
- version: 1.3.11
132
+ version: 1.5.2
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - ~>
138
138
  - !ruby/object:Gem::Version
139
- version: 1.3.11
139
+ version: 1.5.2
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: afmotion
142
142
  requirement: !ruby/object:Gem::Requirement
@@ -365,6 +365,7 @@ files:
365
365
  - spec/models/association_collection_spec.rb
366
366
  - spec/models/associations_spec.rb
367
367
  - spec/models/bag_spec.rb
368
+ - spec/models/dirty_spec.rb
368
369
  - spec/models/errors_spec.rb
369
370
  - spec/models/finder_spec.rb
370
371
  - spec/models/json.rb
@@ -408,6 +409,7 @@ test_files:
408
409
  - spec/models/association_collection_spec.rb
409
410
  - spec/models/associations_spec.rb
410
411
  - spec/models/bag_spec.rb
412
+ - spec/models/dirty_spec.rb
411
413
  - spec/models/errors_spec.rb
412
414
  - spec/models/finder_spec.rb
413
415
  - spec/models/json.rb