mongoid-audit 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/README.md +2 -1
- data/Rakefile +13 -0
- data/lib/mongoid-audit/version.rb +1 -1
- data/mongoid-audit.gemspec +1 -0
- data/spec/trackable_spec.rb +1 -1
- metadata +17 -1
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -181,12 +181,13 @@ For more examples, check out [spec/integration/integration_spec.rb](https://gith
|
|
181
181
|
|
182
182
|
## Credits
|
183
183
|
|
184
|
-
This gem is
|
184
|
+
This gem is based on https://github.com/aq1018/mongoid-history
|
185
185
|
|
186
186
|
The original gem didn't work correctly for us, when not setting modifier manually, so we rewrote it a bit.
|
187
187
|
Seems to work fully now, including manually setting modifier
|
188
188
|
|
189
189
|
Mongoid-history Copyright (c) 2011-2012 Aaron Qian. MIT License. See [LICENSE.txt](https://github.com/aq1018/mongoid-history/blob/master/LICENSE.txt) for further details.
|
190
|
+
|
190
191
|
Mongoid-audit Copyright (c) 2013 http://rocketscience.pro MIT License.
|
191
192
|
|
192
193
|
## Contributing
|
data/Rakefile
CHANGED
@@ -1 +1,14 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
# Get your spec rake tasks working in RSpec 2.0
|
4
|
+
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
|
7
|
+
desc 'Default: run specs.'
|
8
|
+
task :default => :spec
|
9
|
+
|
10
|
+
desc "Run specs"
|
11
|
+
RSpec::Core::RakeTask.new do |t|
|
12
|
+
t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
|
13
|
+
# Put spec opts in a file named .rspec in root
|
14
|
+
end
|
data/mongoid-audit.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_runtime_dependency('easy_diff', ">= 0")
|
21
21
|
gem.add_runtime_dependency('mongoid', ">= 3.0.0")
|
22
22
|
|
23
|
+
gem.add_development_dependency('rake')
|
23
24
|
gem.add_development_dependency('rspec', "~> 2.13.0")
|
24
25
|
gem.add_development_dependency('bundler', '>= 1.0.0')
|
25
26
|
gem.add_development_dependency('database_cleaner', "~> 0.9.1")
|
data/spec/trackable_spec.rb
CHANGED
@@ -35,7 +35,7 @@ describe Mongoid::Audit::Trackable do
|
|
35
35
|
:modifier_field => :modifier,
|
36
36
|
:version_field => :version,
|
37
37
|
:scope => :my_model,
|
38
|
-
:except => ["created_at", "updated_at", "version", "modifier_id", "_id", "id"],
|
38
|
+
:except => ["created_at", "updated_at", "deleted_at", "c_at", "u_at", "version", "modifier_id", "_id", "id"],
|
39
39
|
:track_create => false,
|
40
40
|
:track_update => true,
|
41
41
|
:track_destroy => false,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-audit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -43,6 +43,22 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: 3.0.0
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
46
62
|
- !ruby/object:Gem::Dependency
|
47
63
|
name: rspec
|
48
64
|
requirement: !ruby/object:Gem::Requirement
|