paper_trail 10.3.1 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a08a7c456a492933cc36762913040e14bad8f468fc08889580faf9e86ade7fea
4
- data.tar.gz: 19711dc6c6e4a438a0a97819c572df610d52db0f5c9aeba0a39eb1f44f3909c0
3
+ metadata.gz: c312ab701b8ab7b26df37957b03b9f01b6ce6cbe0e5e25d4c478258f5bec1d6f
4
+ data.tar.gz: 62e94f6c2fa657d4c24f0fe6ecdf5abf3c8ae785e7b25f88611fc18e6d4324a7
5
5
  SHA512:
6
- metadata.gz: b39e89605a2b03889976070f0871f9dcd07544b97b6e0105b78035b5fb1ec030c7d5438dc0fe9fb16cccc8e3624cd920d37bd73066f8a4f3892bf356fa088e85
7
- data.tar.gz: 56567a718ea4e605d32ffc2b71835b188f6cefab8dd7111b7abcdfc6d9e5b843e8468312ed4dfbc87f74607c1cd4a197ae2c11a9cb44ee2dd16a37a11303e6ad
6
+ metadata.gz: b59d91302dde736a2476240eadb9306938db2521594cf55de792c9678324762c4a1ffedfa5a53c3fc0fd9e37a87bc1b6ea4e74e68535b80fe70342d48a221532
7
+ data.tar.gz: b4aba2c107556fd6fbf758d9373f147c9b9bb0d1e6059bb3e2ad28b77906e980c559bd3c888fe9734665182cbe294bf470e77527a5536e202b8f32a5b7993516
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Andy Stewart, AirBlade Software Ltd.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -25,10 +25,14 @@ module PaperTrail
25
25
  " See section 5.c. Generators in README.md for more information."
26
26
 
27
27
  def create_migration_file
28
- add_paper_trail_migration("create_versions",
28
+ add_paper_trail_migration(
29
+ "create_versions",
29
30
  item_type_options: item_type_options,
30
- versions_table_options: versions_table_options)
31
- add_paper_trail_migration("add_object_changes_to_versions") if options.with_changes?
31
+ versions_table_options: versions_table_options
32
+ )
33
+ if options.with_changes?
34
+ add_paper_trail_migration("add_object_changes_to_versions")
35
+ end
32
36
  end
33
37
 
34
38
  private
@@ -11,7 +11,7 @@ class CreateVersions < ActiveRecord::Migration<%= migration_version %>
11
11
  def change
12
12
  create_table :versions<%= versions_table_options %> do |t|
13
13
  t.string :item_type<%= item_type_options %>
14
- t.integer :item_id, null: false, limit: 8
14
+ t.bigint :item_id, null: false
15
15
  t.string :event, null: false
16
16
  t.string :whodunnit
17
17
  t.text :object, limit: TEXT_BYTES
@@ -28,10 +28,11 @@ module PaperTrail
28
28
  end
29
29
 
30
30
  def migration_version
31
- major = ActiveRecord::VERSION::MAJOR
32
- if major >= 5
33
- "[#{major}.#{ActiveRecord::VERSION::MINOR}]"
34
- end
31
+ format(
32
+ "[%d.%d]",
33
+ ActiveRecord::VERSION::MAJOR,
34
+ ActiveRecord::VERSION::MINOR
35
+ )
35
36
  end
36
37
  end
37
38
  end
@@ -32,50 +32,18 @@ module PaperTrail
32
32
  end
33
33
  end
34
34
 
35
- if ::ActiveRecord::VERSION::MAJOR >= 5
36
- # This implementation uses AR 5's `serialize` and `deserialize`.
37
- class CastAttributeSerializer
38
- def serialize(attr, val)
39
- AttributeSerializerFactory.for(@klass, attr).serialize(val)
40
- end
41
-
42
- def deserialize(attr, val)
43
- if defined_enums[attr] && val.is_a?(::String)
44
- # Because PT 4 used to save the string version of enums to `object_changes`
45
- val
46
- else
47
- AttributeSerializerFactory.for(@klass, attr).deserialize(val)
48
- end
49
- end
35
+ # Uses AR 5's `serialize` and `deserialize`.
36
+ class CastAttributeSerializer
37
+ def serialize(attr, val)
38
+ AttributeSerializerFactory.for(@klass, attr).serialize(val)
50
39
  end
51
- else
52
- # This implementation uses AR 4.2's `type_cast_for_database`. For
53
- # versions of AR < 4.2 we provide an implementation of
54
- # `type_cast_for_database` in our shim attribute type classes,
55
- # `NoOpAttribute` and `SerializedAttribute`.
56
- class CastAttributeSerializer
57
- def serialize(attr, val)
58
- castable_val = val
59
- if defined_enums[attr]
60
- # `attr` is an enum. Find the number that corresponds to `val`. If `val` is
61
- # a number already, there won't be a corresponding entry, just use `val`.
62
- castable_val = defined_enums[attr][val] || val
63
- end
64
- @klass.type_for_attribute(attr).type_cast_for_database(castable_val)
65
- end
66
40
 
67
- def deserialize(attr, val)
68
- if defined_enums[attr] && val.is_a?(::String)
69
- # Because PT 4 used to save the string version of enums to `object_changes`
70
- val
71
- else
72
- val = @klass.type_for_attribute(attr).type_cast_from_database(val)
73
- if defined_enums[attr]
74
- defined_enums[attr].key(val)
75
- else
76
- val
77
- end
78
- end
41
+ def deserialize(attr, val)
42
+ if defined_enums[attr] && val.is_a?(::String)
43
+ # Because PT 4 used to save the string version of enums to `object_changes`
44
+ val
45
+ else
46
+ AttributeSerializerFactory.for(@klass, attr).deserialize(val)
79
47
  end
80
48
  end
81
49
  end
@@ -17,8 +17,8 @@ module PaperTrail
17
17
  # newer rails versions. Most PT users should avoid incompatible rails
18
18
  # versions.
19
19
  module Compatibility
20
- ACTIVERECORD_GTE = ">= 4.2"
21
- ACTIVERECORD_LT = "< 6.1"
20
+ ACTIVERECORD_GTE = ">= 5.2" # enforced in gemspec
21
+ ACTIVERECORD_LT = "< 6.2" # not enforced in gemspec
22
22
 
23
23
  E_INCOMPATIBLE_AR = <<-EOS
24
24
  PaperTrail %s is not compatible with ActiveRecord %s. We allow PT
@@ -9,14 +9,6 @@ module PaperTrail
9
9
  class Config
10
10
  include Singleton
11
11
 
12
- E_PT_AT_REMOVED = <<-EOS.squish
13
- Association Tracking for PaperTrail has been extracted to a separate gem.
14
- To use it, please add `paper_trail-association_tracking` to your Gemfile.
15
- If you don't use it (most people don't, that's the default) and you set
16
- `track_associations = false` somewhere (probably a rails initializer) you
17
- can remove that line now.
18
- EOS
19
-
20
12
  attr_accessor(
21
13
  :association_reify_error_behaviour,
22
14
  :object_changes_adapter,
@@ -43,30 +35,5 @@ module PaperTrail
43
35
  def enabled=(enable)
44
36
  @mutex.synchronize { @enabled = enable }
45
37
  end
46
-
47
- # In PT 10, the paper_trail-association_tracking gem was changed from a
48
- # runtime dependency to a development dependency. We raise an error about
49
- # this for the people who don't read changelogs.
50
- #
51
- # We raise a generic RuntimeError instead of a specific PT error class
52
- # because there is no known use case where someone would want to rescue
53
- # this. If we think of such a use case in the future we can revisit this
54
- # decision.
55
- #
56
- # @override If PT-AT is `require`d, it will replace this method with its
57
- # own implementation.
58
- def track_associations=(value)
59
- if value
60
- raise E_PT_AT_REMOVED
61
- else
62
- ::Kernel.warn(E_PT_AT_REMOVED)
63
- end
64
- end
65
-
66
- # @override If PT-AT is `require`d, it will replace this method with its
67
- # own implementation.
68
- def track_associations?
69
- raise E_PT_AT_REMOVED
70
- end
71
38
  end
72
39
  end
@@ -73,14 +73,14 @@ module PaperTrail
73
73
 
74
74
  # Rails 5.1 changed the API of `ActiveRecord::Dirty`.
75
75
  # @api private
76
- def cache_changed_attributes
76
+ def cache_changed_attributes(&block)
77
77
  if RAILS_GTE_5_1
78
78
  # Everything works fine as it is
79
79
  yield
80
80
  else
81
81
  # Any particular call to `changed_attributes` produces the huge memory allocation.
82
82
  # Lets use the generic AR workaround for that.
83
- @record.send(:cache_changed_attributes) { yield }
83
+ @record.send(:cache_changed_attributes, &block)
84
84
  end
85
85
  end
86
86
 
@@ -107,7 +107,7 @@ module PaperTrail
107
107
  end
108
108
 
109
109
  # @api private
110
- def changed_and_not_ignored
110
+ def calculated_ignored_array
111
111
  ignore = @record.paper_trail_options[:ignore].dup
112
112
  # Remove Hash arguments and then evaluate whether the attributes (the
113
113
  # keys of the hash) should also get pushed into the collection.
@@ -117,8 +117,12 @@ module PaperTrail
117
117
  ignore << attr if condition.respond_to?(:call) && condition.call(@record)
118
118
  }
119
119
  end
120
+ end
121
+
122
+ # @api private
123
+ def changed_and_not_ignored
120
124
  skip = @record.paper_trail_options[:skip]
121
- (changed_in_latest_version - ignore) - skip
125
+ (changed_in_latest_version - calculated_ignored_array) - skip
122
126
  end
123
127
 
124
128
  # @api private
@@ -148,7 +152,7 @@ module PaperTrail
148
152
  #
149
153
  # @api private
150
154
  def ignored_attr_has_changed?
151
- ignored = @record.paper_trail_options[:ignore] + @record.paper_trail_options[:skip]
155
+ ignored = calculated_ignored_array + @record.paper_trail_options[:skip]
152
156
  ignored.any? && (changed_in_latest_version & ignored).any?
153
157
  end
154
158
 
@@ -247,8 +251,7 @@ module PaperTrail
247
251
  # @api private
248
252
  def prepare_object_changes(changes)
249
253
  changes = serialize_object_changes(changes)
250
- changes = recordable_object_changes(changes)
251
- changes
254
+ recordable_object_changes(changes)
252
255
  end
253
256
 
254
257
  # Returns an object which can be assigned to the `object_changes`
@@ -25,9 +25,7 @@ module PaperTrail
25
25
  # @api public
26
26
  def user_for_paper_trail
27
27
  return unless defined?(current_user)
28
- ActiveSupport::VERSION::MAJOR >= 4 ? current_user.try!(:id) : current_user.try(:id)
29
- rescue NoMethodError
30
- current_user
28
+ current_user.try(:id) || current_user
31
29
  end
32
30
 
33
31
  # Returns any information about the controller or request that you
@@ -12,7 +12,7 @@ module PaperTrail
12
12
  # `.paper_trail` and `#paper_trail`.
13
13
  module Model
14
14
  def self.included(base)
15
- base.send :extend, ClassMethods
15
+ base.extend ClassMethods
16
16
  end
17
17
 
18
18
  # :nodoc:
@@ -128,10 +128,6 @@ module PaperTrail
128
128
 
129
129
  private
130
130
 
131
- def active_record_gem_version
132
- Gem::Version.new(ActiveRecord::VERSION::STRING)
133
- end
134
-
135
131
  # Raises an error if the provided class is an `abstract_class`.
136
132
  # @api private
137
133
  def assert_concrete_activerecord_class(class_name)
@@ -141,8 +137,7 @@ module PaperTrail
141
137
  end
142
138
 
143
139
  def cannot_record_after_destroy?
144
- Gem::Version.new(ActiveRecord::VERSION::STRING).release >= Gem::Version.new("5") &&
145
- ::ActiveRecord::Base.belongs_to_required_by_default
140
+ ::ActiveRecord::Base.belongs_to_required_by_default
146
141
  end
147
142
 
148
143
  # Some options require the presence of the `item_subtype` column. Currently
@@ -52,23 +52,23 @@ module PaperTrail
52
52
  # not the actual subclass. If `type` is present but empty, the class is
53
53
  # the base class.
54
54
  def init_model(attrs, options, version)
55
- if options[:dup] != true && version.item
56
- model = version.item
57
- if options[:unversioned_attributes] == :nil
58
- init_unversioned_attrs(attrs, model)
59
- end
60
- else
61
- klass = version_reification_class(version, attrs)
62
- # The `dup` option always returns a new object, otherwise we should
63
- # attempt to look for the item outside of default scope(s).
64
- find_cond = { klass.primary_key => version.item_id }
65
- if options[:dup] || (item_found = klass.unscoped.where(find_cond).first).nil?
66
- model = klass.new
67
- elsif options[:unversioned_attributes] == :nil
68
- model = item_found
69
- init_unversioned_attrs(attrs, model)
70
- end
55
+ klass = version_reification_class(version, attrs)
56
+
57
+ # The `dup` option and destroyed version always returns a new object,
58
+ # otherwise we should attempt to load item or to look for the item
59
+ # outside of default scope(s).
60
+ model = if options[:dup] == true || version.event == "destroy"
61
+ klass.new
62
+ else
63
+ find_cond = { klass.primary_key => version.item_id }
64
+
65
+ version.item || klass.unscoped.where(find_cond).first || klass.new
66
+ end
67
+
68
+ if options[:unversioned_attributes] == :nil && !model.new_record?
69
+ init_unversioned_attrs(attrs, model)
71
70
  end
71
+
72
72
  model
73
73
  end
74
74
 
@@ -88,9 +88,7 @@ module PaperTrail
88
88
  #
89
89
  # @api private
90
90
  def reify_attribute(k, v, model, version)
91
- enums = model.class.respond_to?(:defined_enums) ? model.class.defined_enums : {}
92
- is_enum_without_type_caster = ::ActiveRecord::VERSION::MAJOR < 5 && enums.key?(k)
93
- if model.has_attribute?(k) && !is_enum_without_type_caster
91
+ if model.has_attribute?(k)
94
92
  model[k.to_sym] = v
95
93
  elsif model.respond_to?("#{k}=")
96
94
  model.send("#{k}=", v)
@@ -145,6 +145,7 @@ module PaperTrail
145
145
  # Default: false.
146
146
  # @return `ActiveRecord::Relation`
147
147
  # @api public
148
+ # rubocop:disable Style/OptionalBooleanParameter
148
149
  def preceding(obj, timestamp_arg = false)
149
150
  if timestamp_arg != true && primary_key_is_int?
150
151
  preceding_by_id(obj)
@@ -152,6 +153,7 @@ module PaperTrail
152
153
  preceding_by_timestamp(obj)
153
154
  end
154
155
  end
156
+ # rubocop:enable Style/OptionalBooleanParameter
155
157
 
156
158
  # Returns versions after `obj`.
157
159
  #
@@ -160,6 +162,7 @@ module PaperTrail
160
162
  # Default: false.
161
163
  # @return `ActiveRecord::Relation`
162
164
  # @api public
165
+ # rubocop:disable Style/OptionalBooleanParameter
163
166
  def subsequent(obj, timestamp_arg = false)
164
167
  if timestamp_arg != true && primary_key_is_int?
165
168
  subsequent_by_id(obj)
@@ -167,6 +170,7 @@ module PaperTrail
167
170
  subsequent_by_timestamp(obj)
168
171
  end
169
172
  end
173
+ # rubocop:enable Style/OptionalBooleanParameter
170
174
 
171
175
  private
172
176
 
@@ -205,18 +209,8 @@ module PaperTrail
205
209
 
206
210
  # Restore the item from this version.
207
211
  #
208
- # Optionally this can also restore all :has_one and :has_many (including
209
- # has_many :through) associations as they were "at the time", if they are
210
- # also being versioned by PaperTrail.
211
- #
212
212
  # Options:
213
213
  #
214
- # - :has_one
215
- # - `true` - Also reify has_one associations.
216
- # - `false - Default.
217
- # - :has_many
218
- # - `true` - Also reify has_many and has_many :through associations.
219
- # - `false` - Default.
220
214
  # - :mark_for_destruction
221
215
  # - `true` - Mark the has_one/has_many associations that did not exist in
222
216
  # the reified version for destruction, instead of removing them.
@@ -258,13 +252,6 @@ module PaperTrail
258
252
  end
259
253
  alias version_author terminator
260
254
 
261
- def sibling_versions(reload = false)
262
- if reload || !defined?(@sibling_versions) || @sibling_versions.nil?
263
- @sibling_versions = self.class.with_item_keys(item_type, item_id)
264
- end
265
- @sibling_versions
266
- end
267
-
268
255
  def next
269
256
  @next ||= sibling_versions.subsequent(self).first
270
257
  end
@@ -274,8 +261,9 @@ module PaperTrail
274
261
  end
275
262
 
276
263
  # Returns an integer representing the chronological position of the
277
- # version among its siblings (see `sibling_versions`). The "create" event,
278
- # for example, has an index of 0.
264
+ # version among its siblings. The "create" event, for example, has an index
265
+ # of 0.
266
+ #
279
267
  # @api public
280
268
  def index
281
269
  @index ||= RecordHistory.new(sibling_versions, self.class).index(self)
@@ -342,6 +330,11 @@ module PaperTrail
342
330
  excess_versions.map(&:destroy)
343
331
  end
344
332
 
333
+ # @api private
334
+ def sibling_versions
335
+ @sibling_versions ||= self.class.with_item_keys(item_type, item_id)
336
+ end
337
+
345
338
  # See docs section 2.e. Limiting the Number of Versions Created.
346
339
  # The version limit can be global or per-model.
347
340
  #
@@ -7,9 +7,9 @@ module PaperTrail
7
7
  # because of this confusion, but it's not worth the breaking change.
8
8
  # People are encouraged to use `PaperTrail.gem_version` instead.
9
9
  module VERSION
10
- MAJOR = 10
11
- MINOR = 3
12
- TINY = 1
10
+ MAJOR = 11
11
+ MINOR = 1
12
+ TINY = 0
13
13
 
14
14
  # Set PRE to nil unless it's a pre-release (beta, rc, etc.)
15
15
  PRE = nil
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path("lib", __dir__)
4
+ require "paper_trail/compatibility"
5
+ require "paper_trail/version_number"
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "paper_trail"
9
+ s.version = PaperTrail::VERSION::STRING
10
+ s.platform = Gem::Platform::RUBY
11
+ s.summary = "Track changes to your models."
12
+ s.description = <<-EOS
13
+ Track changes to your models, for auditing or versioning. See how a model looked
14
+ at any stage in its lifecycle, revert it to any version, or restore it after it
15
+ has been destroyed.
16
+ EOS
17
+ s.homepage = "https://github.com/paper-trail-gem/paper_trail"
18
+ s.authors = ["Andy Stewart", "Ben Atkins", "Jared Beck"]
19
+ s.email = "jared@jaredbeck.com"
20
+ s.license = "MIT"
21
+
22
+ s.files = `git ls-files -z`.split("\x0").select { |f|
23
+ f.match(%r{^(Gemfile|LICENSE|lib/|paper_trail.gemspec)})
24
+ }
25
+ s.executables = []
26
+ s.require_paths = ["lib"]
27
+
28
+ s.required_rubygems_version = ">= 1.3.6"
29
+
30
+ # Ruby 2.4 reaches EoL at the end of March of 2020
31
+ # https://www.ruby-lang.org/en/news/2019/10/02/ruby-2-4-9-released/
32
+ s.required_ruby_version = ">= 2.4.0"
33
+
34
+ # We no longer specify a maximum activerecord version.
35
+ # See discussion in paper_trail/compatibility.rb
36
+ s.add_dependency "activerecord", ::PaperTrail::Compatibility::ACTIVERECORD_GTE
37
+ s.add_dependency "request_store", "~> 1.1"
38
+
39
+ s.add_development_dependency "appraisal", "~> 2.2"
40
+ s.add_development_dependency "byebug", "~> 11.0"
41
+ s.add_development_dependency "ffaker", "~> 2.11"
42
+ s.add_development_dependency "generator_spec", "~> 0.9.4"
43
+ s.add_development_dependency "memory_profiler", "~> 0.9.14"
44
+
45
+ # For `spec/dummy_app`. Technically, we only need `actionpack` (as of 2020).
46
+ # However, that might change in the future, and the advantages of specifying a
47
+ # subset (e.g. actionpack only) are unclear.
48
+ s.add_development_dependency "rails", ::PaperTrail::Compatibility::ACTIVERECORD_GTE
49
+
50
+ s.add_development_dependency "rake", "~> 13.0"
51
+ s.add_development_dependency "rspec-rails", "~> 4.0"
52
+ s.add_development_dependency "rubocop", "~> 0.89.1"
53
+ s.add_development_dependency "rubocop-performance", "~> 1.7.1"
54
+ s.add_development_dependency "rubocop-rspec", "~> 1.42.0"
55
+
56
+ # ## Database Adapters
57
+ #
58
+ # The dependencies here must match the `gem` call at the top of their
59
+ # adapters, eg. `active_record/connection_adapters/mysql2_adapter.rb`,
60
+ # assuming said call is consistent for all versions of rails we test against
61
+ # (see `Appraisals`).
62
+ #
63
+ # Currently, all versions of rails we test against are consistent. In the past,
64
+ # when we tested against rails 4.2, we had to specify database adapters in
65
+ # `Appraisals`.
66
+ s.add_development_dependency "mysql2", "~> 0.5"
67
+ s.add_development_dependency "pg", ">= 0.18", "< 2.0"
68
+ s.add_development_dependency "sqlite3", "~> 1.4"
69
+ end
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: 10.3.1
4
+ version: 11.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Stewart
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-07-31 00:00:00.000000000 Z
13
+ date: 2020-12-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: '4.2'
21
+ version: '5.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: '4.2'
28
+ version: '5.2'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: request_store
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -60,28 +60,28 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '10.0'
63
+ version: '11.0'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '10.0'
70
+ version: '11.0'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: ffaker
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '2.8'
77
+ version: '2.11'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: '2.8'
84
+ version: '2.11'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: generator_spec
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -102,140 +102,146 @@ dependencies:
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: 0.9.12
105
+ version: 0.9.14
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: 0.9.12
112
+ version: 0.9.14
113
113
  - !ruby/object:Gem::Dependency
114
- name: mysql2
114
+ name: rails
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - "~>"
117
+ - - ">="
118
118
  - !ruby/object:Gem::Version
119
- version: 0.5.2
119
+ version: '5.2'
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
- version: 0.5.2
126
+ version: '5.2'
127
127
  - !ruby/object:Gem::Dependency
128
- name: paper_trail-association_tracking
128
+ name: rake
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - "~>"
132
132
  - !ruby/object:Gem::Version
133
- version: 2.0.0
133
+ version: '13.0'
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - "~>"
139
139
  - !ruby/object:Gem::Version
140
- version: 2.0.0
140
+ version: '13.0'
141
141
  - !ruby/object:Gem::Dependency
142
- name: pg
142
+ name: rspec-rails
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - "~>"
146
146
  - !ruby/object:Gem::Version
147
- version: '1.0'
147
+ version: '4.0'
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - "~>"
153
153
  - !ruby/object:Gem::Version
154
- version: '1.0'
154
+ version: '4.0'
155
155
  - !ruby/object:Gem::Dependency
156
- name: rake
156
+ name: rubocop
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - "~>"
160
160
  - !ruby/object:Gem::Version
161
- version: '12.3'
161
+ version: 0.89.1
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - "~>"
167
167
  - !ruby/object:Gem::Version
168
- version: '12.3'
168
+ version: 0.89.1
169
169
  - !ruby/object:Gem::Dependency
170
- name: rspec-rails
170
+ name: rubocop-performance
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
173
  - - "~>"
174
174
  - !ruby/object:Gem::Version
175
- version: '3.8'
175
+ version: 1.7.1
176
176
  type: :development
177
177
  prerelease: false
178
178
  version_requirements: !ruby/object:Gem::Requirement
179
179
  requirements:
180
180
  - - "~>"
181
181
  - !ruby/object:Gem::Version
182
- version: '3.8'
182
+ version: 1.7.1
183
183
  - !ruby/object:Gem::Dependency
184
- name: rubocop
184
+ name: rubocop-rspec
185
185
  requirement: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - "~>"
188
188
  - !ruby/object:Gem::Version
189
- version: 0.71.0
189
+ version: 1.42.0
190
190
  type: :development
191
191
  prerelease: false
192
192
  version_requirements: !ruby/object:Gem::Requirement
193
193
  requirements:
194
194
  - - "~>"
195
195
  - !ruby/object:Gem::Version
196
- version: 0.71.0
196
+ version: 1.42.0
197
197
  - !ruby/object:Gem::Dependency
198
- name: rubocop-performance
198
+ name: mysql2
199
199
  requirement: !ruby/object:Gem::Requirement
200
200
  requirements:
201
201
  - - "~>"
202
202
  - !ruby/object:Gem::Version
203
- version: 1.3.0
203
+ version: '0.5'
204
204
  type: :development
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
207
207
  requirements:
208
208
  - - "~>"
209
209
  - !ruby/object:Gem::Version
210
- version: 1.3.0
210
+ version: '0.5'
211
211
  - !ruby/object:Gem::Dependency
212
- name: rubocop-rspec
212
+ name: pg
213
213
  requirement: !ruby/object:Gem::Requirement
214
214
  requirements:
215
- - - "~>"
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ version: '0.18'
218
+ - - "<"
216
219
  - !ruby/object:Gem::Version
217
- version: 1.33.0
220
+ version: '2.0'
218
221
  type: :development
219
222
  prerelease: false
220
223
  version_requirements: !ruby/object:Gem::Requirement
221
224
  requirements:
222
- - - "~>"
225
+ - - ">="
226
+ - !ruby/object:Gem::Version
227
+ version: '0.18'
228
+ - - "<"
223
229
  - !ruby/object:Gem::Version
224
- version: 1.33.0
230
+ version: '2.0'
225
231
  - !ruby/object:Gem::Dependency
226
232
  name: sqlite3
227
233
  requirement: !ruby/object:Gem::Requirement
228
234
  requirements:
229
235
  - - "~>"
230
236
  - !ruby/object:Gem::Version
231
- version: 1.3.13
237
+ version: '1.4'
232
238
  type: :development
233
239
  prerelease: false
234
240
  version_requirements: !ruby/object:Gem::Requirement
235
241
  requirements:
236
242
  - - "~>"
237
243
  - !ruby/object:Gem::Version
238
- version: 1.3.13
244
+ version: '1.4'
239
245
  description: |
240
246
  Track changes to your models, for auditing or versioning. See how a model looked
241
247
  at any stage in its lifecycle, revert it to any version, or restore it after it
@@ -245,6 +251,8 @@ executables: []
245
251
  extensions: []
246
252
  extra_rdoc_files: []
247
253
  files:
254
+ - Gemfile
255
+ - LICENSE
248
256
  - lib/generators/paper_trail/install/USAGE
249
257
  - lib/generators/paper_trail/install/install_generator.rb
250
258
  - lib/generators/paper_trail/install/templates/add_object_changes_to_versions.rb.erb
@@ -287,6 +295,7 @@ files:
287
295
  - lib/paper_trail/type_serializers/postgres_array_serializer.rb
288
296
  - lib/paper_trail/version_concern.rb
289
297
  - lib/paper_trail/version_number.rb
298
+ - paper_trail.gemspec
290
299
  homepage: https://github.com/paper-trail-gem/paper_trail
291
300
  licenses:
292
301
  - MIT
@@ -299,7 +308,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
299
308
  requirements:
300
309
  - - ">="
301
310
  - !ruby/object:Gem::Version
302
- version: 2.3.0
311
+ version: 2.4.0
303
312
  required_rubygems_version: !ruby/object:Gem::Requirement
304
313
  requirements:
305
314
  - - ">="