trailblazer-developer 0.0.14 → 0.0.15

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: 06ed468329890c32151abbaf7a53ad46c5304a6ab0f2b5917ca065e722e29932
4
- data.tar.gz: 6ab6a7ef46d0a1ea39358b05c9e02042cf1434859c59fcfadaaaf2b4be18d454
3
+ metadata.gz: d011963349460317f1cbf1face4be2bc4b7d4b785d16c407f6ae406ee45d2896
4
+ data.tar.gz: c98a3a9b80e834636b72f4c28b49f8b98f43fc72cde7763716163d58414cba1b
5
5
  SHA512:
6
- metadata.gz: 81406be163c674ff5f06b3c86df28626c7207c30afb167d530c08e88aa2db6c09e1890ec0dc1cc37dc85170e43599b759f142fda98f5a298d493da6c7849b74f
7
- data.tar.gz: c78bb45523d06eb9d544f1fee42e659b4e9c11005c3524566292fb9f37d655bd954acd6a79e40928b9c0f613a3a9c0a274307d7236f2446da5c514dd8e3f175d
6
+ metadata.gz: 100d9a06f9d5f1b4e142a55831ca55aaaeb4bfd8c7a2b8fa81101549764841d25306999dfec32641044d6d11c8d47f1f3e53d60a2b0fd5f1800a3cb653185b91
7
+ data.tar.gz: d5ca2e3657f4a79acac4df4f51bd1b291f736d126a56a4b22667083c2acff7dac4751679cabfd0542dde25290cc74befcd1c197ab8811e76d793e84d57947210
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.6.2
4
- - 2.5.5
5
- - 2.4.4
3
+ - 2.6
4
+ - 2.5
5
+ - 2.4
6
6
 
7
7
  cache: bundler
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
- require "rubocop/rake_task"
4
3
 
5
4
  Rake::TestTask.new(:test) do |t|
6
5
  t.libs << "test"
@@ -8,7 +7,5 @@ Rake::TestTask.new(:test) do |t|
8
7
  t.test_files = FileList["test/**/*_test.rb"]
9
8
  end
10
9
 
11
- RuboCop::RakeTask.new(:rubocop)
12
-
13
10
  desc "Running Tests"
14
11
  task default: %i[test]
@@ -1,3 +1,7 @@
1
+ # 0.0.15
2
+
3
+ * Fix `Dev.wtf` circuit interface definition
4
+
1
5
  # 0.0.14
2
6
 
3
7
  * Revert declarative warning changes
@@ -31,7 +31,7 @@ module Trailblazer::Developer
31
31
  return false unless response.status == 200
32
32
 
33
33
  # token = CGI::Cookie.parse(response.headers["set-cookie"])["token"][0]
34
- token = JSON.parse(response.body)["token"]
34
+ JSON.parse(response.body)["token"]
35
35
  end
36
36
 
37
37
  def export_diagram(id:, query:, **options)
@@ -60,7 +60,7 @@ module Trailblazer::Developer
60
60
  def request(host:, url:, method:, token:, body:, **)
61
61
  conn = Faraday.new(url: host)
62
62
 
63
- response = conn.send(method) do |req|
63
+ conn.send(method) do |req|
64
64
  req.url url
65
65
  req.headers["Content-Type"] = "application/json"
66
66
  req.body = body
@@ -31,7 +31,7 @@ module Trailblazer
31
31
  end
32
32
 
33
33
  def call(hash)
34
- signal, (ctx, _) = Activity::TaskWrap.invoke(Pipeline, hash: hash)
34
+ _, (ctx, _) = Activity::TaskWrap.invoke(Pipeline, hash: hash)
35
35
  ctx[:intermediate]
36
36
  end
37
37
 
@@ -51,16 +51,16 @@ module Trailblazer
51
51
  wiring = elements.collect { |el|
52
52
  data = data_for(el)
53
53
 
54
- [inter.TaskRef(el.id, data), el.linksTo.collect { |arrow| inter.Out(semantic_for(arrow.to_h), arrow.target) } ] }
54
+ [inter.TaskRef(el.id, data), el.linksTo.collect { |arrow| inter.Out(semantic_for(**arrow.to_h), arrow.target) } ] }
55
55
  wiring = Hash[wiring]
56
56
 
57
57
  # end events need this stupid special handling
58
58
  # DISCUSS: currently, the END-SEMANTIC is read from the event's label.
59
59
  wiring = wiring.merge(Hash[
60
60
  end_events.collect do |_end|
61
- ref, outputs = wiring.find { |ref, _| ref.id == _end.id }
61
+ ref, = wiring.find { |ref, _| ref.id == _end.id }
62
62
 
63
- [ref, [inter.Out(semantic_for(_end.to_h)|| raise, nil)]] # TODO: test the raise, happens when the semantic of an End can't be distinguished. # TODO: don't extract semantic from :label but from :data.
63
+ [ref, [inter.Out(semantic_for(**_end.to_h)|| raise, nil)]] # TODO: test the raise, happens when the semantic of an End can't be distinguished. # TODO: don't extract semantic from :label but from :data.
64
64
  end
65
65
  ])
66
66
  # pp wiring
@@ -7,10 +7,10 @@ module Trailblazer::Developer
7
7
 
8
8
  class << self
9
9
  # Public entry point to activate tracing when running {activity}.
10
- def call(activity, (ctx, flow_options), circuit_options={})
11
- activity, (ctx, flow_options), circuit_options = Trace.arguments_for_call( activity, [ctx, flow_options], circuit_options ) # only run once for the entire circuit!
10
+ def call(activity, (ctx, flow_options), **circuit_options)
11
+ activity, (ctx, flow_options), circuit_options = Trace.arguments_for_call( activity, [ctx, flow_options], **circuit_options ) # only run once for the entire circuit!
12
12
 
13
- signal, (ctx, flow_options) = Activity::TaskWrap.invoke(activity, [ctx, flow_options], circuit_options)
13
+ signal, (ctx, flow_options) = Activity::TaskWrap.invoke(activity, [ctx, flow_options], **circuit_options)
14
14
 
15
15
  return flow_options[:stack], signal, [ctx, flow_options]
16
16
  end
@@ -14,7 +14,7 @@ module Trailblazer::Developer
14
14
  end
15
15
 
16
16
  def tree(stack, level, tree:, renderer:, **options)
17
- tree_for(stack, level, options.merge(tree: tree))
17
+ tree_for(stack, level, **options.merge(tree: tree))
18
18
 
19
19
  nodes = tree.each_with_index.map do |task_node, position|
20
20
  renderer.(task_node: task_node, position: position, tree: tree)
@@ -30,7 +30,7 @@ module Trailblazer::Developer
30
30
  tree.push(*TreeNodes.for(level, options.merge(input: input, output: output)))
31
31
 
32
32
  if nested.any? # nesting
33
- tree_for(nested, level + 1, options.merge(tree: tree))
33
+ tree_for(nested, level + 1, **options.merge(tree: tree))
34
34
  end
35
35
 
36
36
  tree
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  module Version
3
3
  module Developer
4
- VERSION = "0.0.14"
4
+ VERSION = "0.0.15"
5
5
  end
6
6
  end
7
7
  end
@@ -14,13 +14,13 @@ module Trailblazer::Developer
14
14
 
15
15
  # Run {activity} with tracing enabled and inject a mutable {Stack} instance.
16
16
  # This allows to display the trace even when an exception happened
17
- def invoke(activity, (ctx, flow_options), *circuit_options)
17
+ def invoke(activity, (ctx, flow_options), **circuit_options)
18
18
  activity, (ctx, flow_options), circuit_options = Wtf.arguments_for_trace(
19
- activity, [ctx, flow_options], *circuit_options
19
+ activity, [ctx, flow_options], circuit_options
20
20
  )
21
21
 
22
22
  _returned_stack, signal, (ctx, flow_options) = Trace.invoke(
23
- activity, [ctx, flow_options], *circuit_options
23
+ activity, [ctx, flow_options], circuit_options
24
24
  )
25
25
 
26
26
  return signal, [ctx, flow_options], circuit_options
@@ -22,9 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "minitest"
23
23
  spec.add_development_dependency "minitest-line"
24
24
  spec.add_development_dependency "rake"
25
- spec.add_development_dependency "rubocop"
26
25
 
27
- spec.add_dependency "trailblazer-activity", ">= 0.10.0", "< 1.0.0"
26
+ spec.add_dependency "trailblazer-activity", ">= 0.11.0", "< 1.0.0"
28
27
  spec.add_dependency "trailblazer-activity-dsl-linear"
29
28
  spec.add_dependency "representable"
30
29
  spec.add_dependency "hirb"
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.14
4
+ version: 0.0.15
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-07-04 00:00:00.000000000 Z
11
+ date: 2020-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,27 +66,13 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: trailblazer-activity
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - ">="
88
74
  - !ruby/object:Gem::Version
89
- version: 0.10.0
75
+ version: 0.11.0
90
76
  - - "<"
91
77
  - !ruby/object:Gem::Version
92
78
  version: 1.0.0
@@ -96,7 +82,7 @@ dependencies:
96
82
  requirements:
97
83
  - - ">="
98
84
  - !ruby/object:Gem::Version
99
- version: 0.10.0
85
+ version: 0.11.0
100
86
  - - "<"
101
87
  - !ruby/object:Gem::Version
102
88
  version: 1.0.0
@@ -150,7 +136,6 @@ extensions: []
150
136
  extra_rdoc_files: []
151
137
  files:
152
138
  - ".gitignore"
153
- - ".rubocop.yml"
154
139
  - ".travis.yml"
155
140
  - Gemfile
156
141
  - LICENSE
@@ -1,36 +0,0 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/trailblazer/meta/master/rubocop.yml
3
-
4
- AllCops:
5
- TargetRubyVersion: 2.5
6
- Exclude:
7
- - 'test/hash/bla.rb'
8
-
9
- Metrics/LineLength:
10
- Exclude:
11
- - test/diagram_test.rb
12
-
13
- Naming/MethodName:
14
- Enabled: false
15
-
16
- Style/ClassAndModuleChildren:
17
- Enabled: false
18
-
19
- # DISCUSS: user map instead of collect
20
- Style/CollectionMethods:
21
- Enabled: false
22
-
23
- # DISCUSS: Use raise with an explicit exception class and message, rather than just a message
24
- Style/ImplicitRuntimeError:
25
- Enabled: false
26
-
27
- Style/Lambda:
28
- EnforcedStyle: literal
29
-
30
- # DISCUSS: Use fail instead of raise to signal exceptions
31
- Style/SignalException:
32
- Enabled: false
33
-
34
- # DISUSS: this could be false because we have if locals blabla
35
- Bundler/DuplicatedGem:
36
- Enabled: false