mongoid-audit_log 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mongoid/audit_log/version.rb +1 -1
- data/mongoid-audit_log.gemspec +1 -1
- data/spec/mongoid/audit_log_spec.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 910aee76df538dfa623d329bb7c3434b34db263c
|
4
|
+
data.tar.gz: 5c8c388d1002e83786d7ba71b7fe2aa0c4ea5a9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eafe09cfc8b25a50bb36ab05593dbb34bdf6c52abbe996d885c9d83595c3db61f0a04f4fcc2f6d83f7be2b08712dbd9288d0c19a7704adf82bc83090131c78b
|
7
|
+
data.tar.gz: 66413e69767f96505f46ce6ec3d9248b3a9b4c75fda2b0e58060c086d79879b9424faec4f6669d791ed60e5b93887e59daf98d1aad89c53473468d55031e3b63
|
data/mongoid-audit_log.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.required_ruby_version = ">= 1.9.2"
|
22
22
|
spec.required_rubygems_version = ">= 1.3.6"
|
23
23
|
|
24
|
-
spec.add_runtime_dependency "mongoid", ["
|
24
|
+
spec.add_runtime_dependency "mongoid", [">= 4.0"]
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.3"
|
27
27
|
spec.add_development_dependency "rake"
|
@@ -161,7 +161,7 @@ module Mongoid
|
|
161
161
|
it 'saves details' do
|
162
162
|
product = Product.create!(:name => 'Foo bar')
|
163
163
|
product.update_attributes(:name => 'Bar baz')
|
164
|
-
entry = product.audit_log_entries.
|
164
|
+
entry = product.audit_log_entries.desc(:created_at).first
|
165
165
|
|
166
166
|
entry.update?.should be_true
|
167
167
|
entry.tracked_changes.should == { 'name' => ['Foo bar', 'Bar baz'] }
|
@@ -176,7 +176,7 @@ module Mongoid
|
|
176
176
|
product.variants.first.sku = 'newsku'
|
177
177
|
product.save!
|
178
178
|
|
179
|
-
entry = product.audit_log_entries.
|
179
|
+
entry = product.audit_log_entries.desc(:created_at).first
|
180
180
|
|
181
181
|
entry.update?.should be_true
|
182
182
|
entry.tracked_changes.should == {
|
@@ -196,7 +196,7 @@ module Mongoid
|
|
196
196
|
it 'saves an entry' do
|
197
197
|
product = Product.create!(:name => 'Foo bar')
|
198
198
|
product.destroy
|
199
|
-
entry = product.audit_log_entries.
|
199
|
+
entry = product.audit_log_entries.desc(:created_at).first
|
200
200
|
|
201
201
|
entry.destroy?.should be_true
|
202
202
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-audit_log
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Crouse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|