mm_partial_update 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,26 +14,40 @@ module MongoMapper
14
14
  # bubbling up to the document. For non-embedded proxies, there
15
15
  # no updates to add to the command.
16
16
  end
17
+ def persistable?
18
+ false
19
+ end
20
+ def can_be_persistable?
21
+ false
22
+ end
17
23
  end
18
24
 
19
25
  class EmbeddedCollection
26
+ def can_be_persistable?
27
+ true
28
+ end
20
29
  def persistable?
21
- kind_of?(MmPartialUpdate::EmbeddedCollection)
30
+ @persistable
22
31
  end
23
32
 
24
33
  def make_persistable
25
34
  class << self; include MmPartialUpdate::EmbeddedCollection; end unless persistable?
35
+ @persistable = true
26
36
  end
27
37
 
28
38
  end
29
39
 
30
40
  class OneEmbeddedProxy
41
+ def can_be_persistable?
42
+ true
43
+ end
31
44
  def persistable?
32
- kind_of?(MmPartialUpdate::OneEmbeddedProxy)
45
+ @persistable
33
46
  end
34
47
 
35
48
  def make_persistable
36
49
  class << self; include MmPartialUpdate::OneEmbeddedProxy; end unless persistable?
50
+ @persistable = true
37
51
  end
38
52
  end
39
53
 
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module MmPartialUpdate
3
- Version = '0.1.6'
3
+ Version = '0.1.7'
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mm_partial_update
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Stults
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-11 00:00:00 -08:00
18
+ date: 2011-01-13 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -134,24 +134,24 @@ extra_rdoc_files: []
134
134
 
135
135
  files:
136
136
  - lib/mm_partial_update.rb
137
+ - lib/mm_partial_update/extensions.rb
137
138
  - lib/mm_partial_update/update_command.rb
138
139
  - lib/mm_partial_update/plugins/document.rb
139
- - lib/mm_partial_update/plugins/embedded_document.rb
140
140
  - lib/mm_partial_update/plugins/partial_update.rb
141
- - lib/mm_partial_update/extensions.rb
141
+ - lib/mm_partial_update/plugins/embedded_document.rb
142
142
  - lib/mm_partial_update/embedded_collection.rb
143
143
  - lib/mm_partial_update/one_embedded_proxy.rb
144
144
  - lib/mm_partial_update/version.rb
145
- - test/callbacks_support.rb
146
- - test/test_mm_partial_update.rb
147
145
  - test/functional/plugins/test_partial_update.rb
148
- - test/functional/plugins/test_document.rb
149
146
  - test/functional/plugins/test_embedded_document.rb
147
+ - test/functional/plugins/test_document.rb
150
148
  - test/functional/test_update_command.rb
151
- - test/test_partial_update.rb
152
149
  - test/test_helper.rb
153
150
  - test/models.rb
151
+ - test/callbacks_support.rb
154
152
  - test/test_update_command.rb
153
+ - test/test_partial_update.rb
154
+ - test/test_mm_partial_update.rb
155
155
  - LICENSE
156
156
  - README.rdoc
157
157
  has_rdoc: true