paper_trail 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -7
- data/CONTRIBUTING.md +11 -0
- data/README.md +260 -229
- data/lib/paper_trail.rb +17 -13
- data/lib/paper_trail/cleaner.rb +21 -11
- data/lib/paper_trail/config.rb +3 -1
- data/lib/paper_trail/frameworks/active_record.rb +2 -2
- data/lib/paper_trail/frameworks/rails/controller.rb +11 -9
- data/lib/paper_trail/frameworks/sinatra.rb +2 -1
- data/lib/paper_trail/has_paper_trail.rb +90 -54
- data/lib/paper_trail/version_concern.rb +87 -58
- data/lib/paper_trail/version_number.rb +1 -1
- data/spec/models/skipper_spec.rb +38 -9
- data/spec/models/widget_spec.rb +2 -2
- data/test/dummy/db/migrate/20110208155312_set_up_test_tables.rb +2 -1
- data/test/dummy/db/schema.rb +63 -25
- data/test/unit/model_test.rb +2 -2
- metadata +47 -46
data/test/unit/model_test.rb
CHANGED
@@ -212,8 +212,8 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
|
|
212
212
|
assert @widget.live?
|
213
213
|
end
|
214
214
|
|
215
|
-
should
|
216
|
-
assert_equal @widget.
|
215
|
+
should "use the widget `updated_at` as the version's `created_at`" do
|
216
|
+
assert_equal @widget.updated_at.to_i, @widget.versions.first.created_at.to_i
|
217
217
|
end
|
218
218
|
|
219
219
|
should 'have changes' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paper_trail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Stewart
|
@@ -9,248 +9,248 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '3.0'
|
21
|
-
- - <
|
21
|
+
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: '6.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '3.0'
|
31
|
-
- - <
|
31
|
+
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '6.0'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: activesupport
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.0'
|
41
|
-
- - <
|
41
|
+
- - "<"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '6.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- -
|
48
|
+
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '3.0'
|
51
|
-
- - <
|
51
|
+
- - "<"
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '6.0'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: request_store
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - ~>
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '1.1'
|
61
61
|
type: :runtime
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - ~>
|
65
|
+
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '1.1'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: rake
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - ~>
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: 10.1.1
|
75
75
|
type: :development
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - ~>
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: 10.1.1
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: shoulda
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - ~>
|
86
|
+
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '3.5'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - ~>
|
93
|
+
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '3.5'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: ffaker
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - <=
|
100
|
+
- - "<="
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 1.31.0
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - <=
|
107
|
+
- - "<="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: 1.31.0
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: railties
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- -
|
114
|
+
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '3.0'
|
117
|
-
- - <
|
117
|
+
- - "<"
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '5.0'
|
120
120
|
type: :development
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- -
|
124
|
+
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '3.0'
|
127
|
-
- - <
|
127
|
+
- - "<"
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '5.0'
|
130
130
|
- !ruby/object:Gem::Dependency
|
131
131
|
name: sinatra
|
132
132
|
requirement: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- - ~>
|
134
|
+
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '1.0'
|
137
137
|
type: :development
|
138
138
|
prerelease: false
|
139
139
|
version_requirements: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
|
-
- - ~>
|
141
|
+
- - "~>"
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '1.0'
|
144
144
|
- !ruby/object:Gem::Dependency
|
145
145
|
name: rack-test
|
146
146
|
requirement: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
|
-
- -
|
148
|
+
- - ">="
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0.6'
|
151
151
|
type: :development
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0.6'
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: rspec-rails
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- - ~>
|
162
|
+
- - "~>"
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: 3.1.0
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
|
-
- - ~>
|
169
|
+
- - "~>"
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: 3.1.0
|
172
172
|
- !ruby/object:Gem::Dependency
|
173
173
|
name: generator_spec
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- -
|
176
|
+
- - ">="
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
type: :development
|
180
180
|
prerelease: false
|
181
181
|
version_requirements: !ruby/object:Gem::Requirement
|
182
182
|
requirements:
|
183
|
-
- -
|
183
|
+
- - ">="
|
184
184
|
- !ruby/object:Gem::Version
|
185
185
|
version: '0'
|
186
186
|
- !ruby/object:Gem::Dependency
|
187
187
|
name: database_cleaner
|
188
188
|
requirement: !ruby/object:Gem::Requirement
|
189
189
|
requirements:
|
190
|
-
- - ~>
|
190
|
+
- - "~>"
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '1.2'
|
193
193
|
type: :development
|
194
194
|
prerelease: false
|
195
195
|
version_requirements: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
|
-
- - ~>
|
197
|
+
- - "~>"
|
198
198
|
- !ruby/object:Gem::Version
|
199
199
|
version: '1.2'
|
200
200
|
- !ruby/object:Gem::Dependency
|
201
201
|
name: timecop
|
202
202
|
requirement: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
|
-
- -
|
204
|
+
- - ">="
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '0'
|
207
207
|
type: :development
|
208
208
|
prerelease: false
|
209
209
|
version_requirements: !ruby/object:Gem::Requirement
|
210
210
|
requirements:
|
211
|
-
- -
|
211
|
+
- - ">="
|
212
212
|
- !ruby/object:Gem::Version
|
213
213
|
version: '0'
|
214
214
|
- !ruby/object:Gem::Dependency
|
215
215
|
name: sqlite3
|
216
216
|
requirement: !ruby/object:Gem::Requirement
|
217
217
|
requirements:
|
218
|
-
- - ~>
|
218
|
+
- - "~>"
|
219
219
|
- !ruby/object:Gem::Version
|
220
220
|
version: '1.2'
|
221
221
|
type: :development
|
222
222
|
prerelease: false
|
223
223
|
version_requirements: !ruby/object:Gem::Requirement
|
224
224
|
requirements:
|
225
|
-
- - ~>
|
225
|
+
- - "~>"
|
226
226
|
- !ruby/object:Gem::Version
|
227
227
|
version: '1.2'
|
228
228
|
- !ruby/object:Gem::Dependency
|
229
229
|
name: mysql2
|
230
230
|
requirement: !ruby/object:Gem::Requirement
|
231
231
|
requirements:
|
232
|
-
- - ~>
|
232
|
+
- - "~>"
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0.3'
|
235
235
|
type: :development
|
236
236
|
prerelease: false
|
237
237
|
version_requirements: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
|
-
- - ~>
|
239
|
+
- - "~>"
|
240
240
|
- !ruby/object:Gem::Version
|
241
241
|
version: '0.3'
|
242
242
|
- !ruby/object:Gem::Dependency
|
243
243
|
name: pg
|
244
244
|
requirement: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
|
-
- - ~>
|
246
|
+
- - "~>"
|
247
247
|
- !ruby/object:Gem::Version
|
248
248
|
version: '0.17'
|
249
249
|
type: :development
|
250
250
|
prerelease: false
|
251
251
|
version_requirements: !ruby/object:Gem::Requirement
|
252
252
|
requirements:
|
253
|
-
- - ~>
|
253
|
+
- - "~>"
|
254
254
|
- !ruby/object:Gem::Version
|
255
255
|
version: '0.17'
|
256
256
|
description: Track changes to your models' data. Good for auditing or versioning.
|
@@ -259,10 +259,11 @@ executables: []
|
|
259
259
|
extensions: []
|
260
260
|
extra_rdoc_files: []
|
261
261
|
files:
|
262
|
-
- .gitignore
|
263
|
-
- .rspec
|
264
|
-
- .travis.yml
|
262
|
+
- ".gitignore"
|
263
|
+
- ".rspec"
|
264
|
+
- ".travis.yml"
|
265
265
|
- CHANGELOG.md
|
266
|
+
- CONTRIBUTING.md
|
266
267
|
- Gemfile
|
267
268
|
- MIT-LICENSE
|
268
269
|
- README.md
|
@@ -410,17 +411,17 @@ require_paths:
|
|
410
411
|
- lib
|
411
412
|
required_ruby_version: !ruby/object:Gem::Requirement
|
412
413
|
requirements:
|
413
|
-
- -
|
414
|
+
- - ">="
|
414
415
|
- !ruby/object:Gem::Version
|
415
416
|
version: '0'
|
416
417
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
417
418
|
requirements:
|
418
|
-
- -
|
419
|
+
- - ">="
|
419
420
|
- !ruby/object:Gem::Version
|
420
421
|
version: 1.3.6
|
421
422
|
requirements: []
|
422
423
|
rubyforge_project:
|
423
|
-
rubygems_version: 2.4.
|
424
|
+
rubygems_version: 2.4.6
|
424
425
|
signing_key:
|
425
426
|
specification_version: 4
|
426
427
|
summary: Track changes to your models' data. Good for auditing or versioning.
|