mongoid-audit_log 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NzJiNjE2NmQyNGY1ZDU4ZjUyODVhNjQ1MWQ4NTgyNmRiMTkzZmI5OQ==
5
- data.tar.gz: !binary |-
6
- YmFmNzViMDI4NGE5MDY2OGEyODIwNDkwNjNmODRhOTc4N2EzN2YzZA==
2
+ SHA1:
3
+ metadata.gz: aa9b0f3bd22dd2c706edd99f332a551fd9d32425
4
+ data.tar.gz: 8207dfc9dba5a7fa8461cd7695ab206b23998500
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YWMxMzM2NGE2YmZlNDc1ZWQzNTAzNjlkMWY0Y2JlNTdmNmFhY2E4MmZmZjYx
10
- MmRhMDY0MDE1NDE0ZGY0MjFkNTI5YTNmMWRjZDRhZmM0ZmQ5YjdmNmZkMDQ1
11
- YzdiYzA5ZmU4NmRhYTAzNTZhNzA2Yzk5ODEzOWYxNDUxNzQyZTQ=
12
- data.tar.gz: !binary |-
13
- NGNlNGNlN2Y4ZWE1ZjU2ZWNkOTEyZjhhODUwMmNhNDU4OTQ2YWEwMDAwNzIw
14
- NjQ1NWUwMjE1OTg1MTE2ZTAzZTdlMGZiMjhhNTljZmRiOGE1YjcxYjliMWFm
15
- ZDBlY2MyZTZiMDAyM2Q2MDEyNGM1YmIwNzE5NmZlMWEwZmVhYjM=
6
+ metadata.gz: 62b0fd36deedc5b4b05c010351c3733d1ea821b9619222e2f622c0cdbb40e4c552eb1661e72db317edcbb01321fa3954cd648084956d1f6f52b6ef4330830a15
7
+ data.tar.gz: e314b74053728b9351fbb36a56a49364a93f0a4bd383b4516abdb48d7f7f4477c3ee8949fd3ab370852c7603943003136246be5ddb6d5c0e54f977c0a4cc670d
@@ -10,7 +10,7 @@ module Mongoid
10
10
  def relations
11
11
  model.relations.inject({}) do |memo, t|
12
12
  name, relation = *t
13
- memo[name] = relation if relation.macro.in?(:embeds_one, :embeds_many)
13
+ memo[name] = relation if relation.embedded?
14
14
  memo
15
15
  end
16
16
  end
@@ -14,10 +14,10 @@ module Mongoid
14
14
  index({ :audited_id => 1, :audited_type => 1 })
15
15
  index({ :modifier_id => 1 })
16
16
 
17
- scope :creates, where(:action => :create)
18
- scope :updates, where(:action => :update)
19
- scope :destroys, where(:action => :destroy)
20
- scope :newest, order_by(:created_at.desc)
17
+ scope :creates, -> { where(:action => :create) }
18
+ scope :updates, -> { where(:action => :update) }
19
+ scope :destroys, -> { where(:action => :destroy) }
20
+ scope :newest, -> { order_by(:created_at.desc) }
21
21
 
22
22
  Mongoid::AuditLog.actions.each do |action_name|
23
23
  define_method "#{action_name}?" do
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module AuditLog
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
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", ["~> 3.1"]
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"
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.7
4
+ version: 0.0.8
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-12-19 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
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
- version: '3.1'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,14 +42,14 @@ dependencies:
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Stupid simple audit logging for Mongoid
@@ -88,17 +88,17 @@ require_paths:
88
88
  - lib
89
89
  required_ruby_version: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - ! '>='
91
+ - - '>='
92
92
  - !ruby/object:Gem::Version
93
93
  version: 1.9.2
94
94
  required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - ! '>='
96
+ - - '>='
97
97
  - !ruby/object:Gem::Version
98
98
  version: 1.3.6
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.1.11
101
+ rubygems_version: 2.0.14
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: No fancy versioning, undo, redo, etc. Just saves changes to Mongoid models