mongomodel 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -252,7 +252,7 @@ module MongoModel
252
252
  private
253
253
  def nest_embedded_callbacks(kind, *args, &block)
254
254
  embedded_documents.inject(block) do |callback, doc|
255
- Proc.new { doc.run_callbacks(kind, *args, &callback) }
255
+ Proc.new { doc.run_callbacks_with_embedded(kind, *args, &callback) }
256
256
  end
257
257
  end
258
258
  end
@@ -3,7 +3,7 @@ module MongoModel
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  def parent_document
6
- if @_parent_document.respond_to?(:call)
6
+ if @_parent_document.is_a?(Proc)
7
7
  case @_parent_document.arity
8
8
  when 0 then @_parent_document.call
9
9
  else @_parent_document.call(self)
@@ -45,7 +45,7 @@ module MongoModel
45
45
  if options.key?(:default)
46
46
  default = options[:default]
47
47
 
48
- if default.respond_to?(:call)
48
+ if default.is_a?(Proc)
49
49
  case default.arity
50
50
  when 0 then default.call
51
51
  else default.call(instance)
@@ -1,3 +1,3 @@
1
1
  module MongoModel
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongomodel
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 3
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 2
8
- - 9
9
- version: 0.2.9
9
+ - 10
10
+ version: 0.2.10
10
11
  platform: ruby
11
12
  authors:
12
13
  - Sam Pohlenz
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-09-28 00:00:00 +09:30
18
+ date: 2010-10-23 00:00:00 +10:30
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ~>
27
28
  - !ruby/object:Gem::Version
29
+ hash: 7
28
30
  segments:
29
31
  - 3
30
32
  - 0
@@ -40,6 +42,7 @@ dependencies:
40
42
  requirements:
41
43
  - - ~>
42
44
  - !ruby/object:Gem::Version
45
+ hash: 7
43
46
  segments:
44
47
  - 3
45
48
  - 0
@@ -55,6 +58,7 @@ dependencies:
55
58
  requirements:
56
59
  - - ~>
57
60
  - !ruby/object:Gem::Version
61
+ hash: 25
58
62
  segments:
59
63
  - 1
60
64
  - 0
@@ -70,6 +74,7 @@ dependencies:
70
74
  requirements:
71
75
  - - ">="
72
76
  - !ruby/object:Gem::Version
77
+ hash: 23
73
78
  segments:
74
79
  - 1
75
80
  - 0
@@ -85,6 +90,7 @@ dependencies:
85
90
  requirements:
86
91
  - - "="
87
92
  - !ruby/object:Gem::Version
93
+ hash: 27
88
94
  segments:
89
95
  - 1
90
96
  - 3
@@ -255,6 +261,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
261
  requirements:
256
262
  - - ">="
257
263
  - !ruby/object:Gem::Version
264
+ hash: 3
258
265
  segments:
259
266
  - 0
260
267
  version: "0"
@@ -263,6 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
270
  requirements:
264
271
  - - ">="
265
272
  - !ruby/object:Gem::Version
273
+ hash: 23
266
274
  segments:
267
275
  - 1
268
276
  - 3