trailblazer-activity 0.16.4 → 0.17.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: ba8b06193c7e9d3a488e76880cf82906db733edfa081c8de86f8ae55a3392628
4
- data.tar.gz: efa7751c90679572bd39fb1c1ea18c75a996de796cba685819fb256ef6c738d7
3
+ metadata.gz: db90b7ac4eda6d6bf8c55d4e3107c8aac6ebfbf8a29e4e7d7e8a2394f0faab4a
4
+ data.tar.gz: 1b28fade56d479d3c500e571c22247359d767d3e5f427b85f071ab0bd8a642c8
5
5
  SHA512:
6
- metadata.gz: 0b506af8a0f22329757b03ce8a186e552cae4e747780690cd910555453d1e16ba6c897eb0d5b7266c1ca730e82ab2c0684a4c42700a8f16bdde5927491bb2f6a
7
- data.tar.gz: c448cc3fb03f2b6abd5da7d9f54ddebc4a17327923412da8f96d88a698fc0d0e2d72172f510a1d765fa6ff6c770e2f20f9db12db59bc991631882238182bb958
6
+ metadata.gz: 5b23e22e9df457794cc04bb571839dbe703677ffcfe1f137f65282fc520e99b3676a8047a0a0b0909e8ec0397ad696443773fea79a0b2f323c767c1f02330347
7
+ data.tar.gz: 5610595f825d407f05c74fddc10a44bf030b71d54d1880ae0f27f1fc753be084806c799b6bd402aa4fd27df5fc411a1fefdc88f64c67eb80262275b66b8c17e9
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.17.0
2
+
3
+ * In `Extension#call`, remove the dependency to `Implementation::Task`. The logic only receives the actual circuit task.
4
+ * Remove deprecated `Extension()` interface.
5
+ * Remove `Trailblazer::Activity::Introspect::Graph`.
6
+
1
7
  # 0.16.4
2
8
 
3
9
  * Revert the static "fix" from 0.16.3 and make the compaction fix optional, as most Ruby versions
@@ -56,13 +56,6 @@ module Trailblazer
56
56
 
57
57
  proc.inspect
58
58
  end
59
-
60
- # TODO: remove with 0.1.0.
61
- def self.Graph(*args)
62
- Deprecate.warn caller_locations[0], %(`Trailblazer::Activity::Introspect::Graph` is deprecated. Please use `Trailblazer::Developer::Introspect.Graph`)
63
-
64
- Trailblazer::Developer::Introspect::Graph.new(*args)
65
- end
66
59
  end # Introspect
67
60
  end
68
61
  end
@@ -92,7 +92,7 @@ module Trailblazer
92
92
  def invoke_extensions_for(config, impl_task, id)
93
93
  impl_task
94
94
  .extensions
95
- .inject(config) { |cfg, ext| ext.(config: cfg, id: id, task: impl_task) } # {ext} must return new config hash.
95
+ .inject(config) { |cfg, ext| ext.(config: cfg, id: id, task: impl_task.circuit_task) } # {ext} must return new config hash.
96
96
  end
97
97
 
98
98
  # In an array of {Activity::Output}, find the output matching {semantic}.
@@ -17,15 +17,7 @@ module Trailblazer
17
17
  # TaskWrap.Extension([task, id: "my_logger", append: "task_wrap.call_task"], [...])
18
18
  #
19
19
  # If you want a {wrap_static} extension, wrap it using `Extension.WrapStatic.new`.
20
- def self.Extension(*inserts, merge: nil)
21
- if merge
22
- Deprecate.warn caller_locations[0], "The :merge option for TaskWrap.Extension is deprecated and will be removed in 0.16.
23
- Please refer to https://trailblazer.to/2.1/docs/activity.html#activity-taskwrap-static and have a great day."
24
-
25
- return Extension::WrapStatic.new(extension: Extension.new(*merge))
26
- # TODO: remove me once we drop the pre-friendly interface.
27
- end
28
-
20
+ def self.Extension(*inserts)
29
21
  Extension.build(*inserts)
30
22
  end
31
23
 
@@ -44,8 +36,6 @@ Please refer to https://trailblazer.to/2.1/docs/activity.html#activity-taskwrap-
44
36
  end
45
37
 
46
38
  def initialize(*extension_rows)
47
- extension_rows = deprecated_extension_for(extension_rows) # TODO: remove me soon!
48
-
49
39
  @extension_rows = extension_rows # those rows are simple ADDS instructions.
50
40
  end
51
41
 
@@ -55,21 +45,6 @@ Please refer to https://trailblazer.to/2.1/docs/activity.html#activity-taskwrap-
55
45
  Adds.apply_adds(task_wrap_pipeline, @extension_rows)
56
46
  end
57
47
 
58
- # TODO: remove me once we drop the pre-friendly interface.
59
- def deprecated_extension_for(extension_rows)
60
- return extension_rows unless extension_rows.find { |ext| ext.is_a?(Array) }
61
-
62
- Deprecate.warn caller_locations[3], "You are using the old API for taskWrap extensions.
63
- Please update to the new TaskWrap.Extension() API."
64
-
65
- extension_rows.collect do |ary|
66
- {
67
- insert: ary[0..1],
68
- row: Pipeline.Row(*ary[2])
69
- }
70
- end
71
- end
72
-
73
48
  # Create extensions from the friendly interface that can alter the wrap_static
74
49
  # of a step in an activity. The returned extensionn can be passed directly via {:extensions}
75
50
  # to the compiler, or when using the `#step` DSL.
@@ -86,9 +61,6 @@ Please update to the new TaskWrap.Extension() API."
86
61
  end
87
62
 
88
63
  def call(config:, task:, **)
89
- # DISCUSS: does it make sense to test the immutable behavior here? What would be the worst outcome?
90
- task = task.circuit_task # Receives {Schema::Implementation::Task}. DISCUSS: why?
91
-
92
64
  # Add the extension's task(s) to the activity's {:wrap_static} taskWrap
93
65
  # which is stored in the {:config} field.
94
66
  wrap_static = config[:wrap_static] # the activity's {wrap_static}.
@@ -97,6 +69,7 @@ Please update to the new TaskWrap.Extension() API."
97
69
  # Overwrite the original task_wrap:
98
70
  wrap_static = wrap_static.merge(task => @extension.(task_wrap))
99
71
 
72
+ # DISCUSS: does it make sense to test the immutable behavior here? What would be the worst outcome?
100
73
  config.merge(wrap_static: wrap_static) # Return new config hash. This needs to be immutable code!
101
74
  end
102
75
  end # WrapStatic
@@ -23,21 +23,6 @@ class Trailblazer::Activity
23
23
  @sequence
24
24
  end
25
25
 
26
- # TODO: remove me when old tW extension API is deprecated.
27
- def self.method(name)
28
- new_name = {
29
- insert_before: :Prepend,
30
- insert_after: :Append,
31
- append: :Append,
32
- prepend: :Prepend
33
- }.fetch(name)
34
-
35
- warn "[Trailblazer] Using `Trailblazer::Activity::TaskWrap::Pipeline.method(:#{name})` is deprecated.
36
- Please use the new API: #FIXME!!!"
37
-
38
- Trailblazer::Activity::Adds::Insert.method(new_name)
39
- end
40
-
41
26
  def self.Row(id, task)
42
27
  Row[id, task]
43
28
  end
@@ -48,18 +33,6 @@ Please use the new API: #FIXME!!!"
48
33
  end
49
34
  end
50
35
 
51
- # TODO: remove {Merge} when old tW extension API is deprecated.
52
- class Merge
53
- def self.new(*inserts)
54
- warn "[Trailblazer] Using `Trailblazer::Activity::TaskWrap::Pipeline::Merge.new` is deprecated.
55
- Please use the new TaskWrap.Extension() API: #FIXME!!!"
56
-
57
- # We can safely assume that users calling {Merge.new} are using the old tW extension API, not
58
- # the "friendly API". That's why we don't go through {Extension.build}.
59
- TaskWrap::Extension.new(*inserts)
60
- end
61
- end # Merge
62
-
63
36
  # Implements adapter for a callable in a Pipeline.
64
37
  class TaskAdapter < Circuit::TaskAdapter
65
38
  # Returns a {Pipeline::TaskAdapter} instance that can be used directly in a Pipeline.
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  module Version
3
3
  module Activity
4
- VERSION = "0.16.4"
4
+ VERSION = "0.17.0"
5
5
  end
6
6
  end
7
7
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["apotonick@gmail.com"]
10
10
 
11
11
  spec.summary = %q{Runtime code for Trailblazer activities.}
12
- spec.homepage = "http://trailblazer.to"
12
+ spec.homepage = "https://trailblazer.to"
13
13
  spec.licenses = ["LGPL-3.0"]
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "minitest", "~> 5.0"
25
25
  spec.add_development_dependency "minitest-line"
26
26
  spec.add_development_dependency "rake"
27
- spec.add_development_dependency "trailblazer-core-utils", "0.0.3"
27
+ spec.add_development_dependency "trailblazer-core-utils", "0.0.4"
28
28
 
29
29
  spec.required_ruby_version = '>= 2.1.0'
30
30
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.4
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-11 00:00:00.000000000 Z
10
+ date: 2024-11-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: trailblazer-context
@@ -100,15 +99,14 @@ dependencies:
100
99
  requirements:
101
100
  - - '='
102
101
  - !ruby/object:Gem::Version
103
- version: 0.0.3
102
+ version: 0.0.4
104
103
  type: :development
105
104
  prerelease: false
106
105
  version_requirements: !ruby/object:Gem::Requirement
107
106
  requirements:
108
107
  - - '='
109
108
  - !ruby/object:Gem::Version
110
- version: 0.0.3
111
- description:
109
+ version: 0.0.4
112
110
  email:
113
111
  - apotonick@gmail.com
114
112
  executables: []
@@ -146,11 +144,10 @@ files:
146
144
  - lib/trailblazer/activity/testing.rb
147
145
  - lib/trailblazer/activity/version.rb
148
146
  - trailblazer-activity.gemspec
149
- homepage: http://trailblazer.to
147
+ homepage: https://trailblazer.to
150
148
  licenses:
151
149
  - LGPL-3.0
152
150
  metadata: {}
153
- post_install_message:
154
151
  rdoc_options: []
155
152
  require_paths:
156
153
  - lib
@@ -165,8 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
162
  - !ruby/object:Gem::Version
166
163
  version: '0'
167
164
  requirements: []
168
- rubygems_version: 3.2.3
169
- signing_key:
165
+ rubygems_version: 3.6.0.dev
170
166
  specification_version: 4
171
167
  summary: Runtime code for Trailblazer activities.
172
168
  test_files: []