mongoid-audit_log 0.0.6 → 0.0.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
- OWZjYTAzMDFlNmIzYjhiN2M0N2M0ZTRiNWZiZjFiNmM2M2E0NDU1Ng==
4
+ NzJiNjE2NmQyNGY1ZDU4ZjUyODVhNjQ1MWQ4NTgyNmRiMTkzZmI5OQ==
5
5
  data.tar.gz: !binary |-
6
- MWUwZDQyYzgyOGNiMGQ5OGI2OTM4YTg4Yzg4N2YwYjg2OTg3MWQ2ZQ==
7
- !binary "U0hBNTEy":
6
+ YmFmNzViMDI4NGE5MDY2OGEyODIwNDkwNjNmODRhOTc4N2EzN2YzZA==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- MjhmZWIxMDQ3ZjUyNDAyYzRiZDMzZTY0YTExNDhkMDhjYWU4ODNjODI3NGJh
10
- NzkwZjYzMWJjNTk4OWMxMzAzNTNjOTkwOTE5ZTZhODAxOGUwMjVlM2QwNTgw
11
- NzlkNjFjNGRkMGQzYzg3ZDZhZDM1YTZmMjhjMGY1NmNlZmM5Mjg=
9
+ YWMxMzM2NGE2YmZlNDc1ZWQzNTAzNjlkMWY0Y2JlNTdmNmFhY2E4MmZmZjYx
10
+ MmRhMDY0MDE1NDE0ZGY0MjFkNTI5YTNmMWRjZDRhZmM0ZmQ5YjdmNmZkMDQ1
11
+ YzdiYzA5ZmU4NmRhYTAzNTZhNzA2Yzk5ODEzOWYxNDUxNzQyZTQ=
12
12
  data.tar.gz: !binary |-
13
- ZDA0Mjk4N2QwM2JiOTY2NjJjOTA4ZGQzMjAzY2YyNWFlNmFjODAzODZmOWI5
14
- NDNkNTZkOWQ5NzJmOThmMjhlYTU3MjUyYmM2YWZiNTUxYjU3ODQ4MDlmNDZk
15
- MmRiYzVmMzdkZjc2Y2YzMWZlNTgwMmM5ZmU4NjdiMzJkZWY1MjQ=
13
+ NGNlNGNlN2Y4ZWE1ZjU2ZWNkOTEyZjhhODUwMmNhNDU4OTQ2YWEwMDAwNzIw
14
+ NjQ1NWUwMjE1OTg1MTE2ZTAzZTdlMGZiMjhhNTljZmRiOGE1YjcxYjliMWFm
15
+ ZDBlY2MyZTZiMDAyM2Q2MDEyNGM1YmIwNzE5NmZlMWEwZmVhYjM=
@@ -50,6 +50,11 @@ module Mongoid
50
50
  @modifier = modifier
51
51
  end
52
52
 
53
+ def respond_to?(sym, *args)
54
+ key = sym.to_s
55
+ (caches.present? && caches.has_key?(key)) || super
56
+ end
57
+
53
58
  def method_missing(sym, *args, &block)
54
59
  key = sym.to_s
55
60
 
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module AuditLog
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -71,6 +71,15 @@ module Mongoid
71
71
  end
72
72
  end
73
73
 
74
+ describe '#respond_to?' do
75
+ let(:entry) { Entry.new(:caches => { 'name' => 'foo', 'other' => nil }) }
76
+
77
+ it 'returns true for cached methods it responds to' do
78
+ entry.respond_to?(:name).should be_true
79
+ entry.respond_to?(:other).should be_true
80
+ end
81
+ end
82
+
74
83
  describe '#method_missing' do
75
84
  let(:entry) { Entry.new(:caches => { 'name' => 'foo', 'other' => nil }) }
76
85
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-audit_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-23 00:00:00.000000000 Z
11
+ date: 2013-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: 1.3.6
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.0.3
101
+ rubygems_version: 2.1.11
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: No fancy versioning, undo, redo, etc. Just saves changes to Mongoid models