spline 0.0.16 → 0.0.17

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
  SHA1:
3
- metadata.gz: 6fdd767330e1379cc1d866c7b6606309c6834ba2
4
- data.tar.gz: b512126c0afbdd21d01be8e0fbd75d364d029f16
3
+ metadata.gz: 7d46591f492eee2cbe0ba968af74c3148398a843
4
+ data.tar.gz: 7e7e524525e37ed761009bcca4c7d73dc12034e7
5
5
  SHA512:
6
- metadata.gz: 727fbaa532bc8bc2a3c7e211a9f4ee7277606f4880802f3e83cf522f6018b3456bffc781cc7462719f95cb7e7a43a03574c5bc59ed6dc43d26ba86078e17e5d6
7
- data.tar.gz: e128d9802e5448506177d8008070c545702cc23716dae3aa2101b175fb384c8dd8a65856ac4712ca6f4e993e358442569a3eab92cd2d07b6f59737559a608b9c
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
- actions_dir_exists = File.directory?("#{Dir.pwd}/process_definition/actions")
9
+ steps_dir_exists = File.directory?("#{Dir.pwd}/process_definition/steps")
9
10
 
10
- if processes_dir_exists && actions_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/my_first_action.tt', "process_definition/actions/example/my_first_action.rb")
16
- template('templates/my_second_action.tt', "process_definition/actions/example/my_second_action.rb")
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 ActionCommand < Command
5
+ class StepCommand < Command
6
6
 
7
- argument :namespace, :desc => "Namespace of the action"
8
- argument :name, :desc => "Name of the action"
7
+ argument :namespace, :desc => "Namespace of the step"
8
+ argument :name, :desc => "Name of the step"
9
9
 
10
- def generate_action
11
- template('templates/action.tt', "process_definition/actions/#{namespace}/#{name}.rb")
10
+ def generate_step
11
+ template('templates/definitions/step.tt', "process_definition/steps/#{namespace}/#{name}.rb")
12
12
  end
13
13
 
14
14
  end
@@ -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)
@@ -0,0 +1,7 @@
1
+ step "<%= name %> description" { |s|
2
+
3
+ s.name "<%= name %>"
4
+ s.namespace "<%= namespace %>"
5
+ s.attributes []
6
+
7
+ }
@@ -0,0 +1,11 @@
1
+
2
+ #step method with description as first argument, block as second arg
3
+
4
+ step "this is an example step" { |s|
5
+
6
+ s.name "my first step"
7
+ s.namespace "example"
8
+ s.attributes ["repo", "example_attribute"]
9
+ s.finishes ["success", "failure"]
10
+
11
+ }
@@ -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.start_action "example:my_first_action"
9
+ p.start_step "example:my_first_step"
10
10
 
11
- p.action_transition "example:my_first_action" { |a|
12
- a.success "example:my_second_action"
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.action_transition "example:my_second_action" { |a|
16
+ p.step_transition "example:my_second_step" { |a|
17
17
  a.success process_success
18
18
  a.failure process_failure
19
19
  }
@@ -0,0 +1,11 @@
1
+
2
+ #step method with description as first argument, block as second arg
3
+
4
+ step "this is an example step" { |s|
5
+
6
+ s.name "my second step"
7
+ s.namespace "example"
8
+ s.attributes ["repo", "example_attribute"]
9
+ s.finishes ["success", "failure"]
10
+
11
+ }
@@ -1,3 +1,3 @@
1
1
  module Spline
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
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.16
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/action.tt
76
- - lib/spline/templates/my_first_action.tt
77
- - lib/spline/templates/my_process.tt
78
- - lib/spline/templates/my_second_action.tt
79
- - lib/spline/templates/process.tt
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,7 +0,0 @@
1
- action "<%= name %> description" { |a|
2
-
3
- a.name "<%= name %>"
4
- a.namespace "<%= namespace %>"
5
- a.attributes []
6
-
7
- }
@@ -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
- }