permanent_records 5.0.0.1 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6f3ec93fa6957f43a06ddd6fd8526284505b0567bcc6660befbc1730d5285b6
4
- data.tar.gz: 637f52efbdaa2bd89e620a89700ae600771624d7a16476ff83acfccf8fbb66c4
3
+ metadata.gz: 67806d4fe7b2381e88902b474ef6a99502412d66aa46c2c52bc62c2d393ab7ad
4
+ data.tar.gz: d45ca0b6f91a77664b359f36bdb2f4491bac41ad72151256f6178e69bb75a9de
5
5
  SHA512:
6
- metadata.gz: 281c172b03285f976163ac1d1a1eda7549d88cca3174bbfeb5d8f4efc053588b146cac94b1067f161a594c2b84f7bcf1cc5be220d2b355e93403f874bad36d1f
7
- data.tar.gz: c04175c6f7418431cd4425f441f8012048d700d70214d93e9c5f9a490bcc9f3ed3036b40635660a457e435eb5b376ab1a16f83e11260cd592aadc33b6b06f3ce
6
+ metadata.gz: 4318dfed3050bebe8f0ee726966b39f6f630151d3e3bcf341a5f2414cb2f42f38e72e9ff5ebb56b9796041a2d89eacf01026c95affe2d13e62c058bf9b9d5789
7
+ data.tar.gz: d7feabcd4def24cb0bbecf0378acabaa1a1112d9aca9cd1622c20df82b3884d5314ec433a2498a17723765e285d06cd5059fbb566fcacd572e1f019baceaaa2b
@@ -12,10 +12,17 @@ jobs:
12
12
 
13
13
  steps:
14
14
  - uses: actions/checkout@master
15
- - name: Set up Ruby 2.6
16
- uses: actions/setup-ruby@v1
17
15
  with:
18
- ruby-version: 2.6.x
16
+ fetch-depth: 2
17
+ - name: Set up Ruby 2.7
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: 2.7.8
21
+
22
+ - name: Install bundle
23
+ run: bundle
24
+ - name: Run rubocop
25
+ run: bundle exec rubocop
19
26
 
20
27
  - name: Publish to RubyGems
21
28
  run: |
@@ -0,0 +1,57 @@
1
+ name: Lint & Test
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ test:
7
+ name: Test
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby:
12
+ - 2.7.8
13
+ - 3.0.6
14
+ - 3.1.4
15
+ - 3.2.3
16
+ appraisal:
17
+ - rails-5.2
18
+ - rails-6.0
19
+ - rails-6.1
20
+ - rails-7.0
21
+ - rails-7.1
22
+ exclude:
23
+ - ruby: 3.0.6
24
+ appraisal: rails-5.2
25
+ - ruby: 3.1.4
26
+ appraisal: rails-5.2
27
+ - ruby: 3.2.3
28
+ appraisal: rails-5.2
29
+ steps:
30
+ - name: Install system dependencies
31
+ run: sudo apt-get install -y libsqlite3-dev
32
+ - uses: actions/checkout@master
33
+ - name: Setup ruby
34
+ uses: ruby/setup-ruby@v1
35
+ with:
36
+ ruby-version: ${{ matrix.ruby }}
37
+ - name: Install bundle
38
+ run: bundle
39
+ - name: Install appraisal
40
+ run: bundle exec appraisal install
41
+ - name: Run tests
42
+ run: bundle exec appraisal ${{ matrix.appraisal }} rspec
43
+ lint:
44
+ name: Lint
45
+ runs-on: ubuntu-latest
46
+ steps:
47
+ - name: Install system dependencies
48
+ run: sudo apt-get install -y libsqlite3-dev
49
+ - uses: actions/checkout@master
50
+ - name: Setup ruby
51
+ uses: ruby/setup-ruby@v1
52
+ with:
53
+ ruby-version: 2.7.8
54
+ - name: Install bundle
55
+ run: bundle
56
+ - name: Run rubocop
57
+ run: bundle exec rubocop
data/.rubocop.yml CHANGED
@@ -1,17 +1,39 @@
1
- require: rubocop-performance
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rake
4
+ - rubocop-rspec
2
5
 
3
6
  inherit_from: .rubocop_todo.yml
4
7
 
5
8
  AllCops:
6
9
  Exclude:
7
10
  - bin/*
8
- TargetRubyVersion: 2.2
11
+ - gemfiles/*
12
+ - vendor/bundle/**/*
13
+ NewCops: enable
14
+ TargetRubyVersion: 2.7
15
+
16
+ Gemspec/RequireMFA:
17
+ Exclude:
18
+ - 'permanent_records.gemspec'
9
19
 
10
20
  Metrics/BlockLength:
11
21
  Enabled: false
12
22
 
13
- Metrics/LineLength:
23
+ Layout/LineLength:
14
24
  Max: 120
15
25
 
26
+ RSpec/ContextWording:
27
+ Enabled: false
28
+
29
+ RSpec/MultipleExpectations:
30
+ Enabled: false
31
+
32
+ RSpec/MultipleMemoizedHelpers:
33
+ Enabled: false
34
+
35
+ RSpec/NestedGroups:
36
+ Enabled: false
37
+
16
38
  Style/BlockDelimiters:
17
39
  Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -1,7 +1,65 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-10-15 13:32:11 +0200 using RuboCop version 0.68.1.
3
+ # on 2024-03-26 14:12:23 UTC using RuboCop version 1.62.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 11
10
+ RSpec/AnyInstance:
11
+ Exclude:
12
+ - 'spec/permanent_records_spec.rb'
13
+
14
+ # Offense count: 3
15
+ # Configuration parameters: CountAsOne.
16
+ RSpec/ExampleLength:
17
+ Max: 22
18
+
19
+ # Offense count: 5
20
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
21
+ # Include: **/*_spec*rb*, **/spec/**/*
22
+ RSpec/FilePath:
23
+ Exclude:
24
+ - 'spec/permanent_records/circular_sti_dependency_spec.rb'
25
+ - 'spec/permanent_records/counter_cache_spec.rb'
26
+ - 'spec/permanent_records/propagate_validation_flag_spec.rb'
27
+ - 'spec/permanent_records/revive_parent_first_spec.rb'
28
+ - 'spec/permanent_records/validate_presence_spec.rb'
29
+
30
+ # Offense count: 5
31
+ RSpec/LetSetup:
32
+ Exclude:
33
+ - 'spec/permanent_records/revive_parent_first_spec.rb'
34
+ - 'spec/permanent_records_spec.rb'
35
+
36
+ # Offense count: 1
37
+ # Configuration parameters: .
38
+ # SupportedStyles: have_received, receive
39
+ RSpec/MessageSpies:
40
+ EnforcedStyle: receive
41
+
42
+ # Offense count: 60
43
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
44
+ # SupportedStyles: always, named_only
45
+ RSpec/NamedSubject:
46
+ Exclude:
47
+ - 'spec/permanent_records_spec.rb'
48
+
49
+ # Offense count: 5
50
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
51
+ # Include: **/*_spec.rb
52
+ RSpec/SpecFilePathFormat:
53
+ Exclude:
54
+ - '**/spec/routing/**/*'
55
+ - 'spec/permanent_records/circular_sti_dependency_spec.rb'
56
+ - 'spec/permanent_records/counter_cache_spec.rb'
57
+ - 'spec/permanent_records/propagate_validation_flag_spec.rb'
58
+ - 'spec/permanent_records/revive_parent_first_spec.rb'
59
+ - 'spec/permanent_records/validate_presence_spec.rb'
60
+
61
+ # Offense count: 2
62
+ # This cop supports safe autocorrection (--autocorrect).
63
+ Rake/Desc:
64
+ Exclude:
65
+ - 'Rakefile'
data/Appraisals ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'rails-5.2' do
4
+ gem 'rails', '5.2.8.1'
5
+ end
6
+
7
+ appraise 'rails-6.0' do
8
+ gem 'rails', '6.0.6.1'
9
+ end
10
+
11
+ appraise 'rails-6.1' do
12
+ gem 'rails', '6.1.7.7'
13
+ end
14
+
15
+ appraise 'rails-7.0' do
16
+ gem 'rails', '7.0.8.1'
17
+ end
18
+
19
+ appraise 'rails-7.1' do
20
+ gem 'rails', '7.1.3.2'
21
+ end
data/Gemfile CHANGED
@@ -1,3 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
6
+
7
+ gem 'appraisal'
8
+ gem 'database_cleaner', '>= 1.5.1'
9
+ gem 'pry-byebug'
10
+ gem 'rake'
11
+ gem 'rspec', '>= 3.5.0'
12
+ gem 'rubocop'
13
+ gem 'rubocop-performance'
14
+ gem 'rubocop-rake'
15
+ gem 'rubocop-rspec'
16
+ gem 'sqlite3'
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # PermanentRecords (Rails 5)
1
+ # PermanentRecords
2
2
 
3
3
  [http://github.com/JackDanger/permanent_records/](http://github.com/JackDanger/permanent_records/)
4
4
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler'
2
4
  require 'yaml'
3
5
  require 'English'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.0.1
1
+ 6.0.1
@@ -1,6 +1,7 @@
1
1
  #!/bin/bash
2
2
 
3
3
  set -x
4
+ set -euo pipefail
4
5
  if git diff --name-only HEAD..HEAD^ | egrep -q '^VERSION$'; then
5
6
  # The VERSION file changed in the last commit, build the gem and push
6
7
  gem build *.gemspec
@@ -0,0 +1 @@
1
+ *.gemfile.lock
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "database_cleaner", ">= 1.5.1"
7
+ gem "pry-byebug"
8
+ gem "rake"
9
+ gem "rspec", ">= 3.5.0"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rake"
13
+ gem "rubocop-rspec"
14
+ gem "sqlite3"
15
+ gem "rails", "5.2.8.1"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "database_cleaner", ">= 1.5.1"
7
+ gem "pry-byebug"
8
+ gem "rake"
9
+ gem "rspec", ">= 3.5.0"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rake"
13
+ gem "rubocop-rspec"
14
+ gem "sqlite3"
15
+ gem "rails", "6.0.6.1"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "database_cleaner", ">= 1.5.1"
7
+ gem "pry-byebug"
8
+ gem "rake"
9
+ gem "rspec", ">= 3.5.0"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rake"
13
+ gem "rubocop-rspec"
14
+ gem "sqlite3"
15
+ gem "rails", "6.1.7.7"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "database_cleaner", ">= 1.5.1"
7
+ gem "pry-byebug"
8
+ gem "rake"
9
+ gem "rspec", ">= 3.5.0"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rake"
13
+ gem "rubocop-rspec"
14
+ gem "sqlite3"
15
+ gem "rails", "7.0.8.1"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "database_cleaner", ">= 1.5.1"
7
+ gem "pry-byebug"
8
+ gem "rake"
9
+ gem "rspec", ">= 3.5.0"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rake"
13
+ gem "rubocop-rspec"
14
+ gem "sqlite3"
15
+ gem "rails", "7.1.3.2"
16
+
17
+ gemspec path: "../"
@@ -1,40 +1,36 @@
1
- # rubocop:disable Metrics/AbcSize
1
+ # frozen_string_literal: true
2
+
2
3
  # Support destroy for rails belongs_to assocations.
3
4
  module HandlePermanentRecordsDestroyedInBelongsToAssociation
4
5
  def handle_dependency
5
6
  return unless load_target
6
7
 
8
+ # only patch :destroy case and delegate to super otherwise
7
9
  case options[:dependent]
8
10
  when :destroy
9
11
  target.destroy
10
12
  raise ActiveRecord::Rollback if target.respond_to?(:deleted?) && !target.deleted?
11
13
  else
12
- target.send(options[:dependent])
14
+ super
13
15
  end
14
16
  end
15
17
  end
16
18
 
17
- # rubocop:disable Metrics/MethodLength
18
- # rubocop:disable Metrics/CyclomaticComplexity
19
- # Support destroy for rails 5.2. has_on associations.
19
+ # Support destroy for rails has_one associations.
20
20
  module HandlePermanentRecordsDestroyedInHasOneAssociation
21
21
  def delete(method = options[:dependent])
22
22
  return unless load_target
23
23
 
24
+ # only patch :destroy case and delegate to super otherwise
24
25
  case method
25
- when :delete
26
- target.delete
27
26
  when :destroy
28
27
  target.destroyed_by_association = reflection
29
28
  target.destroy
30
29
  throw(:abort) if target.respond_to?(:deleted?) && !target.deleted?
31
- when :nullify
32
- target.update_columns(reflection.foreign_key => nil) if target.persisted?
30
+ else
31
+ super(method)
33
32
  end
34
33
  end
35
34
  end
36
- # rubocop:enable Metrics/CyclomaticComplexity
37
- # rubocop:enable Metrics/MethodLength
38
- # rubocop:enable Metrics/AbcSize
39
35
  ActiveRecord::Associations::BelongsToAssociation.prepend(HandlePermanentRecordsDestroyedInBelongsToAssociation)
40
- ActiveRecord::Associations::HasOneAssociation.prepend(HandlePermanentRecordsDestroyedInHasOneAssociation)
36
+ ActiveRecord::Associations::HasOneAssociation.prepend(HandlePermanentRecordsDestroyedInHasOneAssociation)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # PermanentRecords works with ActiveRecord to set deleted_at columns with a
2
4
  # timestamp reflecting when a record was 'deleted' instead of actually deleting
3
5
  # the record. All dependent records and associations are treated exactly as
@@ -28,7 +30,7 @@ module PermanentRecords
28
30
 
29
31
  def deleted?
30
32
  if is_permanent?
31
- !!deleted_at # rubocop:disable Style/DoubleNegation
33
+ !!deleted_at
32
34
  else
33
35
  destroyed?
34
36
  end
@@ -97,7 +99,7 @@ module PermanentRecords
97
99
  record.save!
98
100
  end
99
101
 
100
- @attributes = record.instance_variable_get('@attributes')
102
+ @attributes = record.instance_variable_get(:@attributes)
101
103
  rescue StandardError => e
102
104
  # trigger dependent record destruction (they were revived before this
103
105
  # record, which cannot be revived due to validations)
@@ -141,8 +143,8 @@ module PermanentRecords
141
143
  def add_record_window(_request, name, reflection)
142
144
  send(name).unscope(where: :deleted_at).where(
143
145
  [
144
- "#{reflection.klass.quoted_table_name}.deleted_at > ?" \
145
- ' AND ' \
146
+ "#{reflection.klass.quoted_table_name}.deleted_at > ? " \
147
+ 'AND ' \
146
148
  "#{reflection.klass.quoted_table_name}.deleted_at < ?",
147
149
  deleted_at - PermanentRecords.dependent_record_window,
148
150
  deleted_at + PermanentRecords.dependent_record_window
@@ -177,7 +179,7 @@ module PermanentRecords
177
179
 
178
180
  def attempt_notifying_observers(callback)
179
181
  notify_observers(callback)
180
- rescue NoMethodError # rubocop:disable Lint/HandleExceptions
182
+ rescue NoMethodError
181
183
  # do nothing: this model isn't being observed
182
184
  end
183
185
 
@@ -215,7 +217,7 @@ module PermanentRecords
215
217
  record = klass.unscoped.where(klass.primary_key => id).first
216
218
  next unless record
217
219
 
218
- record.deleted_at = nil
220
+ record.deleted_at = nil if record.respond_to?(:deleted_at)
219
221
  record.destroy(:force)
220
222
  end
221
223
  end
@@ -279,9 +281,6 @@ module PermanentRecords
279
281
  end
280
282
 
281
283
  ActiveSupport.on_load(:active_record) do
282
- ActiveRecord::Base.send(:include, PermanentRecords::ActiveRecord)
283
-
284
- if [ActiveRecord::VERSION::MAJOR, ActiveRecord::VERSION::MINOR] == [5, 2] || ActiveRecord::VERSION::MAJOR > 5
285
- require 'permanent_records/active_record_5_2'
286
- end
284
+ ActiveRecord::Base.include PermanentRecords::ActiveRecord
285
+ require 'permanent_records/active_record'
287
286
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = 'permanent_records'
3
5
  s.version = File.read('VERSION')
@@ -12,27 +14,15 @@ Gem::Specification.new do |s|
12
14
  gives you all the scopes you need to work with your data.
13
15
  DESCRIPTION
14
16
  s.email = 'github@jackcanty.com'
15
- s.extra_rdoc_files = [
16
- 'LICENSE',
17
- 'README.md'
18
- ]
17
+ s.extra_rdoc_files = %w[LICENSE README.md]
19
18
  s.files = `git ls-files -z`.split("\x0").reject do |f|
20
19
  f.match(%r{^(test|spec|features)/})
21
20
  end
22
21
  s.homepage = 'https://github.com/JackDanger/permanent_records'
23
22
  s.require_paths = ['lib']
24
23
 
25
- # For testing against multiple AR versions
26
- ver = ENV['AR_TEST_VERSION']
27
- ver = ver.dup.chomp if ver
24
+ s.required_ruby_version = '>= 2.7.8'
28
25
 
29
- s.add_runtime_dependency 'activerecord', ver || '>= 5.0.0'
30
- s.add_runtime_dependency 'activesupport', ver || '>= 5.0.0'
31
- s.add_development_dependency 'database_cleaner', '>= 1.5.1'
32
- s.add_development_dependency 'pry-byebug'
33
- s.add_development_dependency 'rake' # For Travis-ci
34
- s.add_development_dependency 'rspec', '>= 3.5.0'
35
- s.add_development_dependency 'rubocop', '~> 0.68.0' # freeze to ensure ruby 2.2 compatibility
36
- s.add_development_dependency 'rubocop-performance'
37
- s.add_development_dependency 'sqlite3', '~> 1.3.13' # freeze to ensure specs are working
26
+ s.add_runtime_dependency 'activerecord', '>= 5.2'
27
+ s.add_runtime_dependency 'activesupport', '>= 5.2'
38
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: permanent_records
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.1
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Danger Canty
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
- date: 2019-10-16 00:00:00.000000000 Z
20
+ date: 2024-04-03 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: activerecord
@@ -25,126 +25,28 @@ dependencies:
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: 5.0.0
28
+ version: '5.2'
29
29
  type: :runtime
30
30
  prerelease: false
31
31
  version_requirements: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: 5.0.0
35
+ version: '5.2'
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activesupport
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 5.0.0
42
+ version: '5.2'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 5.0.0
50
- - !ruby/object:Gem::Dependency
51
- name: database_cleaner
52
- requirement: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: 1.5.1
57
- type: :development
58
- prerelease: false
59
- version_requirements: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: 1.5.1
64
- - !ruby/object:Gem::Dependency
65
- name: pry-byebug
66
- requirement: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: '0'
71
- type: :development
72
- prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: rake
80
- requirement: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: '0'
85
- type: :development
86
- prerelease: false
87
- version_requirements: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: '0'
92
- - !ruby/object:Gem::Dependency
93
- name: rspec
94
- requirement: !ruby/object:Gem::Requirement
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- version: 3.5.0
99
- type: :development
100
- prerelease: false
101
- version_requirements: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: 3.5.0
106
- - !ruby/object:Gem::Dependency
107
- name: rubocop
108
- requirement: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - "~>"
111
- - !ruby/object:Gem::Version
112
- version: 0.68.0
113
- type: :development
114
- prerelease: false
115
- version_requirements: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - "~>"
118
- - !ruby/object:Gem::Version
119
- version: 0.68.0
120
- - !ruby/object:Gem::Dependency
121
- name: rubocop-performance
122
- requirement: !ruby/object:Gem::Requirement
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- version: '0'
127
- type: :development
128
- prerelease: false
129
- version_requirements: !ruby/object:Gem::Requirement
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- - !ruby/object:Gem::Dependency
135
- name: sqlite3
136
- requirement: !ruby/object:Gem::Requirement
137
- requirements:
138
- - - "~>"
139
- - !ruby/object:Gem::Version
140
- version: 1.3.13
141
- type: :development
142
- prerelease: false
143
- version_requirements: !ruby/object:Gem::Requirement
144
- requirements:
145
- - - "~>"
146
- - !ruby/object:Gem::Version
147
- version: 1.3.13
49
+ version: '5.2'
148
50
  description: |2
149
51
  Never Lose Data. Rather than deleting rows this sets Record#deleted_at and
150
52
  gives you all the scopes you need to work with your data.
@@ -157,11 +59,11 @@ extra_rdoc_files:
157
59
  files:
158
60
  - ".document"
159
61
  - ".github/workflows/gempush.yml"
160
- - ".github/workflows/test.yml"
62
+ - ".github/workflows/test_and_lint.yml"
161
63
  - ".gitignore"
162
64
  - ".rubocop.yml"
163
65
  - ".rubocop_todo.yml"
164
- - ".travis.yml"
66
+ - Appraisals
165
67
  - CODE_OF_CONDUCT.md
166
68
  - CONTRIBUTORS.md
167
69
  - Gemfile
@@ -172,10 +74,14 @@ files:
172
74
  - VERSION
173
75
  - bin/gempush-if-changed
174
76
  - bin/rspec
175
- - ci
176
- - github-actions-test.yml
77
+ - gemfiles/.gitignore
78
+ - gemfiles/rails_5.2.gemfile
79
+ - gemfiles/rails_6.0.gemfile
80
+ - gemfiles/rails_6.1.gemfile
81
+ - gemfiles/rails_7.0.gemfile
82
+ - gemfiles/rails_7.1.gemfile
177
83
  - lib/permanent_records.rb
178
- - lib/permanent_records/active_record_5_2.rb
84
+ - lib/permanent_records/active_record.rb
179
85
  - permanent_records.gemspec
180
86
  homepage: https://github.com/JackDanger/permanent_records
181
87
  licenses:
@@ -189,14 +95,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
95
  requirements:
190
96
  - - ">="
191
97
  - !ruby/object:Gem::Version
192
- version: '0'
98
+ version: 2.7.8
193
99
  required_rubygems_version: !ruby/object:Gem::Requirement
194
100
  requirements:
195
101
  - - ">="
196
102
  - !ruby/object:Gem::Version
197
103
  version: '0'
198
104
  requirements: []
199
- rubygems_version: 3.0.3
105
+ rubygems_version: 3.1.6
200
106
  signing_key:
201
107
  specification_version: 4
202
108
  summary: Soft-delete your ActiveRecord records
@@ -1,32 +0,0 @@
1
- name: Tests
2
-
3
- on: push
4
-
5
- jobs:
6
- ci:
7
- name: CI
8
- runs-on: ubuntu-latest
9
- strategy:
10
- matrix:
11
- ruby:
12
- - '2.3.x'
13
- - '2.4.x'
14
- - '2.5.x'
15
- - '2.6.x'
16
- rails:
17
- - '5.0.7.2'
18
- - '5.1.7'
19
- - '5.2.3'
20
- steps:
21
- - name: Install system dependencies
22
- run: sudo apt-get install -y libsqlite3-dev
23
- - uses: actions/checkout@master
24
- - name: Setup ruby
25
- uses: actions/setup-ruby@v1
26
- with:
27
- ruby-version: ${{ matrix.ruby }}
28
- architecture: 'x64'
29
- - run: gem install bundler && bundle && bundle exec rake
30
- env:
31
- AR_TEST_VERSION: ${{ matrix.rails }}
32
-
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.10
4
- - 2.3.8
5
- - 2.4.9
6
- - 2.5.7
7
- - 2.6.5
8
- env:
9
- - AR_TEST_VERSION: 5.0.7.2
10
- - AR_TEST_VERSION: 5.1.7
11
- - AR_TEST_VERSION: 5.2.3
data/ci DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- for version in `grep AR_TEST_VERSION .travis.yml | awk '{print $3}'`; do
3
- export AR_TEST_VERSION=$version
4
- echo "Testing against ActiveRecord $version"
5
- bundle
6
- bundle exec rake
7
- done
@@ -1 +0,0 @@
1
- .github/workflows/test.yml