activerecord-transactionable 2.0.1 → 2.0.2

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
- SHA1:
3
- metadata.gz: ebf67428aaf44c1ac7ffb5b7515c8e5d927f4966
4
- data.tar.gz: fe553cbee8e6502b5b68ba04c0a3d296032f1cf4
2
+ SHA256:
3
+ metadata.gz: 71da1b586cbf4e0fcf0e0f940555a68d0fb896e7b2a68df65df5a47f16df55ed
4
+ data.tar.gz: 1d727284e32b7567be8124ce5974a98e62df83d43c1aeb4d47e60fa38707a843
5
5
  SHA512:
6
- metadata.gz: 27f1f73531b9efc309d056c44603c882b4f08e731fb5ed65fd170432aa4a3e64dd4f12785171a36e0828e625b6093ea6edd63a4bea0b3287b67ac4fd9e29fe9b
7
- data.tar.gz: 70451d8c0c5f4fe156a6153307aad8eca3ff61d063fa0d2b8c3d222897918c7d75cca8ee0f924e1a83c7bb8b4d6af7fc3bf50eb6d8327d3ea0b62e93d585ab49
6
+ metadata.gz: 4c637f6e7e7a1934b837a3b8d4f3414cd37826649592336dd4c3c1e5941354d0604e4abcc5e129e7f4b990f6faefeff88ae4625eac4c4da22cdfc9497b1f4fb4
7
+ data.tar.gz: '01994cede172bf537fe7d73a29e2c219195c240944ddd8a6aaa0c7f3b6e40c898f185360949f22e2662844f9bf45adccd244cbfc66f3382bb448fc003f1177cb'
@@ -49,8 +49,8 @@ module Activerecord # Note lowercase "r" in Activerecord (different namespace th
49
49
  OUTSIDE_CONTEXT = "outside".freeze
50
50
 
51
51
  def transaction_wrapper(**args)
52
- self.class.transaction_wrapper(object: self, **args) do
53
- yield
52
+ self.class.transaction_wrapper(object: self, **args) do |is_retry|
53
+ yield is_retry
54
54
  end
55
55
  end
56
56
 
@@ -73,9 +73,10 @@ module Activerecord # Note lowercase "r" in Activerecord (different namespace th
73
73
  logger.debug("[#{self}.transaction_wrapper] Will start a nested transaction.")
74
74
  end
75
75
  end
76
- error_handler_outside_transaction(object: object, transaction_open: transaction_open, **outside_args) do
76
+ error_handler_outside_transaction(object: object, transaction_open: transaction_open, **outside_args) do |outside_is_retry|
77
77
  run_inside_transaction_block(transaction_args: transaction_args, inside_args: inside_args, lock: lock, transaction_open: transaction_open, object: object) do |is_retry|
78
- yield is_retry
78
+ # regardless of the retry being inside or outside the transaction, it is still a retry.
79
+ yield outside_is_retry || is_retry
79
80
  end
80
81
  end
81
82
  end
@@ -1,5 +1,5 @@
1
1
  module Activerecord
2
2
  module Transactionable
3
- VERSION = "2.0.1"
3
+ VERSION = "2.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-transactionable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  requirements: []
184
184
  rubyforge_project:
185
- rubygems_version: 2.6.12
185
+ rubygems_version: 2.7.3
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: Do ActiveRecord transactions the right way.