mongoid-history 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mongoid/history/tracker.rb +5 -1
- data/mongoid-history.gemspec +3 -3
- metadata +34 -88
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -31,7 +31,11 @@ module Mongoid::History
|
|
31
31
|
redo_hash.easy_merge!(modified)
|
32
32
|
trackable.update_attributes!(redo_hash)
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
|
+
def trackable_root
|
36
|
+
@trackable_root ||= trackable_parents_and_trackable.first
|
37
|
+
end
|
38
|
+
|
35
39
|
def trackable
|
36
40
|
@trackable ||= trackable_parents_and_trackable.last
|
37
41
|
end
|
data/mongoid-history.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mongoid-history}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aaron Qian"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-06}
|
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.}
|
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
|
|
40
40
|
s.homepage = %q{http://github.com/aq1018/mongoid-history}
|
41
41
|
s.licenses = ["MIT"]
|
42
42
|
s.require_paths = ["lib"]
|
43
|
-
s.rubygems_version = %q{1.
|
43
|
+
s.rubygems_version = %q{1.6.0}
|
44
44
|
s.summary = %q{history tracking, auditing, undo, redo for mongoid}
|
45
45
|
s.test_files = [
|
46
46
|
"spec/integration/integration_spec.rb",
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-history
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 29
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
5
|
+
version: 0.0.2
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Aaron Qian
|
@@ -15,165 +10,119 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-06 00:00:00 -08:00
|
19
14
|
default_executable:
|
20
15
|
dependencies:
|
21
16
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
17
|
+
name: easy_diff
|
23
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
19
|
none: false
|
25
20
|
requirements:
|
26
21
|
- - ">="
|
27
22
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
|
-
segments:
|
30
|
-
- 0
|
31
23
|
version: "0"
|
32
|
-
|
33
|
-
version_requirements: *id001
|
24
|
+
type: :runtime
|
34
25
|
prerelease: false
|
26
|
+
version_requirements: *id001
|
35
27
|
- !ruby/object:Gem::Dependency
|
36
|
-
|
28
|
+
name: mongoid
|
37
29
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
30
|
none: false
|
39
31
|
requirements:
|
40
32
|
- - ~>
|
41
33
|
- !ruby/object:Gem::Version
|
42
|
-
hash: 15424091
|
43
|
-
segments:
|
44
|
-
- 2
|
45
|
-
- 0
|
46
|
-
- 0
|
47
|
-
- rc
|
48
|
-
- 7
|
49
34
|
version: 2.0.0.rc.7
|
50
|
-
|
51
|
-
version_requirements: *id002
|
35
|
+
type: :runtime
|
52
36
|
prerelease: false
|
37
|
+
version_requirements: *id002
|
53
38
|
- !ruby/object:Gem::Dependency
|
54
|
-
|
39
|
+
name: rspec
|
55
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
41
|
none: false
|
57
42
|
requirements:
|
58
43
|
- - ~>
|
59
44
|
- !ruby/object:Gem::Version
|
60
|
-
hash: 3
|
61
|
-
segments:
|
62
|
-
- 2
|
63
|
-
- 3
|
64
|
-
- 0
|
65
45
|
version: 2.3.0
|
66
|
-
|
67
|
-
version_requirements: *id003
|
46
|
+
type: :development
|
68
47
|
prerelease: false
|
48
|
+
version_requirements: *id003
|
69
49
|
- !ruby/object:Gem::Dependency
|
70
|
-
|
50
|
+
name: yard
|
71
51
|
requirement: &id004 !ruby/object:Gem::Requirement
|
72
52
|
none: false
|
73
53
|
requirements:
|
74
54
|
- - ~>
|
75
55
|
- !ruby/object:Gem::Version
|
76
|
-
hash: 7
|
77
|
-
segments:
|
78
|
-
- 0
|
79
|
-
- 6
|
80
|
-
- 0
|
81
56
|
version: 0.6.0
|
82
|
-
|
83
|
-
version_requirements: *id004
|
57
|
+
type: :development
|
84
58
|
prerelease: false
|
59
|
+
version_requirements: *id004
|
85
60
|
- !ruby/object:Gem::Dependency
|
86
|
-
|
61
|
+
name: bundler
|
87
62
|
requirement: &id005 !ruby/object:Gem::Requirement
|
88
63
|
none: false
|
89
64
|
requirements:
|
90
65
|
- - ~>
|
91
66
|
- !ruby/object:Gem::Version
|
92
|
-
hash: 23
|
93
|
-
segments:
|
94
|
-
- 1
|
95
|
-
- 0
|
96
|
-
- 0
|
97
67
|
version: 1.0.0
|
98
|
-
|
99
|
-
version_requirements: *id005
|
68
|
+
type: :development
|
100
69
|
prerelease: false
|
70
|
+
version_requirements: *id005
|
101
71
|
- !ruby/object:Gem::Dependency
|
102
|
-
|
72
|
+
name: jeweler
|
103
73
|
requirement: &id006 !ruby/object:Gem::Requirement
|
104
74
|
none: false
|
105
75
|
requirements:
|
106
76
|
- - ~>
|
107
77
|
- !ruby/object:Gem::Version
|
108
|
-
hash: 7
|
109
|
-
segments:
|
110
|
-
- 1
|
111
|
-
- 5
|
112
|
-
- 2
|
113
78
|
version: 1.5.2
|
114
|
-
|
115
|
-
version_requirements: *id006
|
79
|
+
type: :development
|
116
80
|
prerelease: false
|
81
|
+
version_requirements: *id006
|
117
82
|
- !ruby/object:Gem::Dependency
|
118
|
-
|
83
|
+
name: rcov
|
119
84
|
requirement: &id007 !ruby/object:Gem::Requirement
|
120
85
|
none: false
|
121
86
|
requirements:
|
122
87
|
- - ">="
|
123
88
|
- !ruby/object:Gem::Version
|
124
|
-
hash: 3
|
125
|
-
segments:
|
126
|
-
- 0
|
127
89
|
version: "0"
|
128
|
-
|
129
|
-
version_requirements: *id007
|
90
|
+
type: :development
|
130
91
|
prerelease: false
|
92
|
+
version_requirements: *id007
|
131
93
|
- !ruby/object:Gem::Dependency
|
132
|
-
|
94
|
+
name: reek
|
133
95
|
requirement: &id008 !ruby/object:Gem::Requirement
|
134
96
|
none: false
|
135
97
|
requirements:
|
136
98
|
- - ~>
|
137
99
|
- !ruby/object:Gem::Version
|
138
|
-
hash: 15
|
139
|
-
segments:
|
140
|
-
- 1
|
141
|
-
- 2
|
142
|
-
- 8
|
143
100
|
version: 1.2.8
|
144
|
-
|
145
|
-
version_requirements: *id008
|
101
|
+
type: :development
|
146
102
|
prerelease: false
|
103
|
+
version_requirements: *id008
|
147
104
|
- !ruby/object:Gem::Dependency
|
148
|
-
|
105
|
+
name: roodi
|
149
106
|
requirement: &id009 !ruby/object:Gem::Requirement
|
150
107
|
none: false
|
151
108
|
requirements:
|
152
109
|
- - ~>
|
153
110
|
- !ruby/object:Gem::Version
|
154
|
-
hash: 11
|
155
|
-
segments:
|
156
|
-
- 2
|
157
|
-
- 1
|
158
|
-
- 0
|
159
111
|
version: 2.1.0
|
160
|
-
|
161
|
-
version_requirements: *id009
|
112
|
+
type: :development
|
162
113
|
prerelease: false
|
114
|
+
version_requirements: *id009
|
163
115
|
- !ruby/object:Gem::Dependency
|
164
|
-
|
116
|
+
name: database_cleaner
|
165
117
|
requirement: &id010 !ruby/object:Gem::Requirement
|
166
118
|
none: false
|
167
119
|
requirements:
|
168
120
|
- - ">="
|
169
121
|
- !ruby/object:Gem::Version
|
170
|
-
hash: 3
|
171
|
-
segments:
|
172
|
-
- 0
|
173
122
|
version: "0"
|
174
|
-
|
175
|
-
version_requirements: *id010
|
123
|
+
type: :development
|
176
124
|
prerelease: false
|
125
|
+
version_requirements: *id010
|
177
126
|
description: |-
|
178
127
|
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.
|
179
128
|
|
@@ -218,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
167
|
requirements:
|
219
168
|
- - ">="
|
220
169
|
- !ruby/object:Gem::Version
|
221
|
-
hash:
|
170
|
+
hash: 3983066688638143260
|
222
171
|
segments:
|
223
172
|
- 0
|
224
173
|
version: "0"
|
@@ -227,14 +176,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
176
|
requirements:
|
228
177
|
- - ">="
|
229
178
|
- !ruby/object:Gem::Version
|
230
|
-
hash: 3
|
231
|
-
segments:
|
232
|
-
- 0
|
233
179
|
version: "0"
|
234
180
|
requirements: []
|
235
181
|
|
236
182
|
rubyforge_project:
|
237
|
-
rubygems_version: 1.
|
183
|
+
rubygems_version: 1.6.0
|
238
184
|
signing_key:
|
239
185
|
specification_version: 3
|
240
186
|
summary: history tracking, auditing, undo, redo for mongoid
|