trailblazer-activity-dsl-linear 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +17 -0
- data/CHANGES.md +4 -0
- data/lib/trailblazer/activity/dsl/linear.rb +3 -3
- data/lib/trailblazer/activity/dsl/linear/compiler.rb +1 -1
- data/lib/trailblazer/activity/dsl/linear/state.rb +1 -1
- data/lib/trailblazer/activity/dsl/linear/variable_mapping.rb +0 -1
- data/lib/trailblazer/activity/dsl/linear/version.rb +1 -1
- data/lib/trailblazer/activity/fast_track.rb +0 -2
- data/lib/trailblazer/activity/path.rb +2 -2
- data/trailblazer-activity-dsl-linear.gemspec +1 -1
- metadata +8 -8
- data/.travis.yml +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36d9e093365ba01dad631acf3435eaab26230d348edc12ac2691d984ec5fe1f3
|
4
|
+
data.tar.gz: 50aa04fe0e5214fc8021ea8436a4153df8dd69361bd9f9468a18b38e7309f85f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45f9ec2af2d4af584608d22f3a613495c199d6f665a1e312302f4e0c615871a96b67b8f80b92df597615dd1d7bb0faf142d43084d83e278e8ce1b85a184b0472
|
7
|
+
data.tar.gz: 55f68875e60eb8669a711e0d175e4a690ebe6b8e9be13df8c34426788652ebf34e8f48b84aa9f6b0161d4aca25eefb4272179233e7c5dcb80807befd34ecc106
|
@@ -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
@@ -99,7 +99,7 @@ class Trailblazer::Activity
|
|
99
99
|
|
100
100
|
# @private
|
101
101
|
def find_in_range(range, target_color)
|
102
|
-
|
102
|
+
_target_seq_row = range.find { |seq_row| seq_row[0] == target_color }
|
103
103
|
end
|
104
104
|
end # Search
|
105
105
|
|
@@ -152,7 +152,7 @@ class Trailblazer::Activity
|
|
152
152
|
def Merge(old_seq, new_seq, end_id: "End.success") # DISCUSS: also Insert
|
153
153
|
new_seq = strip_start_and_ends(new_seq, end_id: end_id)
|
154
154
|
|
155
|
-
|
155
|
+
_seq = Insert.Prepend(old_seq, new_seq, end_id)
|
156
156
|
end
|
157
157
|
def strip_start_and_ends(seq, end_id:) # TODO: introduce Merge namespace?
|
158
158
|
cut_off_index = end_id.nil? ? seq.size : Insert.find_index(seq, end_id) # find the "first" end.
|
@@ -170,7 +170,7 @@ class Trailblazer::Activity
|
|
170
170
|
new_row = Sequence.create_row(**options)
|
171
171
|
|
172
172
|
# {sequence_insert} is usually a function such as {Linear::Insert::Append} and its arguments.
|
173
|
-
|
173
|
+
_seq = Sequence.insert_row(sequence, row: new_row, insert: sequence_insert)
|
174
174
|
end
|
175
175
|
|
176
176
|
# Add one or several rows to the {sequence}.
|
@@ -19,7 +19,7 @@ module Trailblazer
|
|
19
19
|
def call(sequence, find_stops: method(:find_stop_task_ids), find_start: method(:find_start_task_ids))
|
20
20
|
_implementations, intermediate_wiring =
|
21
21
|
sequence.inject([[], []]) do |(implementations, intermediates), seq_row|
|
22
|
-
|
22
|
+
_magnetic_to, task, connections, data = seq_row
|
23
23
|
id = data[:id]
|
24
24
|
|
25
25
|
# execute all {Search}s for one sequence row.
|
@@ -58,7 +58,7 @@ module Trailblazer
|
|
58
58
|
# by the DSL user. This is usually when you call Operation::step.
|
59
59
|
def call(name, *args)
|
60
60
|
normalizer = @normalizers.fetch(name)
|
61
|
-
|
61
|
+
_signal, (options, _) = normalizer.(*args)
|
62
62
|
options
|
63
63
|
end
|
64
64
|
end
|
@@ -130,8 +130,6 @@ module Trailblazer
|
|
130
130
|
sequence = Path::DSL.append_end(sequence, task: pass_fast_end, magnetic_to: :pass_fast, id: "End.pass_fast")
|
131
131
|
end
|
132
132
|
|
133
|
-
|
134
|
-
|
135
133
|
# This is slow and should be done only once at compile-time,
|
136
134
|
# DISCUSS: maybe make this a function?
|
137
135
|
# These are the normalizers for an {Activity}, to be injected into a State.
|
@@ -17,7 +17,7 @@ module Trailblazer
|
|
17
17
|
def start_sequence(track_name:)
|
18
18
|
start_default = Activity::Start.new(semantic: :default)
|
19
19
|
start_event = Linear::Sequence.create_row(task: start_default, id: "Start.default", magnetic_to: nil, wirings: [Linear::Search::Forward(unary_outputs[:success], track_name)])
|
20
|
-
|
20
|
+
_sequence = Linear::Sequence[start_event]
|
21
21
|
end
|
22
22
|
|
23
23
|
# DISCUSS: still not sure this should sit here.
|
@@ -171,7 +171,7 @@ module Trailblazer
|
|
171
171
|
# Path() do ... end
|
172
172
|
class State < Linear::State
|
173
173
|
def step(*args)
|
174
|
-
|
174
|
+
_seq = Linear::Strategy.task_for!(self, :step, *args) # mutate @state
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
end
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_dependency "trailblazer-activity", ">= 0.12.
|
22
|
+
spec.add_dependency "trailblazer-activity", ">= 0.12.2", "< 1.0.0"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "minitest", "~> 5.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-activity-dsl-linear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trailblazer-activity
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.12.
|
19
|
+
version: 0.12.2
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.12.
|
29
|
+
version: 0.12.2
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
@@ -93,8 +93,8 @@ executables: []
|
|
93
93
|
extensions: []
|
94
94
|
extra_rdoc_files: []
|
95
95
|
files:
|
96
|
+
- ".github/workflows/ci.yml"
|
96
97
|
- ".gitignore"
|
97
|
-
- ".travis.yml"
|
98
98
|
- CHANGES.md
|
99
99
|
- DSL_IDEAS
|
100
100
|
- Gemfile
|
@@ -118,7 +118,7 @@ homepage: http://trailblazer.to
|
|
118
118
|
licenses:
|
119
119
|
- LGPL-3.0
|
120
120
|
metadata: {}
|
121
|
-
post_install_message:
|
121
|
+
post_install_message:
|
122
122
|
rdoc_options: []
|
123
123
|
require_paths:
|
124
124
|
- lib
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
136
|
rubygems_version: 3.0.8
|
137
|
-
signing_key:
|
137
|
+
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: Simple DSL to define Trailblazer activities.
|
140
140
|
test_files: []
|