spline 0.0.16 → 0.0.17
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 +4 -4
- data/lib/spline/commands/concrete_commands/install_command.rb +7 -6
- data/lib/spline/commands/concrete_commands/process_command.rb +1 -1
- data/lib/spline/commands/concrete_commands/step_command.rb +5 -5
- data/lib/spline/spline_cli.rb +2 -1
- data/lib/spline/templates/{process.tt → definitions/process.tt} +0 -0
- data/lib/spline/templates/definitions/step.tt +7 -0
- data/lib/spline/templates/samples/my_first_step.tt +11 -0
- data/lib/spline/templates/{my_process.tt → samples/my_process.tt} +4 -4
- data/lib/spline/templates/samples/my_second_step.tt +11 -0
- data/lib/spline/version.rb +1 -1
- metadata +6 -6
- data/lib/spline/templates/action.tt +0 -7
- data/lib/spline/templates/my_first_action.tt +0 -11
- data/lib/spline/templates/my_second_action.tt +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d46591f492eee2cbe0ba968af74c3148398a843
|
4
|
+
data.tar.gz: 7e7e524525e37ed761009bcca4c7d73dc12034e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f501fffa3b4a63cd6ae32bdc2be62cd99fdd06edb9be9936b922e33b39158060093b121ea4a8a82ce143f92f6a9226a1814085ce12f4834bbe52f34c3179af63
|
7
|
+
data.tar.gz: deed0f6d1f33db4b46eed8e5b787ddee5f3014eedfdbc00b151dbde53ad32093e489e8341ac7ecf44c2e6dd525d6d466643766d4ab9670766033d30e26dc8be6
|
@@ -1,20 +1,21 @@
|
|
1
1
|
require_relative "../command"
|
2
2
|
|
3
|
-
module Spline
|
3
|
+
module Spline
|
4
|
+
|
4
5
|
class InstallCommand < Command
|
5
6
|
|
6
7
|
def install
|
7
8
|
processes_dir_exists = File.directory?("#{Dir.pwd}/process_definition/processes")
|
8
|
-
|
9
|
+
steps_dir_exists = File.directory?("#{Dir.pwd}/process_definition/steps")
|
9
10
|
|
10
|
-
if processes_dir_exists &&
|
11
|
+
if processes_dir_exists && steps_dir_exists
|
11
12
|
say("spline is already setup")
|
12
13
|
return
|
13
14
|
end
|
14
15
|
|
15
|
-
template('templates/
|
16
|
-
template('templates/
|
17
|
-
template('templates/my_process.tt', "process_definition/processes/my_process.rb")
|
16
|
+
template('templates/samples/my_first_step.tt', "process_definition/steps/example/my_first_step.rb")
|
17
|
+
template('templates/samples/my_second_step.tt', "process_definition/steps/example/my_second_step.rb")
|
18
|
+
template('templates/samples/my_process.tt', "process_definition/processes/my_process.rb")
|
18
19
|
end
|
19
20
|
end
|
20
21
|
end
|
@@ -7,7 +7,7 @@ module Spline
|
|
7
7
|
argument :name, :desc => "The name of the process"
|
8
8
|
|
9
9
|
def generate_process
|
10
|
-
template('templates/process.tt', "process_definition/processes/#{name}.rb")
|
10
|
+
template('templates/definitions/process.tt', "process_definition/processes/#{name}.rb")
|
11
11
|
end
|
12
12
|
|
13
13
|
end
|
@@ -2,13 +2,13 @@ require_relative "../command"
|
|
2
2
|
|
3
3
|
module Spline
|
4
4
|
|
5
|
-
class
|
5
|
+
class StepCommand < Command
|
6
6
|
|
7
|
-
argument :namespace, :desc => "Namespace of the
|
8
|
-
argument :name, :desc => "Name of the
|
7
|
+
argument :namespace, :desc => "Namespace of the step"
|
8
|
+
argument :name, :desc => "Name of the step"
|
9
9
|
|
10
|
-
def
|
11
|
-
template('templates/
|
10
|
+
def generate_step
|
11
|
+
template('templates/definitions/step.tt', "process_definition/steps/#{namespace}/#{name}.rb")
|
12
12
|
end
|
13
13
|
|
14
14
|
end
|
data/lib/spline/spline_cli.rb
CHANGED
@@ -5,8 +5,9 @@ module Spline
|
|
5
5
|
|
6
6
|
class SplineCli < Thor
|
7
7
|
|
8
|
+
# Retrieve all classes from the Spline module that end with Command except Spline::Command abstract class
|
9
|
+
# Register all those classes so they are available in the terminal as commands.
|
8
10
|
# register(class_name, subcommand_alias, usage_list_string, description_string)
|
9
|
-
|
10
11
|
commands = Spline.constants.select { |c| c.match(/\w+Command/) && Spline.const_get(c).is_a?(Class) }
|
11
12
|
commands.each do |command|
|
12
13
|
commandClass = Spline.const_get(command)
|
File without changes
|
@@ -6,14 +6,14 @@ process "this is an example process" { |p|
|
|
6
6
|
p.name "my process"
|
7
7
|
p.attributes ["repo", "example_attribute"]
|
8
8
|
|
9
|
-
p.
|
9
|
+
p.start_step "example:my_first_step"
|
10
10
|
|
11
|
-
p.
|
12
|
-
a.success "example:
|
11
|
+
p.step_transition "example:my_first_step" { |a|
|
12
|
+
a.success "example:my_second_step"
|
13
13
|
a.failure process_failure
|
14
14
|
}
|
15
15
|
|
16
|
-
p.
|
16
|
+
p.step_transition "example:my_second_step" { |a|
|
17
17
|
a.success process_success
|
18
18
|
a.failure process_failure
|
19
19
|
}
|
data/lib/spline/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mrav Atomski
|
@@ -72,11 +72,11 @@ files:
|
|
72
72
|
- lib/spline/commands/concrete_commands/process_command.rb
|
73
73
|
- lib/spline/commands/concrete_commands/step_command.rb
|
74
74
|
- lib/spline/spline_cli.rb
|
75
|
-
- lib/spline/templates/
|
76
|
-
- lib/spline/templates/
|
77
|
-
- lib/spline/templates/
|
78
|
-
- lib/spline/templates/
|
79
|
-
- lib/spline/templates/
|
75
|
+
- lib/spline/templates/definitions/process.tt
|
76
|
+
- lib/spline/templates/definitions/step.tt
|
77
|
+
- lib/spline/templates/samples/my_first_step.tt
|
78
|
+
- lib/spline/templates/samples/my_process.tt
|
79
|
+
- lib/spline/templates/samples/my_second_step.tt
|
80
80
|
- lib/spline/version.rb
|
81
81
|
- spline.gemspec
|
82
82
|
homepage: ''
|
@@ -1,11 +0,0 @@
|
|
1
|
-
|
2
|
-
#action method with description as first argument, block as second arg
|
3
|
-
|
4
|
-
action "this is an example action" { |a|
|
5
|
-
|
6
|
-
a.name "my first action"
|
7
|
-
a.namespace "example"
|
8
|
-
a.attributes ["repo", "example_attribute"]
|
9
|
-
a.finishes ["success", "failure"]
|
10
|
-
|
11
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
|
2
|
-
#action method with description as first argument, block as second arg
|
3
|
-
|
4
|
-
action "this is an example action" { |a|
|
5
|
-
|
6
|
-
a.name "my second action"
|
7
|
-
a.namespace "example"
|
8
|
-
a.attributes ["repo", "example_attribute"]
|
9
|
-
a.finishes ["success", "failure"]
|
10
|
-
|
11
|
-
}
|