opera 0.2.12 → 0.2.14

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: 78930a590b301337cc8e8b343553aaa149647184d598183b5edad450ae746270
4
- data.tar.gz: 38f7992b2f711ab0484c69ffeb122e744703fe0b03c4eb33cb91610423aa9fa5
3
+ metadata.gz: 89cd1d74b5ee4021f3adffec29eb4096cb0d71d64c9179ca7e7d8c970f49aac1
4
+ data.tar.gz: 29faa06fcb24291dc2e75762a12d8747050173dadb163f89af6b4f86013d9e37
5
5
  SHA512:
6
- metadata.gz: 3032bcdd9ff63d16ebd0eac8f1373a4a4aa7d66b3f6871c70dab8c261b67dfe5db0387c442108744af0bc2aff85fef24c53f077594f585a59afa8b91e82674b6
7
- data.tar.gz: ace1ad99d9319b0d8f864205c08c6c0d6d1f52db812ebf769c5e052d8616c7f3ee9a5a147a2156536c5908f76d2d3354efee6c45b8aa44b5249e1ce555dc5c60
6
+ metadata.gz: 2165af4193eba6127ff31ffcff445cbb84e883b26d35cf0fae0e1a726dee3e5a2d7285e234639529bb9d175c4a49b54b7ff800b34e535a7c94df89c4c6c20cfc
7
+ data.tar.gz: 742f6615a8f559bcf2f4a4b6a9efde378005609a5ba77711b25c38f69f9bf281e5a76a5f05e2b9b14bfbe07078b8d5cb409cd6b6c90ef1f976a2a058ee452ca4
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- ruby-version: [ '2.6', '2.7', '3.0' ]
12
+ ruby-version: [ '2.6', '2.7', '3.0', 'jruby' ]
13
13
 
14
14
  steps:
15
15
  - uses: actions/checkout@v2
@@ -49,10 +49,10 @@ jobs:
49
49
 
50
50
  steps:
51
51
  - uses: actions/checkout@v2
52
- - name: Set up Ruby 2.6
53
- uses: actions/setup-ruby@v1
52
+ - name: Set up Ruby 2.7
53
+ uses: ruby/setup-ruby@v1
54
54
  with:
55
- ruby-version: 2.6.x
55
+ ruby-version: 2.7
56
56
 
57
57
  - name: Publish to RubyGems
58
58
  run: |
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Opera Changelog
2
2
 
3
+ ### 0.2.14 - April 25, 2023
4
+
5
+ - Added support for objects responding to `to_hash` method in error handling for easier integration with Rails.
6
+
7
+ ### 0.2.13 - October 24, 2022
8
+
9
+ - Avoid return inside transaction block to support activegraph with jruby
10
+
3
11
  ### 0.2.12 - Oct 24, 2022
4
12
 
5
13
  - added support for JRuby
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opera (0.2.11)
4
+ opera (0.2.14)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -77,6 +77,7 @@ DEPENDENCIES
77
77
  dry-validation
78
78
  opera!
79
79
  pry-byebug
80
+ pry-nav
80
81
  rake (~> 12.0)
81
82
  rspec (~> 3.0)
82
83
 
@@ -12,9 +12,7 @@ module Opera
12
12
  transaction_class.send(*arguments) do
13
13
  super
14
14
 
15
- return if result.success?
16
-
17
- raise(transaction_error)
15
+ raise(transaction_error) if result.failure?
18
16
  end
19
17
  rescue transaction_error
20
18
  nil
@@ -49,7 +49,7 @@ module Opera
49
49
  # rubocop:enable Metrics/MethodLength
50
50
 
51
51
  def add_errors(errors)
52
- errors.to_h.each_pair do |key, value|
52
+ errors.to_hash.each_pair do |key, value|
53
53
  add_error(key, value)
54
54
  end
55
55
  end
data/lib/opera/version.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Opera
2
- VERSION = '0.2.12'
4
+ VERSION = '0.2.14'
3
5
  end
data/lib/opera.rb CHANGED
@@ -1,5 +1,6 @@
1
- require 'opera/version'
1
+ # frozen_string_literal: true
2
2
 
3
+ require 'opera/version'
3
4
  require 'opera/errors'
4
5
  require 'opera/operation'
5
6
 
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.12
4
+ version: 0.2.14
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-10-24 00:00:00.000000000 Z
11
+ date: 2023-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-validation
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubygems_version: 3.0.3.1
118
+ rubygems_version: 3.1.6
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Use simple DSL language to keep your Operations clean and maintainable