trailblazer-developer 0.0.12 → 0.0.13

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: 2066fad0487e4eb57650c25b4b57d3575b237330e49232ab69386ec858c32dd4
4
- data.tar.gz: 281820207adaffb5b38f837580c5ae0ca44042dfb3aff434df363672df674f4d
3
+ metadata.gz: dcc1a32164a4c3e26c3d72450e416d8c3259002f2ce94782c808e4c041cb7847
4
+ data.tar.gz: fb0bede8fcfed4c533dec425f9f92b8188fd4df6ce82c39543d21d7440b7c1fc
5
5
  SHA512:
6
- metadata.gz: 50f9ddb3ce5635909db47aac06c96a604f2c69d1a4e57522d6189b0e06426d6a60710958bf37929f3645619bb7815ddb54ecf4711734c67d1c85f40d87ff8a81
7
- data.tar.gz: de4b719a86630c7c1f8eba21d83211715667e57e5f05498a4abff67e8275cc3746e72d3dbf435c9dc24f13d4b77319197b618f36091a3c705bf66e7ae45934bb
6
+ metadata.gz: d6661e0492929cf37bbf40afbbd61d79308f113005040a61515801d72b7731adce960245d618ccb5a7db4903e082f5ae1b2a60fe139006f978e4f13ab02cf4a7
7
+ data.tar.gz: b7b1581c7733ca0066eafb8877c06d9ca7175854c56d8fa62509f384881c772a84b7dce4ba4dacd547710d4a3c1ed04da9dc9d15f7571e8852fb8c11778d4f35
@@ -1,3 +1,8 @@
1
+ # 0.0.13
2
+
3
+ * Allow focusing on selected variables for all steps in wtf
4
+ * Fix declarative deprecation warning
5
+
1
6
  # 0.0.12
2
7
 
3
8
  * Revert Hash#compact usage to support Rubies <= 2.4
@@ -17,7 +17,7 @@ module Trailblazer
17
17
  collection :elements, class: Element do
18
18
  property :id
19
19
  property :type
20
- collection :linksTo, class: Arrow, default: [] do
20
+ collection :linksTo, class: Arrow, default: -> { [] } do
21
21
  property :target
22
22
  property :label
23
23
  property :message
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  module Version
3
3
  module Developer
4
- VERSION = "0.0.12"
4
+ VERSION = "0.0.13"
5
5
  end
6
6
  end
7
7
  end
@@ -57,10 +57,11 @@ module Trailblazer::Developer
57
57
 
58
58
  # Overring default input and output data collectors to collect/capture
59
59
  # 1. inspect of focusable variables for given focusable step
60
+ # 2. Or inspect of focused variables for all steps
60
61
  def trace_input_data_collector(wrap_config, (ctx, flow_options), circuit_options)
61
62
  data = Trace.default_input_data_collector(wrap_config, [ctx, flow_options], circuit_options)
62
63
 
63
- if flow_options[:focus_on][:steps].include?(data[:task_name])
64
+ if Wtf.caputure_variables?(step_name: data[:task_name], **flow_options)
64
65
  data[:focused_variables] = Trace::Focusable.capture_variables_from(ctx, **flow_options)
65
66
  end
66
67
 
@@ -68,14 +69,21 @@ module Trailblazer::Developer
68
69
  end
69
70
 
70
71
  def trace_output_data_collector(wrap_config, (ctx, flow_options), circuit_options)
71
- data = Trace.default_output_data_collector(wrap_config, [ctx, flow_options], circuit_options)
72
-
72
+ data = Trace.default_output_data_collector(wrap_config, [ctx, flow_options], circuit_options)
73
73
  input = flow_options[:stack].top
74
- if flow_options[:focus_on][:steps].include?(input.data[:task_name])
74
+
75
+ if Wtf.caputure_variables?(step_name: input.data[:task_name], **flow_options)
75
76
  data[:focused_variables] = Trace::Focusable.capture_variables_from(ctx, **flow_options)
76
77
  end
77
78
 
78
79
  data
79
80
  end
81
+
82
+ # private
83
+ def caputure_variables?(step_name:, focus_on:, **)
84
+ return true if focus_on[:steps].include?(step_name) # For given step
85
+ return true if focus_on[:steps].empty? && focus_on[:variables].any? # For selected vars but all steps
86
+ return false
87
+ end
80
88
  end
81
89
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-developer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-26 00:00:00.000000000 Z
11
+ date: 2020-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.0.8
196
+ rubygems_version: 3.0.3
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: Developer tools for Trailblazer.