spline 0.0.14 → 0.0.15
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/command.rb +26 -0
- data/lib/spline/commands/concrete_commands/action_command.rb +3 -3
- data/lib/spline/commands/concrete_commands/install_command.rb +3 -6
- data/lib/spline/commands/concrete_commands/process_command.rb +2 -2
- data/lib/spline/spline_cli.rb +8 -5
- data/lib/spline/version.rb +1 -1
- metadata +2 -2
- data/lib/spline/commands/cli_command.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c235bb708fffd5ae04e0981b9613da998d8db07f
|
4
|
+
data.tar.gz: f61b6e0970c559c1502db31f6564624d0f54d30e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e6b88e262dc831deac44897ea4a92a3ec51188acb9db96d3d782f8237d40032a612c8e40d0e56c3c1933652691d28709b64991759da365dbe4126f1c79e21f2
|
7
|
+
data.tar.gz: 5207f47e1bdbc3a50f5c05dc5f36d7b749c18c09ac1a0f18d852968c52e0c5dfed89968680ccd6c20dd04c7460775f75af1942559bd628135b0125544b71ad2c
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
|
3
|
+
module Spline
|
4
|
+
|
5
|
+
class Command < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
def self.source_root
|
9
|
+
File.dirname(__FILE__) + "/.."
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.alias
|
13
|
+
name.downcase
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.usage_tip
|
17
|
+
name.downcase
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.description
|
21
|
+
"#{name.downcase} description"
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
|
-
require_relative "../
|
1
|
+
require_relative "../command"
|
2
2
|
|
3
3
|
module Spline
|
4
4
|
|
5
|
-
class ActionCommand <
|
5
|
+
class ActionCommand < Command
|
6
6
|
|
7
7
|
argument :namespace, :desc => "Namespace of the action"
|
8
8
|
argument :name, :desc => "Name of the action"
|
9
9
|
|
10
|
-
def
|
10
|
+
def generate_action
|
11
11
|
template('templates/action.tt', "process_definition/actions/#{namespace}/#{name}.rb")
|
12
12
|
end
|
13
13
|
|
@@ -1,8 +1,7 @@
|
|
1
|
-
require_relative "../
|
1
|
+
require_relative "../command"
|
2
2
|
|
3
|
-
module Spline
|
4
|
-
|
5
|
-
class InstallCommand < CliCommand
|
3
|
+
module Spline
|
4
|
+
class InstallCommand < Command
|
6
5
|
|
7
6
|
def install
|
8
7
|
processes_dir_exists = File.directory?("#{Dir.pwd}/process_definition/processes")
|
@@ -17,7 +16,5 @@ module Spline
|
|
17
16
|
template('templates/my_second_action.tt', "process_definition/actions/example/my_second_action.rb")
|
18
17
|
template('templates/my_process.tt', "process_definition/processes/my_process.rb")
|
19
18
|
end
|
20
|
-
|
21
19
|
end
|
22
|
-
|
23
20
|
end
|
data/lib/spline/spline_cli.rb
CHANGED
@@ -6,11 +6,14 @@ module Spline
|
|
6
6
|
class SplineCli < Thor
|
7
7
|
|
8
8
|
# register(class_name, subcommand_alias, usage_list_string, description_string)
|
9
|
-
register(InstallCommand, "install", "install", "setup spline")
|
10
|
-
register(ActionCommand, "paction", "paction", "Generate action stub")
|
11
|
-
register(ProcessCommand, "process", "process", "Generate process stub")
|
12
9
|
|
10
|
+
commands = Spline.constants.select { |c| c.match(/\w+Command/) && Spline.const_get(c).is_a? Class }
|
11
|
+
commands.each do |command|
|
12
|
+
commandClass = Spline.const_get(command)
|
13
|
+
register(commandClass, commandClass.alias, commandClass.usage_tip, commandClass.description)
|
14
|
+
end
|
15
|
+
#register(InstallCommand, "install", "install", "setup spline")
|
16
|
+
#register(ActionCommand, "paction", "paction", "Generate action stub")
|
17
|
+
#register(ProcessCommand, "process", "process", "Generate process stub")
|
13
18
|
end
|
14
|
-
|
15
|
-
|
16
19
|
end
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mrav Atomski
|
@@ -67,7 +67,7 @@ files:
|
|
67
67
|
- Rakefile
|
68
68
|
- bin/spline
|
69
69
|
- lib/spline.rb
|
70
|
-
- lib/spline/commands/
|
70
|
+
- lib/spline/commands/command.rb
|
71
71
|
- lib/spline/commands/concrete_commands/action_command.rb
|
72
72
|
- lib/spline/commands/concrete_commands/install_command.rb
|
73
73
|
- lib/spline/commands/concrete_commands/process_command.rb
|