spline 0.0.15 → 0.0.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c235bb708fffd5ae04e0981b9613da998d8db07f
4
- data.tar.gz: f61b6e0970c559c1502db31f6564624d0f54d30e
3
+ metadata.gz: 6fdd767330e1379cc1d866c7b6606309c6834ba2
4
+ data.tar.gz: b512126c0afbdd21d01be8e0fbd75d364d029f16
5
5
  SHA512:
6
- metadata.gz: 8e6b88e262dc831deac44897ea4a92a3ec51188acb9db96d3d782f8237d40032a612c8e40d0e56c3c1933652691d28709b64991759da365dbe4126f1c79e21f2
7
- data.tar.gz: 5207f47e1bdbc3a50f5c05dc5f36d7b749c18c09ac1a0f18d852968c52e0c5dfed89968680ccd6c20dd04c7460775f75af1942559bd628135b0125544b71ad2c
6
+ metadata.gz: 727fbaa532bc8bc2a3c7e211a9f4ee7277606f4880802f3e83cf522f6018b3456bffc781cc7462719f95cb7e7a43a03574c5bc59ed6dc43d26ba86078e17e5d6
7
+ data.tar.gz: e128d9802e5448506177d8008070c545702cc23716dae3aa2101b175fb384c8dd8a65856ac4712ca6f4e993e358442569a3eab92cd2d07b6f59737559a608b9c
@@ -5,20 +5,26 @@ module Spline
5
5
  class Command < Thor::Group
6
6
  include Thor::Actions
7
7
 
8
+ # root of project, from where we reference the templates
8
9
  def self.source_root
9
10
  File.dirname(__FILE__) + "/.."
10
11
  end
11
12
 
13
+ # name refers to the class name with module. Spline::Command in this case
14
+ def self.command_name
15
+ name.downcase[/\w+::(\w+)command/, 1]
16
+ end
17
+
12
18
  def self.alias
13
- name.downcase
19
+ command_name
14
20
  end
15
21
 
16
22
  def self.usage_tip
17
- name.downcase
23
+ command_name
18
24
  end
19
25
 
20
26
  def self.description
21
- "#{name.downcase} description"
27
+ "#{command_name} description"
22
28
  end
23
29
 
24
30
  end
@@ -7,13 +7,10 @@ module Spline
7
7
 
8
8
  # register(class_name, subcommand_alias, usage_list_string, description_string)
9
9
 
10
- commands = Spline.constants.select { |c| c.match(/\w+Command/) && Spline.const_get(c).is_a? Class }
10
+ commands = Spline.constants.select { |c| c.match(/\w+Command/) && Spline.const_get(c).is_a?(Class) }
11
11
  commands.each do |command|
12
12
  commandClass = Spline.const_get(command)
13
13
  register(commandClass, commandClass.alias, commandClass.usage_tip, commandClass.description)
14
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")
18
15
  end
19
16
  end
@@ -1,3 +1,3 @@
1
1
  module Spline
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
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.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mrav Atomski
@@ -68,9 +68,9 @@ files:
68
68
  - bin/spline
69
69
  - lib/spline.rb
70
70
  - lib/spline/commands/command.rb
71
- - lib/spline/commands/concrete_commands/action_command.rb
72
71
  - lib/spline/commands/concrete_commands/install_command.rb
73
72
  - lib/spline/commands/concrete_commands/process_command.rb
73
+ - lib/spline/commands/concrete_commands/step_command.rb
74
74
  - lib/spline/spline_cli.rb
75
75
  - lib/spline/templates/action.tt
76
76
  - lib/spline/templates/my_first_action.tt