paper_trail 4.0.0.beta2 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.travis.yml +9 -7
  4. data/CHANGELOG.md +38 -2
  5. data/README.md +30 -12
  6. data/Rakefile +1 -1
  7. data/gemfiles/3.0.gemfile +3 -1
  8. data/lib/generators/paper_trail/install_generator.rb +4 -1
  9. data/lib/paper_trail/cleaner.rb +1 -1
  10. data/lib/paper_trail/config.rb +6 -0
  11. data/lib/paper_trail/frameworks/sinatra.rb +1 -0
  12. data/lib/paper_trail/has_paper_trail.rb +80 -67
  13. data/lib/paper_trail/serializers/yaml.rb +2 -1
  14. data/lib/paper_trail/version_concern.rb +64 -19
  15. data/lib/paper_trail/version_number.rb +1 -1
  16. data/lib/paper_trail.rb +7 -3
  17. data/paper_trail.gemspec +2 -1
  18. data/spec/models/animal_spec.rb +19 -0
  19. data/spec/models/boolit_spec.rb +48 -0
  20. data/spec/models/json_version_spec.rb +80 -0
  21. data/spec/models/thing_spec.rb +11 -0
  22. data/spec/models/version_spec.rb +153 -78
  23. data/spec/models/widget_spec.rb +27 -6
  24. data/spec/modules/paper_trail_spec.rb +27 -0
  25. data/spec/requests/articles_spec.rb +0 -2
  26. data/test/dummy/app/models/animal.rb +2 -0
  27. data/test/dummy/app/models/boolit.rb +4 -0
  28. data/test/dummy/app/models/fruit.rb +5 -0
  29. data/test/dummy/app/models/song.rb +20 -0
  30. data/test/dummy/app/models/thing.rb +3 -0
  31. data/test/dummy/app/models/whatchamajigger.rb +4 -0
  32. data/test/dummy/app/models/widget.rb +1 -0
  33. data/test/dummy/app/versions/json_version.rb +3 -0
  34. data/test/dummy/config/initializers/paper_trail.rb +3 -0
  35. data/test/dummy/db/migrate/20110208155312_set_up_test_tables.rb +44 -3
  36. data/test/dummy/db/schema.rb +13 -4
  37. data/test/functional/controller_test.rb +4 -2
  38. data/test/unit/model_test.rb +76 -12
  39. data/test/unit/serializer_test.rb +3 -3
  40. metadata +40 -6
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.0.beta2
4
+ version: 4.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Stewart
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-16 00:00:00.000000000 Z
12
+ date: 2015-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -51,6 +51,20 @@ dependencies:
51
51
  - - <
52
52
  - !ruby/object:Gem::Version
53
53
  version: '6.0'
54
+ - !ruby/object:Gem::Dependency
55
+ name: request_store
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ version: 1.1.0
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ~>
66
+ - !ruby/object:Gem::Version
67
+ version: 1.1.0
54
68
  - !ruby/object:Gem::Dependency
55
69
  name: rake
56
70
  requirement: !ruby/object:Gem::Requirement
@@ -83,16 +97,16 @@ dependencies:
83
97
  name: ffaker
84
98
  requirement: !ruby/object:Gem::Requirement
85
99
  requirements:
86
- - - '>='
100
+ - - <=
87
101
  - !ruby/object:Gem::Version
88
- version: '1.15'
102
+ version: 1.31.0
89
103
  type: :development
90
104
  prerelease: false
91
105
  version_requirements: !ruby/object:Gem::Requirement
92
106
  requirements:
93
- - - '>='
107
+ - - <=
94
108
  - !ruby/object:Gem::Version
95
- version: '1.15'
109
+ version: 1.31.0
96
110
  - !ruby/object:Gem::Dependency
97
111
  name: railties
98
112
  requirement: !ruby/object:Gem::Requirement
@@ -281,12 +295,17 @@ files:
281
295
  - lib/paper_trail/version_number.rb
282
296
  - paper_trail.gemspec
283
297
  - spec/generators/install_generator_spec.rb
298
+ - spec/models/animal_spec.rb
299
+ - spec/models/boolit_spec.rb
284
300
  - spec/models/fluxor_spec.rb
285
301
  - spec/models/gadget_spec.rb
286
302
  - spec/models/joined_version_spec.rb
303
+ - spec/models/json_version_spec.rb
287
304
  - spec/models/post_with_status_spec.rb
305
+ - spec/models/thing_spec.rb
288
306
  - spec/models/version_spec.rb
289
307
  - spec/models/widget_spec.rb
308
+ - spec/modules/paper_trail_spec.rb
290
309
  - spec/modules/version_concern_spec.rb
291
310
  - spec/modules/version_number_spec.rb
292
311
  - spec/paper_trail_spec.rb
@@ -305,6 +324,7 @@ files:
305
324
  - test/dummy/app/models/article.rb
306
325
  - test/dummy/app/models/authorship.rb
307
326
  - test/dummy/app/models/book.rb
327
+ - test/dummy/app/models/boolit.rb
308
328
  - test/dummy/app/models/cat.rb
309
329
  - test/dummy/app/models/customer.rb
310
330
  - test/dummy/app/models/document.rb
@@ -314,6 +334,7 @@ files:
314
334
  - test/dummy/app/models/elephant.rb
315
335
  - test/dummy/app/models/fluxor.rb
316
336
  - test/dummy/app/models/foo_widget.rb
337
+ - test/dummy/app/models/fruit.rb
317
338
  - test/dummy/app/models/gadget.rb
318
339
  - test/dummy/app/models/legacy_widget.rb
319
340
  - test/dummy/app/models/line_item.rb
@@ -323,10 +344,13 @@ files:
323
344
  - test/dummy/app/models/post_with_status.rb
324
345
  - test/dummy/app/models/protected_widget.rb
325
346
  - test/dummy/app/models/song.rb
347
+ - test/dummy/app/models/thing.rb
326
348
  - test/dummy/app/models/translation.rb
349
+ - test/dummy/app/models/whatchamajigger.rb
327
350
  - test/dummy/app/models/widget.rb
328
351
  - test/dummy/app/models/wotsit.rb
329
352
  - test/dummy/app/versions/joined_version.rb
353
+ - test/dummy/app/versions/json_version.rb
330
354
  - test/dummy/app/versions/post_version.rb
331
355
  - test/dummy/app/views/layouts/application.html.erb
332
356
  - test/dummy/config.ru
@@ -405,12 +429,17 @@ specification_version: 4
405
429
  summary: Track changes to your models' data. Good for auditing or versioning.
406
430
  test_files:
407
431
  - spec/generators/install_generator_spec.rb
432
+ - spec/models/animal_spec.rb
433
+ - spec/models/boolit_spec.rb
408
434
  - spec/models/fluxor_spec.rb
409
435
  - spec/models/gadget_spec.rb
410
436
  - spec/models/joined_version_spec.rb
437
+ - spec/models/json_version_spec.rb
411
438
  - spec/models/post_with_status_spec.rb
439
+ - spec/models/thing_spec.rb
412
440
  - spec/models/version_spec.rb
413
441
  - spec/models/widget_spec.rb
442
+ - spec/modules/paper_trail_spec.rb
414
443
  - spec/modules/version_concern_spec.rb
415
444
  - spec/modules/version_number_spec.rb
416
445
  - spec/paper_trail_spec.rb
@@ -429,6 +458,7 @@ test_files:
429
458
  - test/dummy/app/models/article.rb
430
459
  - test/dummy/app/models/authorship.rb
431
460
  - test/dummy/app/models/book.rb
461
+ - test/dummy/app/models/boolit.rb
432
462
  - test/dummy/app/models/cat.rb
433
463
  - test/dummy/app/models/customer.rb
434
464
  - test/dummy/app/models/document.rb
@@ -438,6 +468,7 @@ test_files:
438
468
  - test/dummy/app/models/elephant.rb
439
469
  - test/dummy/app/models/fluxor.rb
440
470
  - test/dummy/app/models/foo_widget.rb
471
+ - test/dummy/app/models/fruit.rb
441
472
  - test/dummy/app/models/gadget.rb
442
473
  - test/dummy/app/models/legacy_widget.rb
443
474
  - test/dummy/app/models/line_item.rb
@@ -447,10 +478,13 @@ test_files:
447
478
  - test/dummy/app/models/post_with_status.rb
448
479
  - test/dummy/app/models/protected_widget.rb
449
480
  - test/dummy/app/models/song.rb
481
+ - test/dummy/app/models/thing.rb
450
482
  - test/dummy/app/models/translation.rb
483
+ - test/dummy/app/models/whatchamajigger.rb
451
484
  - test/dummy/app/models/widget.rb
452
485
  - test/dummy/app/models/wotsit.rb
453
486
  - test/dummy/app/versions/joined_version.rb
487
+ - test/dummy/app/versions/json_version.rb
454
488
  - test/dummy/app/versions/post_version.rb
455
489
  - test/dummy/app/views/layouts/application.html.erb
456
490
  - test/dummy/config.ru