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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a23fe69b31245a25863c18baa7e5b63e0bc6f77
4
- data.tar.gz: bfaa8b4c151f34bbf73450f6f3cff3ee97324f2a
3
+ metadata.gz: 910aee76df538dfa623d329bb7c3434b34db263c
4
+ data.tar.gz: 5c8c388d1002e83786d7ba71b7fe2aa0c4ea5a9a
5
5
  SHA512:
6
- metadata.gz: f480600994ca391062f7ba7fa3bec9b6c1b145667045d16613170447804bc591f7eb6ebed2fcd716d0191daec39bd63648d14092d5af1d954a3d6f3750212d07
7
- data.tar.gz: febb0de492697fc27b09b81be726e19f464310c997f7b22288b01ed43b024ac7d5611e95165053f5995f2f51b0b1168d8394316669617e31160951c584cadb5c
6
+ metadata.gz: 9eafe09cfc8b25a50bb36ab05593dbb34bdf6c52abbe996d885c9d83595c3db61f0a04f4fcc2f6d83f7be2b08712dbd9288d0c19a7704adf82bc83090131c78b
7
+ data.tar.gz: 66413e69767f96505f46ce6ec3d9248b3a9b4c75fda2b0e58060c086d79879b9424faec4f6669d791ed60e5b93887e59daf98d1aad89c53473468d55031e3b63
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module AuditLog
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -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", ["~> 4.0"]
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.last
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.last
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.last
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.1.1
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-09-16 00:00:00.000000000 Z
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