active_interaction 3.8.2 → 3.8.3

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: ab5fbe89ea464ba3cbd680d4b444aff591500d843602bd0f94059de42c680739
4
- data.tar.gz: cb6f3f963b5614a6eab29e611369917d9a4252948aa42e6ab9107d730745fda7
3
+ metadata.gz: 883e2c22dbe4db00730bd2d917d7812e6f79898f41cfdcde16bc685b1ae1de29
4
+ data.tar.gz: 4c1af0be75d96c6801b288b450d260580b3d12f330ebeb69b1f6b20d88da5241
5
5
  SHA512:
6
- metadata.gz: 34b4222d51134f6a704d21a79d1c44e71d6edb4471156188564973a89fdfef68d156575dc0ec777d6b18ef6420e775ca61e9034fd44427c7cc4a66afb6bbad1a
7
- data.tar.gz: 912a034a88b9c0fa10a78b83a5c8b0ceae6b3040a7c81e7550c11af16bbe60e639251e67df58c41b19b297eefcafe9a6101ae92dacaee382fec2ff1ac0fa7827
6
+ metadata.gz: d2426683e3249c63760a59a25c0a7e8d21780bedf31218676ffca3d75903db0f4b73c18d80b78bbc568997ca67106490bac774bf43f68dacbe5ba00541e08e78
7
+ data.tar.gz: 412ae553643fd1449c9063058f5d4b8f39ea0bb97f4f166db73bee7ae6bf70a5f01b4ca8ee08a867417b8f7d83d57845d5168383c5ac69d2a931df7490527056
@@ -1,3 +1,9 @@
1
+ # [3.8.3][] (2020-04-22)
2
+
3
+ ## Fixed
4
+
5
+ - [486][] `valid?` returns true if block not called and error added in execute around callback.
6
+
1
7
  # [3.8.2][] (2020-04-22)
2
8
 
3
9
  ## Fixed
@@ -771,6 +777,7 @@ Example.run
771
777
 
772
778
  - Initial release.
773
779
 
780
+ [3.8.3]: https://github.com/AaronLasseigne/active_interaction/compare/v3.8.2...v3.8.3
774
781
  [3.8.2]: https://github.com/AaronLasseigne/active_interaction/compare/v3.8.1...v3.8.2
775
782
  [3.8.1]: https://github.com/AaronLasseigne/active_interaction/compare/v3.8.0...v3.8.1
776
783
  [3.8.0]: https://github.com/AaronLasseigne/active_interaction/compare/v3.7.1...v3.8.0
@@ -971,3 +978,4 @@ Example.run
971
978
  [#477]: https://github.com/AaronLasseigne/active_interaction/issues/477
972
979
  [#476]: https://github.com/AaronLasseigne/active_interaction/issues/476
973
980
  [#479]: https://github.com/AaronLasseigne/active_interaction/issues/479
981
+ [#486]: https://github.com/AaronLasseigne/active_interaction/issues/486
@@ -74,14 +74,13 @@ module ActiveInteraction
74
74
  def run
75
75
  return self.result = nil unless valid?
76
76
 
77
- run_callbacks(:execute) do
78
- self.result =
79
- begin
80
- execute
81
- rescue Interrupt => interrupt
82
- errors.backtrace = interrupt.errors.backtrace || interrupt.backtrace
83
- errors.merge!(interrupt.errors)
84
- end
77
+ self.result = run_callbacks(:execute) do
78
+ begin
79
+ execute
80
+ rescue Interrupt => interrupt
81
+ errors.backtrace = interrupt.errors.backtrace || interrupt.backtrace
82
+ errors.merge!(interrupt.errors)
83
+ end
85
84
  end
86
85
  end
87
86
 
@@ -6,5 +6,5 @@ module ActiveInteraction
6
6
  # The version number.
7
7
  #
8
8
  # @return [Gem::Version]
9
- VERSION = Gem::Version.new('3.8.2')
9
+ VERSION = Gem::Version.new('3.8.3')
10
10
  end
@@ -345,6 +345,24 @@ describe ActiveInteraction::Runnable do
345
345
  expect(outcome.caught_error).to be true
346
346
  end
347
347
  end
348
+
349
+ context 'with block not called and error in execute around callback' do
350
+ class CheckExecuteAroundCallbackForFailure
351
+ include ActiveInteraction::ActiveModelable
352
+ include ActiveInteraction::Runnable
353
+
354
+ set_callback :execute, :around, -> { errors.add(:base, 'invalid') }
355
+
356
+ def execute
357
+ true
358
+ end
359
+ end
360
+
361
+ it 'is invalid' do
362
+ outcome = CheckExecuteAroundCallbackForFailure.run
363
+ expect(outcome).to_not be_valid
364
+ end
365
+ end
348
366
  end
349
367
 
350
368
  describe '.run!' do
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_interaction
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.2
4
+ version: 3.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Lasseigne
8
8
  - Taylor Fausak
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-22 00:00:00.000000000 Z
12
+ date: 2020-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -271,14 +271,14 @@ files:
271
271
  - spec/support/concerns.rb
272
272
  - spec/support/filters.rb
273
273
  - spec/support/interactions.rb
274
- homepage:
274
+ homepage:
275
275
  licenses:
276
276
  - MIT
277
277
  metadata:
278
278
  homepage_uri: https://github.com/AaronLasseigne/active_interaction
279
279
  source_code_uri: https://github.com/AaronLasseigne/active_interaction
280
280
  changelog_uri: https://github.com/AaronLasseigne/active_interaction/blob/master/CHANGELOG.md
281
- post_install_message:
281
+ post_install_message:
282
282
  rdoc_options: []
283
283
  require_paths:
284
284
  - lib
@@ -294,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
294
  version: '0'
295
295
  requirements: []
296
296
  rubygems_version: 3.1.2
297
- signing_key:
297
+ signing_key:
298
298
  specification_version: 4
299
299
  summary: Manage application specific business logic.
300
300
  test_files: