trailblazer-operation 0.8.0 → 0.9.0

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: 2d7d499269759535250f16ea0d6bcf6c23542ad4cc5be0e5ffda4d2e707d33ed
4
- data.tar.gz: e92315fb7214bc17eda181a09ea1388c20a78bd74cc96e0f7312df30f919accf
3
+ metadata.gz: 4c019f1fb62cb71a67f95393c340495f3cd512c7914dffae69b8a8789a41b0a5
4
+ data.tar.gz: 79e8ef13bbc5193d66e5bd522e3991215f97b581c202bb8b78fde79e877e204e
5
5
  SHA512:
6
- metadata.gz: '098ee61ee7be942eecc08843b3d88bb93c778774f6f69598bcb418473d4a264619a1461f7c0de8fc6c7d246c6b7f9cb546f000bc474055e3611bd0920d9af33d'
7
- data.tar.gz: 3642d73a74df00b44eeb3762e0f2fd2751b5f6d0385ff3cb26c8699b9d417d9b7603273832604567c69cd276ff396d89f93b516b54f476936088cdbd1343a0b2
6
+ metadata.gz: 26a554047293b40351fccc08b2f06877d142d6c1e81f6aa1cec0e51e6c4fb8f33f680cf90d5a35437b62e1eb3549d3504f45c601fcb707c2765e286e4de87ff9
7
+ data.tar.gz: 30c55dd1a0d0edc75d4c1ff8bd5b66edb14250506eab46d9db090d1d4dbc35f8b0cd38d0abcdaa99d0f156578576461de281479014ac2028892ce31cefcdf519
@@ -1,3 +1,6 @@
1
+ ## This file is managed by Terraform.
2
+ ## Do not modify this file directly, as it may be overwritten.
3
+ ## Please open an issue instead.
1
4
  name: CI
2
5
  on: [push, pull_request]
3
6
  jobs:
@@ -5,13 +8,12 @@ jobs:
5
8
  strategy:
6
9
  fail-fast: false
7
10
  matrix:
8
- # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
9
- ruby: [2.5, 2.6, 2.7, '3.0', '3.1', head, jruby]
11
+ ruby: [2.7, '3.0', '3.1']
10
12
  runs-on: ubuntu-latest
11
13
  steps:
12
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v3
13
15
  - uses: ruby/setup-ruby@v1
14
16
  with:
15
17
  ruby-version: ${{ matrix.ruby }}
16
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
18
+ bundler-cache: true
17
19
  - run: bundle exec rake
@@ -0,0 +1,19 @@
1
+ ## This file is managed by Terraform.
2
+ ## Do not modify this file directly, as it may be overwritten.
3
+ ## Please open an issue instead.
4
+ name: CI JRuby
5
+ on: [push, pull_request]
6
+ jobs:
7
+ test:
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [jruby, jruby-head]
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ bundler-cache: true
19
+ - run: bundle exec rake
@@ -0,0 +1,19 @@
1
+ ## This file is managed by Terraform.
2
+ ## Do not modify this file directly, as it may be overwritten.
3
+ ## Please open an issue instead.
4
+ name: CI with EOL ruby versions
5
+ on: [push, pull_request]
6
+ jobs:
7
+ test:
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [2.5, 2.6]
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ bundler-cache: true
19
+ - run: bundle exec rake
@@ -0,0 +1,19 @@
1
+ ## This file is managed by Terraform.
2
+ ## Do not modify this file directly, as it may be overwritten.
3
+ ## Please open an issue instead.
4
+ name: CI TruffleRuby
5
+ on: [push, pull_request]
6
+ jobs:
7
+ test:
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [truffleruby, truffleruby-head]
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ bundler-cache: true
19
+ - run: bundle exec rake
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.9.0
2
+
3
+ * Use `trailblazer-activity-dsl-linear` 1.1.0.
4
+ * Pass `:container_activity` to `TaskWrap.invoke` instead of the superseded `:static_wrap` option.
5
+
1
6
  ## 0.8.0
2
7
 
3
8
  * Use `trailblazer-activity-dsl-linear` 1.0.0.
data/Gemfile CHANGED
@@ -16,8 +16,3 @@ gem "minitest-line"
16
16
  # gem "trailblazer-context", path: "../trailblazer-context"
17
17
  # gem "trailblazer-activity-dsl-linear", path: "../trailblazer-activity-dsl-linear"
18
18
  # gem "trailblazer-activity", github: "trailblazer/trailblazer-activity"
19
-
20
- # gem "trailblazer-macro", path: "../trailblazer-macro"
21
- # gem "trailblazer-activity", path: "../trailblazer-activity"
22
- # gem "trailblazer-activity-dsl-linear", path: "../trailblazer-activity-dsl-linear"
23
- # gem "trailblazer-declarative"
@@ -25,7 +25,7 @@ class Trailblazer::Operation
25
25
  end
26
26
 
27
27
  private def context_for_fields(fields, (ctx, flow_options), **)
28
- ctx_with_fields = Trailblazer::Context(fields, ctx, flow_options[:context_options]) # TODO: redundant to otions_for_public_call.
28
+ ctx_with_fields = Trailblazer::Context(fields, ctx, flow_options[:context_options]) # TODO: redundant to options_for_public_call.
29
29
  end
30
30
 
31
31
  def call_with_circuit_interface((ctx, flow_options), **circuit_options)
@@ -41,7 +41,8 @@ module Trailblazer
41
41
  self,
42
42
  [ctx, flow_options],
43
43
  exec_context: new,
44
- wrap_static: initial_wrap_static,
44
+ # wrap_static: initial_wrap_static,
45
+ container_activity: Activity::TaskWrap.container_activity_for(self, wrap_static: initial_wrap_static)
45
46
  )
46
47
 
47
48
  # Result is successful if the activity ended with an End event derived from Railway::End::Success.
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  module Version
3
3
  module Operation
4
- VERSION = "0.8.0"
4
+ VERSION = "0.9.0"
5
5
  end
6
6
  end
7
7
  end
@@ -20,7 +20,7 @@ class DeclarativeApiTest < Minitest::Spec
20
20
  end
21
21
 
22
22
  MyOp.({})
23
- MyOp.global.inspect.must_equal %{[:call, :model]}
23
+ assert_equal MyOp.global.inspect, %{[:call, :model]}
24
24
  end
25
25
 
26
26
  #---
data/test/trace_test.rb CHANGED
@@ -22,32 +22,32 @@ class TraceTest < Minitest::Spec
22
22
 
23
23
  output = result.wtf
24
24
 
25
- output.gsub(/0x\w+/, "").gsub(/@.+_test/, "").must_equal %{`-- TraceTest::Create
26
- |-- Start.default
27
- |-- Create.task.a
28
- |-- MyNested
29
- | |-- Start.default
30
- | |-- B.task.b
31
- | |-- B.task.e
32
- | `-- End.success
33
- |-- Create.task.c
34
- |-- Create.task.params
35
- `-- End.failure}
25
+ assert_equal output.gsub(/0x\w+/, "").gsub(/@.+_test/, ""), %{TraceTest::Create
26
+ |-- Start.default
27
+ |-- Create.task.a
28
+ |-- MyNested
29
+ | |-- Start.default
30
+ | |-- B.task.b
31
+ | |-- B.task.e
32
+ | `-- End.success
33
+ |-- Create.task.c
34
+ |-- Create.task.params
35
+ `-- End.failure}
36
36
  end
37
37
 
38
38
  it "Operation::trace" do
39
39
  result = Create.trace(params: {x: 1}, a_return: true)
40
- result.wtf.gsub(/0x\w+/, "").gsub(/@.+_test/, "").must_equal %{`-- TraceTest::Create
41
- |-- Start.default
42
- |-- Create.task.a
43
- |-- MyNested
44
- | |-- Start.default
45
- | |-- B.task.b
46
- | |-- B.task.e
47
- | `-- End.success
48
- |-- Create.task.c
49
- |-- Create.task.params
50
- `-- End.success}
40
+ assert_equal result.wtf.gsub(/0x\w+/, "").gsub(/@.+_test/, ""), %{TraceTest::Create
41
+ |-- Start.default
42
+ |-- Create.task.a
43
+ |-- MyNested
44
+ | |-- Start.default
45
+ | |-- B.task.b
46
+ | |-- B.task.e
47
+ | `-- End.success
48
+ |-- Create.task.c
49
+ |-- Create.task.params
50
+ `-- End.success}
51
51
  end
52
52
 
53
53
  it "Operation.wtf?" do
@@ -56,17 +56,17 @@ class TraceTest < Minitest::Spec
56
56
  result = Create.wtf?(params: {x: 1}, a_return: true)
57
57
  end
58
58
 
59
- output.gsub(/0x\w+/, "").gsub(/@.+_test/, "").must_equal %{`-- TraceTest::Create
60
- |-- \e[32mStart.default\e[0m
61
- |-- \e[32mCreate.task.a\e[0m
62
- |-- MyNested
63
- | |-- \e[32mStart.default\e[0m
64
- | |-- \e[32mB.task.b\e[0m
65
- | |-- \e[32mB.task.e\e[0m
66
- | `-- End.success
67
- |-- \e[32mCreate.task.c\e[0m
68
- |-- \e[32mCreate.task.params\e[0m
69
- `-- End.success
59
+ assert_equal output.gsub(/0x\w+/, "").gsub(/@.+_test/, ""), %{TraceTest::Create
60
+ |-- \e[32mStart.default\e[0m
61
+ |-- \e[32mCreate.task.a\e[0m
62
+ |-- MyNested
63
+ | |-- \e[32mStart.default\e[0m
64
+ | |-- \e[32mB.task.b\e[0m
65
+ | |-- \e[32mB.task.e\e[0m
66
+ | `-- End.success
67
+ |-- \e[32mCreate.task.c\e[0m
68
+ |-- \e[32mCreate.task.params\e[0m
69
+ `-- End.success
70
70
  }
71
71
 
72
72
  result.success?.must_equal true
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_dependency "trailblazer-activity-dsl-linear", ">= 1.0.0", "< 1.1.0"
20
+ spec.add_dependency "trailblazer-activity-dsl-linear", ">= 1.1.0", "< 1.2.0"
21
21
  spec.add_dependency "trailblazer-developer", ">= 0.0.26"
22
22
 
23
23
  spec.add_development_dependency "bundler"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-22 00:00:00.000000000 Z
11
+ date: 2022-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-activity-dsl-linear
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0
19
+ version: 1.1.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 1.1.0
22
+ version: 1.2.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 1.0.0
29
+ version: 1.1.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 1.1.0
32
+ version: 1.2.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: trailblazer-developer
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -108,9 +108,10 @@ extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
110
  - ".github/workflows/ci.yml"
111
+ - ".github/workflows/ci_jruby.yml"
112
+ - ".github/workflows/ci_legacy.yml"
113
+ - ".github/workflows/ci_truffleruby.yml"
111
114
  - ".gitignore"
112
- - ".rubocop.yml"
113
- - ".rubocop_todo.yml"
114
115
  - CHANGES.md
115
116
  - Gemfile
116
117
  - README.md
data/.rubocop.yml DELETED
@@ -1,8 +0,0 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/trailblazer/meta/master/rubocop.yml
3
- - .rubocop_todo.yml
4
-
5
- Naming/MethodName:
6
- Exclude:
7
- - 'lib/trailblazer/operation/inject.rb'
8
- - 'lib/trailblazer/operation.rb'
data/.rubocop_todo.yml DELETED
@@ -1,223 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2019-04-05 17:28:56 +1100 using RuboCop version 0.58.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Configuration parameters: Include.
11
- # Include: **/*.gemspec
12
- Gemspec/RequiredRubyVersion:
13
- Exclude:
14
- - 'trailblazer-operation.gemspec'
15
-
16
- # Offense count: 5
17
- # Cop supports --auto-correct.
18
- Layout/CommentIndentation:
19
- Exclude:
20
- - 'lib/trailblazer/operation/version.rb'
21
- - 'test/wiring/defaults_test.rb'
22
-
23
- # Offense count: 3
24
- # Cop supports --auto-correct.
25
- # Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
26
- Layout/EmptyLineBetweenDefs:
27
- Exclude:
28
- - 'lib/trailblazer/operation.rb'
29
-
30
- # Offense count: 1
31
- # Cop supports --auto-correct.
32
- Layout/EmptyLines:
33
- Exclude:
34
- - 'lib/trailblazer/operation.rb'
35
-
36
- # Offense count: 1
37
- # Cop supports --auto-correct.
38
- # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
39
- Layout/ExtraSpacing:
40
- Exclude:
41
- - 'lib/trailblazer/operation.rb'
42
-
43
- # Offense count: 2
44
- # Cop supports --auto-correct.
45
- Layout/SpaceBeforeSemicolon:
46
- Exclude:
47
- - 'lib/trailblazer/operation.rb'
48
-
49
- # Offense count: 2
50
- # Cop supports --auto-correct.
51
- # Configuration parameters: EnforcedStyle.
52
- # SupportedStyles: space, no_space
53
- Layout/SpaceInsideParens:
54
- Exclude:
55
- - 'lib/trailblazer/operation.rb'
56
-
57
- # Offense count: 2
58
- Lint/ShadowingOuterLocalVariable:
59
- Exclude:
60
- - 'lib/trailblazer/operation/deprecated_macro.rb'
61
- - 'lib/trailblazer/operation/public_call.rb'
62
-
63
- # Offense count: 1
64
- # Cop supports --auto-correct.
65
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
66
- Lint/UnusedBlockArgument:
67
- Exclude:
68
- - 'lib/trailblazer/operation/inspect.rb'
69
-
70
- # Offense count: 2
71
- Lint/UselessAssignment:
72
- Exclude:
73
- - 'lib/trailblazer/operation/public_call.rb'
74
- - 'lib/trailblazer/operation/trace.rb'
75
-
76
- # Offense count: 46
77
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
78
- # URISchemes: http, https
79
- Metrics/LineLength:
80
- Max: 255
81
-
82
- # Offense count: 2
83
- Naming/ConstantName:
84
- Exclude:
85
- - 'lib/trailblazer/operation/inspect.rb'
86
- - 'lib/trailblazer/operation/version.rb'
87
-
88
- # Offense count: 1
89
- # Cop supports --auto-correct.
90
- Performance/StringReplacement:
91
- Exclude:
92
- - 'lib/trailblazer/operation/inspect.rb'
93
-
94
- # Offense count: 2
95
- # Cop supports --auto-correct.
96
- Style/BlockComments:
97
- Exclude:
98
- - 'test/docs/wiring_test.rb'
99
-
100
- # Offense count: 3
101
- # Cop supports --auto-correct.
102
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
103
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
104
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
105
- # FunctionalMethods: let, let!, subject, watch
106
- # IgnoredMethods: lambda, proc, it
107
- Style/BlockDelimiters:
108
- Exclude:
109
- - 'lib/trailblazer/operation/inspect.rb'
110
- - 'test/step_test.rb'
111
-
112
- # Offense count: 1
113
- # Cop supports --auto-correct.
114
- # Configuration parameters: EnforcedStyle.
115
- # SupportedStyles: braces, no_braces, context_dependent
116
- Style/BracesAroundHashParameters:
117
- Exclude:
118
- - 'lib/trailblazer/operation/public_call.rb'
119
-
120
- # Offense count: 1
121
- # Cop supports --auto-correct.
122
- # Configuration parameters: EnforcedStyle.
123
- # SupportedStyles: is_a?, kind_of?
124
- Style/ClassCheck:
125
- Exclude:
126
- - 'lib/trailblazer/operation/railway.rb'
127
-
128
- # Offense count: 2
129
- Style/CommentedKeyword:
130
- Exclude:
131
- - 'lib/trailblazer/operation/railway.rb'
132
-
133
- # Offense count: 1
134
- # Cop supports --auto-correct.
135
- Style/DefWithParentheses:
136
- Exclude:
137
- - 'lib/trailblazer/operation.rb'
138
-
139
- # Offense count: 1
140
- # Cop supports --auto-correct.
141
- Style/ExpandPathArguments:
142
- Exclude:
143
- - 'trailblazer-operation.gemspec'
144
-
145
- # Offense count: 3
146
- # Cop supports --auto-correct.
147
- # Configuration parameters: EnforcedStyle.
148
- # SupportedStyles: format, sprintf, percent
149
- Style/FormatString:
150
- Exclude:
151
- - 'lib/trailblazer/operation/inspect.rb'
152
-
153
- # Offense count: 1
154
- # Configuration parameters: .
155
- # SupportedStyles: annotated, template, unannotated
156
- Style/FormatStringToken:
157
- EnforcedStyle: unannotated
158
-
159
- # Offense count: 3
160
- Style/MethodCalledOnDoEndBlock:
161
- Exclude:
162
- - 'lib/trailblazer/operation/inspect.rb'
163
- - 'test/step_test.rb'
164
-
165
- # Offense count: 2
166
- # Cop supports --auto-correct.
167
- Style/MutableConstant:
168
- Exclude:
169
- - 'lib/trailblazer/operation/inspect.rb'
170
- - 'lib/trailblazer/operation/version.rb'
171
-
172
- # Offense count: 1
173
- # Cop supports --auto-correct.
174
- Style/ParallelAssignment:
175
- Exclude:
176
- - 'lib/trailblazer/operation/result.rb'
177
-
178
- # Offense count: 4
179
- # Cop supports --auto-correct.
180
- # Configuration parameters: PreferredDelimiters.
181
- Style/PercentLiteralDelimiters:
182
- Exclude:
183
- - 'Rakefile'
184
-
185
- # Offense count: 4
186
- # Cop supports --auto-correct.
187
- # Configuration parameters: EnforcedStyle.
188
- # SupportedStyles: only_raise, only_fail, semantic
189
- Style/SignalException:
190
- Exclude:
191
- - 'test/operation_test.rb'
192
- - 'test/ruby-2.0.0/operation_test.rb'
193
-
194
- # Offense count: 1
195
- # Cop supports --auto-correct.
196
- # Configuration parameters: EnforcedStyle.
197
- # SupportedStyles: use_perl_names, use_english_names
198
- Style/SpecialGlobalVars:
199
- Exclude:
200
- - 'trailblazer-operation.gemspec'
201
-
202
- # Offense count: 3
203
- # Cop supports --auto-correct.
204
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
205
- # SupportedStyles: single_quotes, double_quotes
206
- Style/StringLiterals:
207
- Exclude:
208
- - 'Gemfile'
209
- - 'trailblazer-operation.gemspec'
210
-
211
- # Offense count: 1
212
- # Cop supports --auto-correct.
213
- # Configuration parameters: EnforcedStyleForMultiline.
214
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
215
- Style/TrailingCommaInHashLiteral:
216
- Exclude:
217
- - 'lib/trailblazer/operation.rb'
218
-
219
- # Offense count: 2
220
- # Cop supports --auto-correct.
221
- Style/UnneededPercentQ:
222
- Exclude:
223
- - 'trailblazer-operation.gemspec'