opera 0.2.10 → 0.2.12

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
2
  SHA256:
3
- metadata.gz: 84e206c0f8da7dd69e6a4132a7228b87cbe3b79e7eeb3e936659554d7ac8a69a
4
- data.tar.gz: b962b7656ff7ddcfd0d964bd622027f4b431b2ddf9cb0d8ad59ec97a045eb6bc
3
+ metadata.gz: 78930a590b301337cc8e8b343553aaa149647184d598183b5edad450ae746270
4
+ data.tar.gz: 38f7992b2f711ab0484c69ffeb122e744703fe0b03c4eb33cb91610423aa9fa5
5
5
  SHA512:
6
- metadata.gz: 1159a0ffc970a9365ca78fde1589f49eb34ee73ebbcbc5bde0b895ce13cbd48c6ea361d4468002d39a9d00b6ffad377bf0ccbe3f4340be19882d07e780772a2d
7
- data.tar.gz: 85136103bf11201f4f0f877ef556c913b0d7031fc8e4ef10d42bcdcf30f3e0a7504eeea285b047397006a0ec54e8a383c80b7d51bc0c667a3348c42b48ef7876
6
+ metadata.gz: 3032bcdd9ff63d16ebd0eac8f1373a4a4aa7d66b3f6871c70dab8c261b67dfe5db0387c442108744af0bc2aff85fef24c53f077594f585a59afa8b91e82674b6
7
+ data.tar.gz: ace1ad99d9319b0d8f864205c08c6c0d6d1f52db812ebf769c5e052d8616c7f3ee9a5a147a2156536c5908f76d2d3354efee6c45b8aa44b5249e1ce555dc5c60
@@ -16,7 +16,7 @@ jobs:
16
16
  runs-on: ubuntu-latest
17
17
  strategy:
18
18
  matrix:
19
- ruby-version: ['2.6', '2.7', '3.0']
19
+ ruby-version: ['2.6', '2.7', '3.0', 'jruby']
20
20
 
21
21
  steps:
22
22
  - uses: actions/checkout@v2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Opera Changelog
2
2
 
3
+ ### 0.2.12 - Oct 24, 2022
4
+
5
+ - added support for JRuby
6
+
7
+ ### 0.2.11 - June 1, 2022
8
+
9
+ - handle internally exceptions from schema
10
+
3
11
  ### 0.2.10 - June 1, 2022
4
12
 
5
13
  - `finish!` does not break transaction
data/Gemfile CHANGED
@@ -8,5 +8,6 @@ gem 'rspec', '~> 3.0'
8
8
 
9
9
  group :test, :development do
10
10
  gem 'dry-validation'
11
- gem 'pry-byebug', require: false
11
+ gem 'pry-byebug', require: false, platform: :ruby
12
+ gem 'pry-nav', require: false, platform: :jruby
12
13
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opera (0.2.10)
4
+ opera (0.2.11)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -12,7 +12,8 @@ module Opera
12
12
  operation.send(method)
13
13
  rescue StandardError => exception
14
14
  reporter&.error(exception)
15
- operation.result.add_exception(method, exception.message, classname: operation.class.name)
15
+ operation.result.add_exception(method, "#{exception.message}, for #{operation.inspect}", classname: operation.class.name)
16
+ operation.result
16
17
  end
17
18
  end
18
19
  end
@@ -15,8 +15,22 @@ module Opera
15
15
  instruction[:kind] = :step
16
16
  dry_result = super
17
17
 
18
- add_instruction_output(instruction, dry_result.to_h)
19
- result.add_errors(dry_result.errors) unless dry_result.success?
18
+ case dry_result
19
+ when Opera::Operation::Result
20
+ add_instruction_output(instruction, dry_result.to_h)
21
+
22
+ unless dry_result.success?
23
+ result.add_errors(dry_result.errors)
24
+ result.add_exceptions(dry_result.exceptions)
25
+ end
26
+ when Dry::Validation::Result
27
+ add_instruction_output(instruction, dry_result.to_h)
28
+
29
+ result.add_errors(dry_result.errors) unless dry_result.success?
30
+ else
31
+ exception_message = "#{dry_result.class} is not expected object. Please check: #{dry_result.inspect}"
32
+ result.add_exception(instruction[:method], exception_message, classname: operation.class.name)
33
+ end
20
34
  end
21
35
  end
22
36
  end
data/lib/opera/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Opera
2
- VERSION = '0.2.10'
2
+ VERSION = '0.2.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opera
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - ProFinda Development Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-03 00:00:00.000000000 Z
11
+ date: 2022-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-validation