mongoid-history 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem 'easy_diff'
4
- gem 'mongoid', '~> 2.0.2'
4
+ gem 'mongoid', '>= 2.0.2'
5
5
 
6
6
  group :development do
7
7
  gem "rspec", "~> 2.3.0"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -115,7 +115,7 @@ module Mongoid::History
115
115
  end
116
116
  else
117
117
  options_or_version = options_or_version.to_a if options_or_version.is_a?(Range)
118
- version = options_or_version || self.attributes[history_trackable_options[:version_field]]
118
+ version = options_or_version || self.attributes[history_trackable_options[:version_field]] || self.attributes[history_trackable_options[:version_field].to_s]
119
119
  version = [ version ].flatten
120
120
  versions = history_tracks.where(:version.in => version)
121
121
  end
@@ -5,15 +5,15 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongoid-history}
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{Aaron Qian}, %q{Justin Grimes}]
12
- s.date = %q{2011-06-21}
11
+ s.authors = ["Aaron Qian", "Justin Grimes"]
12
+ s.date = %q{2011-07-12}
13
13
  s.description = %q{In frustration of Mongoid::Versioning, I created this plugin for tracking historical changes for any document, including embedded ones. It achieves this by storing all history tracks in a single collection that you define. (See Usage for more details) Embedded documents are referenced by storing an association path, which is an array of document_name and document_id fields starting from the top most parent document and down to the embedded document that should track history.
14
14
 
15
15
  This plugin implements multi-user undo, which allows users to undo any history change in any order. Undoing a document also creates a new history track. This is great for auditing and preventing vandalism, but it is probably not suitable for use cases such as a wiki.}
16
- s.email = [%q{aq1018@gmail.com}, %q{justin.mgrimes@gmail.com}]
16
+ s.email = ["aq1018@gmail.com", "justin.mgrimes@gmail.com"]
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE.txt",
19
19
  "README.rdoc"
@@ -38,9 +38,9 @@ Gem::Specification.new do |s|
38
38
  "spec/tracker_spec.rb"
39
39
  ]
40
40
  s.homepage = %q{http://github.com/aq1018/mongoid-history}
41
- s.licenses = [%q{MIT}]
42
- s.require_paths = [%q{lib}]
43
- s.rubygems_version = %q{1.8.5}
41
+ s.licenses = ["MIT"]
42
+ s.require_paths = ["lib"]
43
+ s.rubygems_version = %q{1.6.2}
44
44
  s.summary = %q{history tracking, auditing, undo, redo for mongoid}
45
45
  s.test_files = [
46
46
  "spec/integration/integration_spec.rb",
@@ -54,7 +54,7 @@ Gem::Specification.new do |s|
54
54
 
55
55
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
56
  s.add_runtime_dependency(%q<easy_diff>, [">= 0"])
57
- s.add_runtime_dependency(%q<mongoid>, ["~> 2.0.2"])
57
+ s.add_runtime_dependency(%q<mongoid>, [">= 2.0.2"])
58
58
  s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
59
59
  s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
60
60
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -65,7 +65,7 @@ Gem::Specification.new do |s|
65
65
  s.add_development_dependency(%q<database_cleaner>, [">= 0"])
66
66
  else
67
67
  s.add_dependency(%q<easy_diff>, [">= 0"])
68
- s.add_dependency(%q<mongoid>, ["~> 2.0.2"])
68
+ s.add_dependency(%q<mongoid>, [">= 2.0.2"])
69
69
  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
70
70
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
71
71
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -77,7 +77,7 @@ Gem::Specification.new do |s|
77
77
  end
78
78
  else
79
79
  s.add_dependency(%q<easy_diff>, [">= 0"])
80
- s.add_dependency(%q<mongoid>, ["~> 2.0.2"])
80
+ s.add_dependency(%q<mongoid>, [">= 2.0.2"])
81
81
  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
82
82
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
83
83
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,12 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-06-21 00:00:00.000000000Z
13
+ date: 2011-07-12 00:00:00.000000000 -07:00
14
+ default_executable:
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: easy_diff
17
- requirement: &19314700 !ruby/object:Gem::Requirement
18
+ requirement: &2155948740 !ruby/object:Gem::Requirement
18
19
  none: false
19
20
  requirements:
20
21
  - - ! '>='
@@ -22,21 +23,21 @@ dependencies:
22
23
  version: '0'
23
24
  type: :runtime
24
25
  prerelease: false
25
- version_requirements: *19314700
26
+ version_requirements: *2155948740
26
27
  - !ruby/object:Gem::Dependency
27
28
  name: mongoid
28
- requirement: &19314180 !ruby/object:Gem::Requirement
29
+ requirement: &2155928240 !ruby/object:Gem::Requirement
29
30
  none: false
30
31
  requirements:
31
- - - ~>
32
+ - - ! '>='
32
33
  - !ruby/object:Gem::Version
33
34
  version: 2.0.2
34
35
  type: :runtime
35
36
  prerelease: false
36
- version_requirements: *19314180
37
+ version_requirements: *2155928240
37
38
  - !ruby/object:Gem::Dependency
38
39
  name: rspec
39
- requirement: &19312780 !ruby/object:Gem::Requirement
40
+ requirement: &2155923360 !ruby/object:Gem::Requirement
40
41
  none: false
41
42
  requirements:
42
43
  - - ~>
@@ -44,10 +45,10 @@ dependencies:
44
45
  version: 2.3.0
45
46
  type: :development
46
47
  prerelease: false
47
- version_requirements: *19312780
48
+ version_requirements: *2155923360
48
49
  - !ruby/object:Gem::Dependency
49
50
  name: yard
50
- requirement: &19312260 !ruby/object:Gem::Requirement
51
+ requirement: &2155921300 !ruby/object:Gem::Requirement
51
52
  none: false
52
53
  requirements:
53
54
  - - ~>
@@ -55,10 +56,10 @@ dependencies:
55
56
  version: 0.6.0
56
57
  type: :development
57
58
  prerelease: false
58
- version_requirements: *19312260
59
+ version_requirements: *2155921300
59
60
  - !ruby/object:Gem::Dependency
60
61
  name: bundler
61
- requirement: &19311680 !ruby/object:Gem::Requirement
62
+ requirement: &2155911700 !ruby/object:Gem::Requirement
62
63
  none: false
63
64
  requirements:
64
65
  - - ~>
@@ -66,10 +67,10 @@ dependencies:
66
67
  version: 1.0.0
67
68
  type: :development
68
69
  prerelease: false
69
- version_requirements: *19311680
70
+ version_requirements: *2155911700
70
71
  - !ruby/object:Gem::Dependency
71
72
  name: jeweler
72
- requirement: &19311140 !ruby/object:Gem::Requirement
73
+ requirement: &2155908240 !ruby/object:Gem::Requirement
73
74
  none: false
74
75
  requirements:
75
76
  - - ~>
@@ -77,10 +78,10 @@ dependencies:
77
78
  version: 1.5.2
78
79
  type: :development
79
80
  prerelease: false
80
- version_requirements: *19311140
81
+ version_requirements: *2155908240
81
82
  - !ruby/object:Gem::Dependency
82
83
  name: rcov
83
- requirement: &19310600 !ruby/object:Gem::Requirement
84
+ requirement: &2155905900 !ruby/object:Gem::Requirement
84
85
  none: false
85
86
  requirements:
86
87
  - - ! '>='
@@ -88,10 +89,10 @@ dependencies:
88
89
  version: '0'
89
90
  type: :development
90
91
  prerelease: false
91
- version_requirements: *19310600
92
+ version_requirements: *2155905900
92
93
  - !ruby/object:Gem::Dependency
93
94
  name: reek
94
- requirement: &19310060 !ruby/object:Gem::Requirement
95
+ requirement: &2152407320 !ruby/object:Gem::Requirement
95
96
  none: false
96
97
  requirements:
97
98
  - - ~>
@@ -99,10 +100,10 @@ dependencies:
99
100
  version: 1.2.8
100
101
  type: :development
101
102
  prerelease: false
102
- version_requirements: *19310060
103
+ version_requirements: *2152407320
103
104
  - !ruby/object:Gem::Dependency
104
105
  name: roodi
105
- requirement: &19309520 !ruby/object:Gem::Requirement
106
+ requirement: &2152406080 !ruby/object:Gem::Requirement
106
107
  none: false
107
108
  requirements:
108
109
  - - ~>
@@ -110,10 +111,10 @@ dependencies:
110
111
  version: 2.1.0
111
112
  type: :development
112
113
  prerelease: false
113
- version_requirements: *19309520
114
+ version_requirements: *2152406080
114
115
  - !ruby/object:Gem::Dependency
115
116
  name: database_cleaner
116
- requirement: &19308980 !ruby/object:Gem::Requirement
117
+ requirement: &2152405440 !ruby/object:Gem::Requirement
117
118
  none: false
118
119
  requirements:
119
120
  - - ! '>='
@@ -121,7 +122,7 @@ dependencies:
121
122
  version: '0'
122
123
  type: :development
123
124
  prerelease: false
124
- version_requirements: *19308980
125
+ version_requirements: *2152405440
125
126
  description: ! "In frustration of Mongoid::Versioning, I created this plugin for tracking
126
127
  historical changes for any document, including embedded ones. It achieves this by
127
128
  storing all history tracks in a single collection that you define. (See Usage for
@@ -158,6 +159,7 @@ files:
158
159
  - spec/spec_helper.rb
159
160
  - spec/trackable_spec.rb
160
161
  - spec/tracker_spec.rb
162
+ has_rdoc: true
161
163
  homepage: http://github.com/aq1018/mongoid-history
162
164
  licenses:
163
165
  - MIT
@@ -173,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
175
  version: '0'
174
176
  segments:
175
177
  - 0
176
- hash: -4369612200137395153
178
+ hash: -4357186795392850631
177
179
  required_rubygems_version: !ruby/object:Gem::Requirement
178
180
  none: false
179
181
  requirements:
@@ -182,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
184
  version: '0'
183
185
  requirements: []
184
186
  rubyforge_project:
185
- rubygems_version: 1.8.5
187
+ rubygems_version: 1.6.2
186
188
  signing_key:
187
189
  specification_version: 3
188
190
  summary: history tracking, auditing, undo, redo for mongoid