guard_against_physical_delete 2.1.0 → 2.1.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: a37d0705c44bfcae06881a4815abb159ea31d8fd65bb805a4f511c694f2351ea
4
- data.tar.gz: 143cf811443a35dce054b0db4751f51760d2ac8e15c738f38db11ac97b84214a
3
+ metadata.gz: bf3003e9c60b6e19e0f13de9cfca5c1ccf85f8a5c33cbfb327bc60ead38c9332
4
+ data.tar.gz: 89f4cd9c51bb7bff0712215b6a5b503d7148b982694708a7a274423e59134a1b
5
5
  SHA512:
6
- metadata.gz: d756fd2d6058aa130b962992040fc2a473f783c7b5baacf6d249098ac3d6f736e551f6b12dd1e461c4fb4c7e38d0fd8c0f8681f3ee183618417b37ec1c311409
7
- data.tar.gz: bd36f76383558f97b380177ab91c8daaf4d751387e4f2f1bd9753a3f198a9514d38b5d344bf3b257eab48a31b5e3e17fa70efbe2307a6f211a654101d163a621
6
+ metadata.gz: 55d3b887dbaf294c6b262620dc24b0d7be5cf147798ad8899137121b6cce1fdb547569acfdd1cec363a3879b3dd5758396533cf8db2bc361fcdabe7492e1b2ae
7
+ data.tar.gz: b8e1c3941e184465eec596f0da8e8a662135c462bf5e42b66fbb4e5c1d52261407cb71b1433a4cd935efe8cc6ed78db826d23c61137092f2e981d91347246a4e
@@ -16,6 +16,7 @@ jobs:
16
16
  - "5.1"
17
17
  - "5.2"
18
18
  - "6.0"
19
+ - "6.1"
19
20
  name: Test on Rails ${{ matrix.rails_version }}
20
21
  env:
21
22
  BUNDLE_GEMFILE: gemfiles/Gemfile_rails_${{ matrix.rails_version }}.rb
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.1.1 - 2022-05-26
6
+
7
+ ### Added
8
+
9
+ - Support activerecord 6.1.
10
+
5
11
  ## 2.1.0 - 2021-12-02
6
12
 
7
13
  ### Added
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- guard_against_physical_delete (2.0.0)
5
- activerecord (>= 5, < 6.1)
4
+ guard_against_physical_delete (2.1.0)
5
+ activerecord (>= 5, < 6.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- guard_against_physical_delete (2.0.0)
5
- activerecord (>= 5, < 6.1)
4
+ guard_against_physical_delete (2.1.0)
5
+ activerecord (>= 5, < 6.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- guard_against_physical_delete (2.0.0)
5
- activerecord (>= 5, < 6.1)
4
+ guard_against_physical_delete (2.1.0)
5
+ activerecord (>= 5, < 6.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- guard_against_physical_delete (2.0.0)
5
- activerecord (>= 5, < 6.1)
4
+ guard_against_physical_delete (2.1.0)
5
+ activerecord (>= 5, < 6.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '..'
4
+
5
+ gem 'activerecord', '~> 6.1.0'
@@ -0,0 +1,74 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ guard_against_physical_delete (2.1.0)
5
+ activerecord (>= 5, < 6.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (6.1.4.1)
11
+ activesupport (= 6.1.4.1)
12
+ activerecord (6.1.4.1)
13
+ activemodel (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
+ activesupport (6.1.4.1)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ tzinfo (~> 2.0)
20
+ zeitwerk (~> 2.3)
21
+ concurrent-ruby (1.1.9)
22
+ countdownlatch (1.0.0)
23
+ database_cleaner (2.0.1)
24
+ database_cleaner-active_record (~> 2.0.0)
25
+ database_cleaner-active_record (2.0.1)
26
+ activerecord (>= 5.a)
27
+ database_cleaner-core (~> 2.0.0)
28
+ database_cleaner-core (2.0.1)
29
+ diff-lcs (1.4.4)
30
+ docile (1.4.0)
31
+ i18n (1.8.11)
32
+ concurrent-ruby (~> 1.0)
33
+ minitest (5.14.4)
34
+ rake (13.0.6)
35
+ rspec (3.10.0)
36
+ rspec-core (~> 3.10.0)
37
+ rspec-expectations (~> 3.10.0)
38
+ rspec-mocks (~> 3.10.0)
39
+ rspec-core (3.10.1)
40
+ rspec-support (~> 3.10.0)
41
+ rspec-expectations (3.10.1)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.10.0)
44
+ rspec-mocks (3.10.2)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.10.0)
47
+ rspec-support (3.10.3)
48
+ simplecov (0.21.2)
49
+ docile (~> 1.1)
50
+ simplecov-html (~> 0.11)
51
+ simplecov_json_formatter (~> 0.1)
52
+ simplecov-html (0.12.3)
53
+ simplecov_json_formatter (0.1.3)
54
+ sqlite3 (1.4.2)
55
+ tzinfo (2.0.4)
56
+ concurrent-ruby (~> 1.0)
57
+ zeitwerk (2.5.1)
58
+
59
+ PLATFORMS
60
+ x86_64-linux
61
+
62
+ DEPENDENCIES
63
+ activerecord (~> 6.1.0)
64
+ bundler
65
+ countdownlatch
66
+ database_cleaner
67
+ guard_against_physical_delete!
68
+ rake (~> 13)
69
+ rspec (~> 3)
70
+ simplecov
71
+ sqlite3 (~> 1.4)
72
+
73
+ BUNDLED WITH
74
+ 2.2.29
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata["homepage_uri"] = s.homepage
21
21
  s.metadata["source_code_uri"] = s.homepage
22
22
 
23
- s.add_runtime_dependency "activerecord", ">= 5", "< 6.1"
23
+ s.add_runtime_dependency "activerecord", ">= 5", "< 6.2"
24
24
  s.add_development_dependency "rake", "~> 13"
25
25
  s.add_development_dependency "rspec", "~> 3"
26
26
  s.add_development_dependency "sqlite3", "~> 1.4"
@@ -12,12 +12,12 @@ module GuardAgainstPhysicalDelete
12
12
  def add_logical_delete_counter_cache_methods(mixin)
13
13
  mixin.class_eval do
14
14
  def adjust_counter_caches_for_logical_deletion(reflection)
15
- if attribute_before_last_save(logical_delete_column).nil? && attribute(logical_delete_column)
15
+ if attribute_before_last_save(logical_delete_column).nil? && read_attribute(logical_delete_column)
16
16
  reflection.klass.decrement_counter(
17
17
  reflection.counter_cache_column,
18
18
  attribute_before_last_save(reflection.foreign_key)
19
19
  )
20
- elsif attribute_before_last_save(logical_delete_column) && attribute(logical_delete_column).nil?
20
+ elsif attribute_before_last_save(logical_delete_column) && read_attribute(logical_delete_column).nil?
21
21
  reflection.klass.increment_counter(
22
22
  reflection.counter_cache_column,
23
23
  attribute_before_last_save(reflection.foreign_key)
@@ -1,3 +1,3 @@
1
1
  module GuardAgainstPhysicalDelete
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard_against_physical_delete
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MORITA shingo
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.1'
22
+ version: '6.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '5'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.1'
32
+ version: '6.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rake
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +150,8 @@ files:
150
150
  - gemfiles/Gemfile_rails_5.2.rb.lock
151
151
  - gemfiles/Gemfile_rails_6.0.rb
152
152
  - gemfiles/Gemfile_rails_6.0.rb.lock
153
+ - gemfiles/Gemfile_rails_6.1.rb
154
+ - gemfiles/Gemfile_rails_6.1.rb.lock
153
155
  - guard_against_physical_delete.gemspec
154
156
  - lib/guard_against_physical_delete.rb
155
157
  - lib/guard_against_physical_delete/base.rb
@@ -179,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
181
  - !ruby/object:Gem::Version
180
182
  version: '0'
181
183
  requirements: []
182
- rubygems_version: 3.0.3.1
184
+ rubygems_version: 3.3.7
183
185
  signing_key:
184
186
  specification_version: 4
185
187
  summary: A monkey patch for ActiveRecord to prevent physical deletion.