mongoid-audit_log 0.0.3 → 0.0.4

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
- YzU0YTE1ZmM5YTJkMDFkZDljNThiNTM2NzQwYjZmMGJlNzZhYzk4Mw==
4
+ NjAyNmMxNWY1NzY4ZDMxMjJkZDg5ZjNkOTQwY2MwNjhhZmU5N2EyZQ==
5
5
  data.tar.gz: !binary |-
6
- NzhmNWZiMmU5ZTc4NDE0ZjYzZGZkZDlkOTU4MDEwOTAxOTNiY2E1MA==
6
+ NjhiYmJkZDU5ZTk2NTY2NWYxYzQyMGFiZTg0NWZkMWY3NjMyNTlkMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZjQzY2UyMGYyY2ZlNjc0Yjk5ZDVlOWYzMThiMWIzNmE4MmI1MTVkMDQ4ZWNj
10
- ZWFiMjAyNTNmYTQ5N2IxYTMxYjg1NWMyNDYzNTQwMTI3M2ZiNzZiYzVkM2Fm
11
- Zjg1YTE4YzVlNGUxNGQwYzI1YzNlYzM2ODM1YmYwMzk4NzU3NDI=
9
+ YWU2NzYyNTZjYTQwMWQyOTIwMTEyM2VjZWQzY2E4MjdmMDlhMDBlMDAzMmZh
10
+ NTEwMDQ0MWI4M2RhMjUyZTAzMmFjNjU4NDZkY2YzNzE4YTk1YjU1YzU1YmRh
11
+ Zjc2ODJiZGJjMTljZjMyZmQzYTU5Nzg5ZGQ0ZGM5OTgwMzFiYzI=
12
12
  data.tar.gz: !binary |-
13
- ZjFmNWNkY2FjNzMwZTBjY2Y3Njg1Yzg0OTVjZDk5MWRkZjc2OTAzNDQzNTk4
14
- ZDZiZDkxMjg0Y2Y5YzJiNjI1NTYxZTFhNmM0ZmI2MWIyYTE2ZjE2YjQwZWI2
15
- MzJjYjhhNzU2YzZlMWFjMGRlN2M1ZjI0YWY3N2UxNDFjZjJiYzg=
13
+ ZDY3N2IxYjI2MjRlMTVjYzMyNTIwMjIxNmJlNWU5NTk1ZjU4NGYwYjIyOTU1
14
+ NGRkYzJlNzlkMDQ3ZDBhY2MyZjM2YjA2OGM0ZWZhZGJjNmJjMjhiN2E4ODA0
15
+ NzY4OWFkMDk2MDBjNWFiYWI5NjMxNDI5MzAxNGUxYTRkYmY5N2Y=
@@ -51,8 +51,10 @@ module Mongoid
51
51
  end
52
52
 
53
53
  def method_missing(sym, *args, &block)
54
- if caches.present? && caches[sym.to_s].present?
55
- caches[sym.to_s]
54
+ key = sym.to_s
55
+
56
+ if caches.present? && caches.has_key?(key)
57
+ caches[key]
56
58
  else
57
59
  super
58
60
  end
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module AuditLog
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -70,6 +70,15 @@ module Mongoid
70
70
  entry.modifier_id.should == 'test'
71
71
  end
72
72
  end
73
+
74
+ describe '#method_missing' do
75
+ let(:entry) { Entry.new(:caches => { 'name' => 'foo', 'other' => nil }) }
76
+
77
+ it 'responds to methods for which it has a cache' do
78
+ entry.name.should == 'foo'
79
+ entry.other.should == nil
80
+ end
81
+ end
73
82
  end
74
83
  end
75
84
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-audit_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse