opera 0.2.16 → 0.2.17

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: dc70b9316e79f9ca5de85afc65ea0ea0f667c8a99aa72d0828f267383b8e76c2
4
- data.tar.gz: 8ae3e726adc06851d36fdfd1314f001f678b35b7840be2bb96f833065198497a
3
+ metadata.gz: c6b4eeef70ec90ace2eab7861bb9e9801f1e986354a411f2ca426f1380c3a0f7
4
+ data.tar.gz: b2264478656ffab0e08ae0e50b7b54a4dffdf81d64bb53bb2a27365151700351
5
5
  SHA512:
6
- metadata.gz: f9cf2f017c1ba44975e3968912d7859514ca6c900c824130922e9d1ab7a537cdc7e0d69b0a014d8d4ceb5eb9250be7246a7671af5ff00919764e734cce333f3f
7
- data.tar.gz: 1ee6be5b16d95fd0d9174028e93784f6afa18a249553fcc2d5ef1725ac959733e4eba2598249a53c39314937299a7d55889d1919ea7e7bef670d48c712740331
6
+ metadata.gz: efb5db089f99b26ab2f085e62a064dcaf31adc46632fccc9e51ab73f22dc611d9341f7f3ddb5b4d1bdf5d1c8b598aab54af5071df891f0696f5b8357bcd1960b
7
+ data.tar.gz: 0c5e84d50fa8f0a0b5f4a839b97e208925420de362ed42ab60e0731aadfe4b7a25462a6927078feb185dd03c2621aa09562a13d5893b3fdba3bd9de171e01fd6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Opera Changelog
2
2
 
3
+ ### 0.2.17 - July 8, 2024
4
+
5
+ - minor fix `mode` configuration option.
6
+
3
7
  ### 0.2.16 - June 8, 2024
4
8
 
5
9
  - add `mode` configuration option. When set to `:production` we optimize memory usage by skipping storing executions.
@@ -62,6 +62,10 @@ module Opera
62
62
  operation.config
63
63
  end
64
64
 
65
+ def production_mode?
66
+ config.mode == Config::PRODUCTION_MODE
67
+ end
68
+
65
69
  def context
66
70
  operation.context
67
71
  end
@@ -18,7 +18,9 @@ module Opera
18
18
  end
19
19
 
20
20
  execution = result.executions.pop
21
- result.add_execution(execution => operation_result.executions)
21
+ result.add_execution(execution => operation_result.executions) unless production_mode?
22
+
23
+ operation_result
22
24
  end
23
25
 
24
26
  private
@@ -45,7 +45,7 @@ module Opera
45
45
  def add_results(instruction, results)
46
46
  add_instruction_output(instruction, results.map(&:output))
47
47
  execution = result.executions.pop
48
- result.add_execution(execution => results.map(&:executions))
48
+ result.add_execution(execution => results.map(&:executions)) unless production_mode?
49
49
  end
50
50
 
51
51
  def raise_error
@@ -8,7 +8,7 @@ module Opera
8
8
  def call(instruction)
9
9
  method = instruction[:method]
10
10
 
11
- operation.result.add_execution(method)
11
+ operation.result.add_execution(method) unless production_mode?
12
12
  operation.send(method)
13
13
  rescue StandardError => exception
14
14
  reporter&.error(exception)
@@ -71,16 +71,8 @@ module Opera
71
71
  end
72
72
 
73
73
  def add_execution(step)
74
- return if config.production_mode?
75
-
76
74
  @executions << step
77
75
  end
78
-
79
- private
80
-
81
- def config
82
- Config
83
- end
84
76
  end
85
77
  end
86
78
  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.2.16'
4
+ VERSION = '0.2.17'
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.2.16
4
+ version: 0.2.17
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: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-validation