audited 5.3.3 → 5.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/Appraisals +10 -0
  3. data/CHANGELOG.md +35 -0
  4. data/README.md +10 -3
  5. data/Rakefile +1 -3
  6. data/audited.gemspec +38 -0
  7. data/lib/audited/audit.rb +5 -1
  8. data/lib/audited/auditor.rb +8 -5
  9. data/lib/audited/version.rb +1 -1
  10. data/lib/audited.rb +11 -4
  11. data/lib/generators/audited/migration.rb +1 -1
  12. metadata +26 -59
  13. data/.github/workflows/buildlight.yml +0 -15
  14. data/.github/workflows/ci.yml +0 -134
  15. data/.gitignore +0 -17
  16. data/.standard.yml +0 -5
  17. data/.yardopts +0 -3
  18. data/gemfiles/rails50.gemfile +0 -11
  19. data/gemfiles/rails51.gemfile +0 -11
  20. data/gemfiles/rails52.gemfile +0 -11
  21. data/gemfiles/rails60.gemfile +0 -10
  22. data/gemfiles/rails61.gemfile +0 -10
  23. data/gemfiles/rails70.gemfile +0 -10
  24. data/spec/audited/audit_spec.rb +0 -357
  25. data/spec/audited/auditor_spec.rb +0 -1227
  26. data/spec/audited/rspec_matchers_spec.rb +0 -69
  27. data/spec/audited/sweeper_spec.rb +0 -133
  28. data/spec/audited_spec.rb +0 -14
  29. data/spec/audited_spec_helpers.rb +0 -32
  30. data/spec/rails_app/app/assets/config/manifest.js +0 -2
  31. data/spec/rails_app/config/application.rb +0 -19
  32. data/spec/rails_app/config/database.yml +0 -26
  33. data/spec/rails_app/config/environment.rb +0 -5
  34. data/spec/rails_app/config/environments/test.rb +0 -52
  35. data/spec/rails_app/config/initializers/backtrace_silencers.rb +0 -7
  36. data/spec/rails_app/config/initializers/inflections.rb +0 -2
  37. data/spec/rails_app/config/initializers/secret_token.rb +0 -3
  38. data/spec/rails_app/config/routes.rb +0 -3
  39. data/spec/spec_helper.rb +0 -24
  40. data/spec/support/active_record/models.rb +0 -170
  41. data/spec/support/active_record/postgres/1_change_audited_changes_type_to_json.rb +0 -11
  42. data/spec/support/active_record/postgres/2_change_audited_changes_type_to_jsonb.rb +0 -11
  43. data/spec/support/active_record/schema.rb +0 -90
  44. data/test/db/version_1.rb +0 -17
  45. data/test/db/version_2.rb +0 -18
  46. data/test/db/version_3.rb +0 -18
  47. data/test/db/version_4.rb +0 -19
  48. data/test/db/version_5.rb +0 -17
  49. data/test/db/version_6.rb +0 -19
  50. data/test/install_generator_test.rb +0 -62
  51. data/test/test_helper.rb +0 -18
  52. data/test/upgrade_generator_test.rb +0 -97
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1979018213d9b4793bf6c450161759ad6e2ee8c0749c21c9c361bb012b703016
4
- data.tar.gz: 113875c36e93998ef49e54e1ee65812996a28d553f5fd17c9a6252ea046f2cbc
3
+ metadata.gz: 6f68b2608cf53ed7087873504b4f29c97599bf31a79d284a3675c1725c91bfba
4
+ data.tar.gz: 62a32603313de542d0e9aa261110d0be63ba50c56e3073bd828e8492681ec7cf
5
5
  SHA512:
6
- metadata.gz: 9d490c64b590cc9df55d67551908bd450c2737f04d55201000c637122682aaf6c1df069cc61894774c1778ddb29488e0f6e22d5786f155f6415cb47c12fc45f5
7
- data.tar.gz: 7801bb4dadea8bef4499f50115749cf589f59ffc795c950dbfdf918989311ec6a1380237ef0bbd05f1c1c9edcfe9c42ff5d66d3e44fb71666127fe57dfbcaaee
6
+ metadata.gz: de9505c3076a24b043ba3128f526709def0c4c9dbe2a6ac56dab7163b252efa20e94c84f9481fb7c3e5673eee822e18654949736693e42e4e00285149cc639f0
7
+ data.tar.gz: 88d44336e6e2e61952a973d9b44957d68375cc18e009ac0fc410638b9748dcd4a331dcb15224f073e28077c84ee0f50c8d5e848f559925ebedca77696ca35f32
data/Appraisals CHANGED
@@ -7,6 +7,7 @@ appraise "rails50" do
7
7
  gem "pg", ">= 0.18", "< 2.0"
8
8
  gem "sqlite3", "~> 1.3.6"
9
9
  gem "psych", "~> 3.1"
10
+ gem "loofah", "2.20.0"
10
11
  end
11
12
 
12
13
  appraise "rails51" do
@@ -15,6 +16,7 @@ appraise "rails51" do
15
16
  gem "pg", ">= 0.18", "< 2.0"
16
17
  gem "sqlite3", "~> 1.3.6"
17
18
  gem "psych", "~> 3.1"
19
+ gem "loofah", "2.20.0"
18
20
  end
19
21
 
20
22
  appraise "rails52" do
@@ -23,6 +25,7 @@ appraise "rails52" do
23
25
  gem "pg", ">= 0.18", "< 2.0"
24
26
  gem "sqlite3", "~> 1.3.6"
25
27
  gem "psych", "~> 3.1"
28
+ gem "loofah", "2.20.0"
26
29
  end
27
30
 
28
31
  appraise "rails60" do
@@ -45,3 +48,10 @@ appraise "rails70" do
45
48
  gem "pg", ">= 1.1"
46
49
  gem "sqlite3", ">= 1.4"
47
50
  end
51
+
52
+ appraise "rails71" do
53
+ gem "rails", ">= 7.1.0.beta1", "< 7.2"
54
+ gem "mysql2", ">= 0.4.4"
55
+ gem "pg", ">= 1.1"
56
+ gem "sqlite3", ">= 1.4"
57
+ end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Audited ChangeLog
2
2
 
3
+ ### 5.6.0 (2024-04-05)
4
+
5
+ - Removed support for Rails 5.0 and 5.1.
6
+ - Replace RequestStore with ActiveSupport::CurrentAttributes - @punkisdead
7
+ [#702](https://github.com/collectiveidea/audited/pull/702)
8
+
9
+ ### 5.5.0 (2024-04-02)
10
+
11
+ - Bad release. Same code as 5.4.1. Use 5.6.0 for updated features.
12
+
13
+ ### 5.4.3 (2024-01-11)
14
+
15
+ - Ignore readonly columns in audit - @sriddbs
16
+ [#692](https://github.com/collectiveidea/audited/pull/692)
17
+ - Robustify Rails version checks - @blaet
18
+ [#689](https://github.com/collectiveidea/audited/pull/689)
19
+ - Ignore callbacks if not specifed on the model
20
+ [#679](https://github.com/collectiveidea/audited/pull/679)
21
+
22
+ ## 5.4.2 (2023-11-30)
23
+
24
+ - Revert replacing RequetStore with ActiveSupport::CurrentAttributes until it is fully tested.
25
+
26
+ ## 5.4.1 (2023-11-30)
27
+
28
+ - Replace RequestStore with ActiveSupport::CurrentAttributes - @the-spectator
29
+ [#673](https://github.com/collectiveidea/audited/pull/673/)
30
+ - Don't require railtie when used outside of Rails - @nicduke38degrees
31
+ [#665](https://github.com/collectiveidea/audited/pull/665)
32
+
33
+ ## 5.4.0 (2023-09-30)
34
+
35
+ - Add Rails 7.1 support - @yuki24
36
+ [#686](https://github.com/collectiveidea/audited/pull/686)
37
+
3
38
  ## 5.3.3 (2023-03-24)
4
39
 
5
40
  - Use RequestStore instead of Thread.current for thread-safe requests - @tiagocassio
data/README.md CHANGED
@@ -8,8 +8,9 @@ Audited
8
8
  **Audited** (previously acts_as_audited) is an ORM extension that logs all changes to your models. Audited can also record who made those changes, save comments and associate models related to the changes.
9
9
 
10
10
 
11
- Audited currently (5.x) works with Rails 7.0, 6.1, 6.0, 5.2, 5.1, and 5.0.
11
+ Audited currently (5.6) works with Rails 7.1, 7.0, 6.1, 6.0, 5.2.
12
12
 
13
+ For Rails 5.0 & 5.1, use gem version 5.4.3
13
14
  For Rails 4, use gem version 4.x
14
15
  For Rails 3, use gem version 3.0 or see the [3.0-stable branch](https://github.com/collectiveidea/audited/tree/3.0-stable).
15
16
 
@@ -133,18 +134,24 @@ end
133
134
 
134
135
  ### Specifying callbacks
135
136
 
136
- By default, a new audit is created for any Create, Update or Destroy action. You can, however, limit the actions audited.
137
+ By default, a new audit is created for any Create, Update, Touch (Rails 6+) or Destroy action. You can, however, limit the actions audited.
137
138
 
138
139
  ```ruby
139
140
  class User < ActiveRecord::Base
140
141
  # All fields and actions
141
142
  # audited
142
143
 
143
- # Single field, only audit Update and Destroy (not Create)
144
+ # Single field, only audit Update and Destroy (not Create or Touch)
144
145
  # audited only: :name, on: [:update, :destroy]
145
146
  end
146
147
  ```
147
148
 
149
+ You can ignore the default callbacks globally unless the callback action is specified in your model using the `:on` option. To configure default callback exclusion, put the following in an initializer file (`config/initializers/audited.rb`):
150
+
151
+ ```ruby
152
+ Audited.ignored_default_callbacks = [:create, :update] # ignore callbacks create and update
153
+ ```
154
+
148
155
  ### Comments
149
156
 
150
157
  You can attach comments to each audit using an `audit_comment` attribute on your model.
data/Rakefile CHANGED
@@ -1,12 +1,10 @@
1
1
  #!/usr/bin/env rake
2
2
 
3
- require "bundler/gem_helper"
3
+ require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
5
  require "rake/testtask"
6
6
  require "appraisal"
7
7
 
8
- Bundler::GemHelper.install_tasks(name: "audited")
9
-
10
8
  RSpec::Core::RakeTask.new(:spec)
11
9
 
12
10
  Rake::TestTask.new do |t|
data/audited.gemspec ADDED
@@ -0,0 +1,38 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "audited/version"
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = "audited"
6
+ gem.version = Audited::VERSION
7
+
8
+ gem.authors = ["Brandon Keepers", "Kenneth Kalmer", "Daniel Morrison", "Brian Ryckbost", "Steve Richert", "Ryan Glover"]
9
+ gem.email = "info@collectiveidea.com"
10
+ gem.description = "Log all changes to your models"
11
+ gem.summary = gem.description
12
+ gem.homepage = "https://github.com/collectiveidea/audited"
13
+ gem.license = "MIT"
14
+
15
+ gem.files = `git ls-files`.split($\).reject { |f| f =~ /^(\.gemspec|\.git|\.standard|\.yard|gemfiles|test|spec)/ }
16
+
17
+ gem.required_ruby_version = ">= 2.3.0"
18
+
19
+ gem.add_dependency "activerecord", ">= 5.2", "< 7.2"
20
+ gem.add_dependency "activesupport", ">= 5.2", "< 7.2"
21
+
22
+ gem.add_development_dependency "appraisal"
23
+ gem.add_development_dependency "rails", ">= 5.2", "< 7.2"
24
+ gem.add_development_dependency "rspec-rails"
25
+ gem.add_development_dependency "standard"
26
+ gem.add_development_dependency "single_cov"
27
+
28
+ # JRuby support for the test ENV
29
+ if defined?(JRUBY_VERSION)
30
+ gem.add_development_dependency "activerecord-jdbcsqlite3-adapter", "~> 1.3"
31
+ gem.add_development_dependency "activerecord-jdbcpostgresql-adapter", "~> 1.3"
32
+ gem.add_development_dependency "activerecord-jdbcmysql-adapter", "~> 1.3"
33
+ else
34
+ gem.add_development_dependency "sqlite3", ">= 1.3.6"
35
+ gem.add_development_dependency "mysql2", ">= 0.3.20"
36
+ gem.add_development_dependency "pg", ">= 0.18", "< 2.0"
37
+ end
38
+ end
data/lib/audited/audit.rb CHANGED
@@ -49,7 +49,11 @@ module Audited
49
49
  cattr_accessor :audited_class_names
50
50
  self.audited_class_names = Set.new
51
51
 
52
- serialize :audited_changes, YAMLIfTextColumnType
52
+ if Rails.gem_version >= Gem::Version.new("7.1")
53
+ serialize :audited_changes, coder: YAMLIfTextColumnType
54
+ else
55
+ serialize :audited_changes, YAMLIfTextColumnType
56
+ end
53
57
 
54
58
  scope :ascending, -> { reorder(version: :asc) }
55
59
  scope :descending, -> { reorder(version: :desc) }
@@ -231,7 +231,7 @@ module Audited
231
231
 
232
232
  private
233
233
 
234
- def audited_changes(for_touch: false)
234
+ def audited_changes(for_touch: false, exclude_readonly_attrs: false)
235
235
  all_changes = if for_touch
236
236
  previous_changes
237
237
  elsif respond_to?(:changes_to_save)
@@ -240,6 +240,8 @@ module Audited
240
240
  changes
241
241
  end
242
242
 
243
+ all_changes = all_changes.except(*self.class.readonly_attributes.to_a) if exclude_readonly_attrs
244
+
243
245
  filtered_changes = \
244
246
  if audited_options[:only].present?
245
247
  all_changes.slice(*self.class.audited_columns)
@@ -247,6 +249,8 @@ module Audited
247
249
  all_changes.except(*self.class.non_audited_columns)
248
250
  end
249
251
 
252
+ filtered_changes = normalize_enum_changes(filtered_changes)
253
+
250
254
  if for_touch && (last_audit = audits.last&.audited_changes)
251
255
  filtered_changes.reject! do |k, v|
252
256
  last_audit[k].to_json == v.to_json ||
@@ -256,7 +260,6 @@ module Audited
256
260
 
257
261
  filtered_changes = redact_values(filtered_changes)
258
262
  filtered_changes = filter_encrypted_attrs(filtered_changes)
259
- filtered_changes = normalize_enum_changes(filtered_changes)
260
263
  filtered_changes.to_hash
261
264
  end
262
265
 
@@ -333,14 +336,14 @@ module Audited
333
336
  end
334
337
 
335
338
  def audit_update
336
- unless (changes = audited_changes).empty? && (audit_comment.blank? || audited_options[:update_with_comment_only] == false)
339
+ unless (changes = audited_changes(exclude_readonly_attrs: true)).empty? && (audit_comment.blank? || audited_options[:update_with_comment_only] == false)
337
340
  write_audit(action: "update", audited_changes: changes,
338
341
  comment: audit_comment)
339
342
  end
340
343
  end
341
344
 
342
345
  def audit_touch
343
- unless (changes = audited_changes(for_touch: true)).empty?
346
+ unless (changes = audited_changes(for_touch: true, exclude_readonly_attrs: true)).empty?
344
347
  write_audit(action: "update", audited_changes: changes,
345
348
  comment: audit_comment)
346
349
  end
@@ -496,7 +499,7 @@ module Audited
496
499
 
497
500
  def normalize_audited_options
498
501
  audited_options[:on] = Array.wrap(audited_options[:on])
499
- audited_options[:on] = [:create, :update, :touch, :destroy] if audited_options[:on].empty?
502
+ audited_options[:on] = ([:create, :update, :touch, :destroy] - Audited.ignored_default_callbacks) if audited_options[:on].empty?
500
503
  audited_options[:only] = Array.wrap(audited_options[:only]).map(&:to_s)
501
504
  audited_options[:except] = Array.wrap(audited_options[:except]).map(&:to_s)
502
505
  max_audits = audited_options[:max_audits] || Audited.max_audits
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Audited
4
- VERSION = "5.3.3"
4
+ VERSION = "5.6.0"
5
5
  end
data/lib/audited.rb CHANGED
@@ -1,14 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_record"
4
- require "request_store"
5
4
 
6
5
  module Audited
6
+ # Wrapper around ActiveSupport::CurrentAttributes
7
+ class RequestStore < ActiveSupport::CurrentAttributes
8
+ attribute :audited_store
9
+ end
10
+
7
11
  class << self
8
12
  attr_accessor \
9
13
  :auditing_enabled,
10
14
  :current_user_method,
11
15
  :ignored_attributes,
16
+ :ignored_default_callbacks,
12
17
  :max_audits,
13
18
  :store_synthesized_enums
14
19
  attr_writer :audit_class
@@ -22,10 +27,11 @@ module Audited
22
27
 
23
28
  # remove audit_model in next major version it was only shortly present in 5.1.0
24
29
  alias_method :audit_model, :audit_class
25
- deprecate audit_model: "use Audited.audit_class instead of Audited.audit_model. This method will be removed."
30
+ deprecate audit_model: "use Audited.audit_class instead of Audited.audit_model. This method will be removed.",
31
+ deprecator: ActiveSupport::Deprecation.new('6.0.0', 'Audited')
26
32
 
27
33
  def store
28
- RequestStore.store[:audited_store] ||= {}
34
+ RequestStore.audited_store ||= {}
29
35
  end
30
36
 
31
37
  def config
@@ -34,6 +40,7 @@ module Audited
34
40
  end
35
41
 
36
42
  @ignored_attributes = %w[lock_version created_at updated_at created_on updated_on]
43
+ @ignored_default_callbacks = []
37
44
 
38
45
  @current_user_method = :current_user
39
46
  @auditing_enabled = true
@@ -48,4 +55,4 @@ ActiveSupport.on_load :active_record do
48
55
  end
49
56
 
50
57
  require "audited/sweeper"
51
- require "audited/railtie"
58
+ require "audited/railtie" if Audited.const_defined?(:Rails)
@@ -16,7 +16,7 @@ module Audited
16
16
  private
17
17
 
18
18
  def timestamped_migrations?
19
- (Rails.version >= "7.0") ?
19
+ (Rails.gem_version >= Gem::Version.new("7.0")) ?
20
20
  ::ActiveRecord.timestamped_migrations :
21
21
  ::ActiveRecord::Base.timestamped_migrations
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audited
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.3
4
+ version: 5.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
@@ -10,10 +10,10 @@ authors:
10
10
  - Brian Ryckbost
11
11
  - Steve Richert
12
12
  - Ryan Glover
13
- autorequire:
13
+ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2023-04-24 00:00:00.000000000 Z
16
+ date: 2024-04-05 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activerecord
@@ -21,34 +21,40 @@ dependencies:
21
21
  requirements:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: '5.0'
24
+ version: '5.2'
25
25
  - - "<"
26
26
  - !ruby/object:Gem::Version
27
- version: '7.1'
27
+ version: '7.2'
28
28
  type: :runtime
29
29
  prerelease: false
30
30
  version_requirements: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '5.0'
34
+ version: '5.2'
35
35
  - - "<"
36
36
  - !ruby/object:Gem::Version
37
- version: '7.1'
37
+ version: '7.2'
38
38
  - !ruby/object:Gem::Dependency
39
- name: request_store
39
+ name: activesupport
40
40
  requirement: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - "~>"
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '5.2'
45
+ - - "<"
43
46
  - !ruby/object:Gem::Version
44
- version: '1.2'
47
+ version: '7.2'
45
48
  type: :runtime
46
49
  prerelease: false
47
50
  version_requirements: !ruby/object:Gem::Requirement
48
51
  requirements:
49
- - - "~>"
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '5.2'
55
+ - - "<"
50
56
  - !ruby/object:Gem::Version
51
- version: '1.2'
57
+ version: '7.2'
52
58
  - !ruby/object:Gem::Dependency
53
59
  name: appraisal
54
60
  requirement: !ruby/object:Gem::Requirement
@@ -69,20 +75,20 @@ dependencies:
69
75
  requirements:
70
76
  - - ">="
71
77
  - !ruby/object:Gem::Version
72
- version: '5.0'
78
+ version: '5.2'
73
79
  - - "<"
74
80
  - !ruby/object:Gem::Version
75
- version: '7.1'
81
+ version: '7.2'
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
86
  - - ">="
81
87
  - !ruby/object:Gem::Version
82
- version: '5.0'
88
+ version: '5.2'
83
89
  - - "<"
84
90
  - !ruby/object:Gem::Version
85
- version: '7.1'
91
+ version: '7.2'
86
92
  - !ruby/object:Gem::Dependency
87
93
  name: rspec-rails
88
94
  requirement: !ruby/object:Gem::Requirement
@@ -179,23 +185,13 @@ executables: []
179
185
  extensions: []
180
186
  extra_rdoc_files: []
181
187
  files:
182
- - ".github/workflows/buildlight.yml"
183
- - ".github/workflows/ci.yml"
184
- - ".gitignore"
185
- - ".standard.yml"
186
- - ".yardopts"
187
188
  - Appraisals
188
189
  - CHANGELOG.md
189
190
  - Gemfile
190
191
  - LICENSE
191
192
  - README.md
192
193
  - Rakefile
193
- - gemfiles/rails50.gemfile
194
- - gemfiles/rails51.gemfile
195
- - gemfiles/rails52.gemfile
196
- - gemfiles/rails60.gemfile
197
- - gemfiles/rails61.gemfile
198
- - gemfiles/rails70.gemfile
194
+ - audited.gemspec
199
195
  - lib/audited-rspec.rb
200
196
  - lib/audited.rb
201
197
  - lib/audited/audit.rb
@@ -218,40 +214,11 @@ files:
218
214
  - lib/generators/audited/templates/rename_parent_to_association.rb
219
215
  - lib/generators/audited/templates/revert_polymorphic_indexes_order.rb
220
216
  - lib/generators/audited/upgrade_generator.rb
221
- - spec/audited/audit_spec.rb
222
- - spec/audited/auditor_spec.rb
223
- - spec/audited/rspec_matchers_spec.rb
224
- - spec/audited/sweeper_spec.rb
225
- - spec/audited_spec.rb
226
- - spec/audited_spec_helpers.rb
227
- - spec/rails_app/app/assets/config/manifest.js
228
- - spec/rails_app/config/application.rb
229
- - spec/rails_app/config/database.yml
230
- - spec/rails_app/config/environment.rb
231
- - spec/rails_app/config/environments/test.rb
232
- - spec/rails_app/config/initializers/backtrace_silencers.rb
233
- - spec/rails_app/config/initializers/inflections.rb
234
- - spec/rails_app/config/initializers/secret_token.rb
235
- - spec/rails_app/config/routes.rb
236
- - spec/spec_helper.rb
237
- - spec/support/active_record/models.rb
238
- - spec/support/active_record/postgres/1_change_audited_changes_type_to_json.rb
239
- - spec/support/active_record/postgres/2_change_audited_changes_type_to_jsonb.rb
240
- - spec/support/active_record/schema.rb
241
- - test/db/version_1.rb
242
- - test/db/version_2.rb
243
- - test/db/version_3.rb
244
- - test/db/version_4.rb
245
- - test/db/version_5.rb
246
- - test/db/version_6.rb
247
- - test/install_generator_test.rb
248
- - test/test_helper.rb
249
- - test/upgrade_generator_test.rb
250
217
  homepage: https://github.com/collectiveidea/audited
251
218
  licenses:
252
219
  - MIT
253
220
  metadata: {}
254
- post_install_message:
221
+ post_install_message:
255
222
  rdoc_options: []
256
223
  require_paths:
257
224
  - lib
@@ -266,8 +233,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
233
  - !ruby/object:Gem::Version
267
234
  version: '0'
268
235
  requirements: []
269
- rubygems_version: 3.4.7
270
- signing_key:
236
+ rubygems_version: 3.5.3
237
+ signing_key:
271
238
  specification_version: 4
272
239
  summary: Log all changes to your models
273
240
  test_files: []
@@ -1,15 +0,0 @@
1
- name: Buildlight
2
-
3
- on:
4
- workflow_run:
5
- workflows:
6
- - CI
7
- branches:
8
- - main
9
-
10
- jobs:
11
- webhook:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - name: Webhook
15
- uses: collectiveidea/buildlight@main
@@ -1,134 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- - pull_request
5
- - push
6
-
7
- jobs:
8
- build:
9
- runs-on: ubuntu-latest
10
- strategy:
11
- fail-fast: false
12
- matrix:
13
- ruby: [2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2]
14
- appraisal:
15
- - rails50
16
- - rails51
17
- - rails52
18
- - rails60
19
- - rails61
20
- - rails70
21
- db: [POSTGRES, MYSQL, SQLITE]
22
- exclude:
23
- # MySQL has issues on Ruby 2.3
24
- # https://github.com/ruby/setup-ruby/issues/150
25
- - ruby: 2.3
26
- db: MYSQL
27
-
28
- # PostgreSQL is segfaulting on 2.3
29
- # Doesn't seem worth solving.
30
- - ruby: 2.3
31
- db: POSTGRES
32
-
33
- # Rails 5.0 supports Ruby 2.2-2.4
34
- - appraisal: rails50
35
- ruby: 2.5
36
- - appraisal: rails50
37
- ruby: 2.6
38
- - appraisal: rails50
39
- ruby: 2.7
40
- - appraisal: rails50
41
- ruby: 3.0
42
- - appraisal: rails50
43
- ruby: 3.1
44
- - appraisal: rails50
45
- ruby: 3.2
46
-
47
- # Rails 5.1 supports Ruby 2.2-2.5
48
- - appraisal: rails51
49
- ruby: 2.6
50
- - appraisal: rails51
51
- ruby: 2.7
52
- - appraisal: rails51
53
- ruby: 3.0
54
- - appraisal: rails51
55
- ruby: 3.1
56
- - appraisal: rails51
57
- ruby: 3.2
58
-
59
- # Rails 5.2 supports Ruby 2.2-2.5
60
- - appraisal: rails52
61
- ruby: 2.6
62
- - appraisal: rails52
63
- ruby: 2.7
64
- - appraisal: rails52
65
- ruby: 3.0
66
- - appraisal: rails52
67
- ruby: 3.1
68
- - appraisal: rails52
69
- ruby: 3.2
70
-
71
- # Rails 6.0 supports Ruby 2.5-2.7
72
- - appraisal: rails60
73
- ruby: 2.3
74
- - appraisal: rails60
75
- ruby: 2.4
76
- - appraisal: rails60
77
- ruby: 3.0
78
- - appraisal: rails60
79
- ruby: 3.1
80
- - appraisal: rails60
81
- ruby: 3.2
82
-
83
- # Rails 6.1 supports Ruby 2.5+
84
- - appraisal: rails61
85
- ruby: 2.3
86
- - appraisal: rails61
87
- ruby: 2.4
88
-
89
- # Rails 7 supports Ruby 2.7+
90
- - appraisal: rails70
91
- ruby: 2.3
92
- - appraisal: rails70
93
- ruby: 2.4
94
- - appraisal: rails70
95
- ruby: 2.5
96
- - appraisal: rails70
97
- ruby: 2.6
98
-
99
- services:
100
- postgres:
101
- image: postgres
102
- env:
103
- POSTGRES_USER: postgres
104
- POSTGRES_PASSWORD: postgres
105
- POSTGRES_DB: audited_test
106
- ports:
107
- - 5432:5432
108
- # needed because the postgres container does not provide a healthcheck
109
- options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
110
-
111
- env:
112
- DB_DATABASE: audited_test
113
- DB_USER: root
114
- DB_PASSWORD: 'root'
115
- DB_HOST: localhost
116
-
117
- steps:
118
- - name: Setup MySQL
119
- run: |
120
- sudo /etc/init.d/mysql start
121
- mysql -e 'CREATE DATABASE audited_test;' -uroot -proot
122
- mysql -e 'SHOW DATABASES;' -uroot -proot
123
- - uses: actions/checkout@v3
124
- - name: Copy Gemfile
125
- run: sed 's/\.\././' gemfiles/${{ matrix.appraisal }}.gemfile > Gemfile
126
- - name: Set up Ruby ${{ matrix.ruby }}
127
- uses: ruby/setup-ruby@v1
128
- with:
129
- ruby-version: ${{ matrix.ruby }}
130
- bundler-cache: true
131
- - name: Run tests
132
- env:
133
- DB: ${{ matrix.db }}
134
- run: bundle exec rake
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.iml
2
- *.ipr
3
- *.iws
4
- *.log
5
- *.swp
6
- .bundle
7
- .rakeTasks
8
- .ruby-gemset
9
- .ruby-version
10
- .rvmrc
11
- .yardoc
12
- doc/
13
- Gemfile.lock
14
- gemfiles/*.lock
15
- pkg
16
- tmp/*
17
- audited_test.sqlite3.db
data/.standard.yml DELETED
@@ -1,5 +0,0 @@
1
- ruby_version: 2.3
2
- ignore:
3
- - lib/generators/audited/templates/**/*
4
- - vendor/bundle/**/*
5
- - gemfiles/vendor/bundle/**/*
data/.yardopts DELETED
@@ -1,3 +0,0 @@
1
- --no-private
2
- --title acts_as_audited
3
- --exclude lib/generators