opera 0.5.0 → 0.5.1

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.
@@ -6,8 +6,11 @@ module Opera
6
6
  module Executors
7
7
  class Success < Executor
8
8
  def call(instruction)
9
- instruction[:kind] = :step
10
- super
9
+ if instruction[:instructions]
10
+ evaluate_instructions(instruction[:instructions])
11
+ else
12
+ execute_step(instruction)
13
+ end
11
14
  end
12
15
 
13
16
  def break_condition
@@ -12,8 +12,7 @@ module Opera
12
12
  private
13
13
 
14
14
  def evaluate_instruction(instruction)
15
- instruction[:kind] = :step
16
- validation_result = super
15
+ validation_result = execute_step(instruction)
17
16
 
18
17
  case validation_result
19
18
  when Opera::Operation::Result
@@ -13,7 +13,7 @@ module Opera
13
13
  raise ArgumentError, 'within requires a block with at least one instruction' if nested_instructions.nil?
14
14
 
15
15
  operation.send(wrapper_method) do
16
- super
16
+ evaluate_instructions(nested_instructions)
17
17
  end
18
18
  end
19
19
  end
data/lib/opera/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Opera
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  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.5.0
4
+ version: 0.5.1
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: 2026-04-14 00:00:00.000000000 Z
11
+ date: 2026-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-validation
@@ -73,9 +73,18 @@ files:
73
73
  - LICENSE.txt
74
74
  - README.md
75
75
  - Rakefile
76
+ - benchmarks/operation_benchmark.rb
76
77
  - bin/console
77
78
  - bin/setup
78
79
  - docker-compose.yml
80
+ - docs/examples/basic-operation.md
81
+ - docs/examples/context-params-dependencies.md
82
+ - docs/examples/finish-if.md
83
+ - docs/examples/inner-operations.md
84
+ - docs/examples/success-blocks.md
85
+ - docs/examples/transactions.md
86
+ - docs/examples/validations.md
87
+ - docs/examples/within.md
79
88
  - lib/opera.rb
80
89
  - lib/opera/errors.rb
81
90
  - lib/opera/operation.rb