trailblazer-activity 0.12.0 → 0.12.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f790c2cce163e21a33c31093c7d74358574f851249b810a4e776472fccc9cb4f
4
- data.tar.gz: 0e78fa480306d480850ef3709871e234ece90939e9552a4ddcfe0bb26f5e2853
3
+ metadata.gz: 26bd7483c314f6fda4c424cb35a9923b139194882639e0324c1f3877b267ed3d
4
+ data.tar.gz: 414ec2f07eb06318f7fb7fab7aadbef9bbf34cdbb76fad866936ede20ad55937
5
5
  SHA512:
6
- metadata.gz: 35b942b116679ad0aae0793fc102ad274f2aef584dd91a9d808d0abf50f3ca62ba0e20b9eca9590063bf97096ed177c119d41e18c964d4f33730f9719e30836b
7
- data.tar.gz: 63596947b49ca3bfd44d3cd567bf6abfdefbc086cea31da14716654a920caaa443c49071828114a2e7fa99905d3d5810ef9b19087b27b1782a7b1bdcdcddd410
6
+ metadata.gz: a75f9f5d4ac9367540c058b749bf411a52f38e077e90df8d256c1bbfbf9aa697cc0b1b3c8be5b5d2f1fe35ef287976afa2f4ed3eb5b8abba5adf8c152810242b
7
+ data.tar.gz: 2bbad5b09c667363ce8f0f59105b48ffbba688ff78bb8b664b57fc89414742c2513f155b2a13a967da3614463808d4837243aa616684805d460b84f44b51efc2
@@ -0,0 +1,17 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ 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', head, jruby, jruby-head]
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: ${{ matrix.ruby }}
16
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
17
+ - run: bundle exec rake
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.12.1
2
+
3
+ * Allow injecting `:wrap_static` into `TaskWrap.invoke`.
4
+
1
5
  # 0.12.0
2
6
 
3
7
  * Support for Ruby 3.0.
@@ -13,11 +13,14 @@ module Trailblazer
13
13
  module_function
14
14
 
15
15
  # Compute runtime arguments necessary to execute a taskWrap per task of the activity.
16
- def invoke(activity, args, wrap_runtime: {}, **circuit_options)
16
+ # This method is the top-level entry, called only once for the entire activity graph.
17
+ def invoke(activity, args, wrap_runtime: {}, wrap_static: initial_wrap_static, **circuit_options)
17
18
  circuit_options = circuit_options.merge(
18
19
  runner: TaskWrap::Runner,
19
20
  wrap_runtime: wrap_runtime,
20
- activity: {wrap_static: {activity => initial_wrap_static}, nodes: {}}, # for Runner. Ideally we'd have a list of all static_wraps here (even nested).
21
+ # This {:activity} structure is currently (?) only needed in {TaskWrap.wrap_static_for}, where we
22
+ # access {activity[:wrap_static]} to compile the effective taskWrap.
23
+ activity: {wrap_static: {activity => wrap_static}, nodes: {}}, # for Runner. Ideally we'd have a list of all static_wraps here (even nested).
21
24
  )
22
25
 
23
26
  # signal, (ctx, flow), circuit_options =
@@ -43,6 +46,9 @@ module Trailblazer
43
46
  @merge = merge
44
47
  end
45
48
 
49
+ # Compile-time:
50
+ # Gets called via the {Normalizer} and represents an {:extensions} item.
51
+ # Adds/alters the activity's {wrap_static}.
46
52
  def call(config:, task:, **)
47
53
  before_pipe = State::Config.get(config, :wrap_static, task.circuit_task)
48
54
 
@@ -17,7 +17,7 @@ class Trailblazer::Activity
17
17
 
18
18
  # We save all original args passed into this Runner.call, because we want to return them later after this wrap
19
19
  # is finished.
20
- original_args = [ args, circuit_options ]
20
+ original_args = [args, circuit_options]
21
21
 
22
22
  # call the wrap {Activity} around the task.
23
23
  wrap_ctx, _ = task_wrap_pipeline.(wrap_ctx, original_args) # we omit circuit_options here on purpose, so the wrapping activity uses the default, plain Runner.
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  module Version
3
3
  module Activity
4
- VERSION = '0.12.0'.freeze
4
+ VERSION = '0.12.1'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-26 00:00:00.000000000 Z
11
+ date: 2021-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-context
@@ -107,8 +107,8 @@ executables: []
107
107
  extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
+ - ".github/workflows/ci.yml"
110
111
  - ".gitignore"
111
- - ".travis.yml"
112
112
  - CHANGES.md
113
113
  - Gemfile
114
114
  - LICENSE
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
- rubygems_version: 3.2.3
156
+ rubygems_version: 3.0.8
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Runtime code for Trailblazer activities.
data/.travis.yml DELETED
@@ -1,13 +0,0 @@
1
- language: ruby
2
- before_install: gem install bundler
3
- cache: bundler
4
- rvm:
5
- - ruby-head
6
- - 3.0
7
- - 2.7
8
- - 2.6
9
- - 2.5
10
- - 2.4
11
- jobs:
12
- allow_failures:
13
- - rvm: ruby-head