spline 0.0.13 → 0.0.14

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: b328e5e88edac3fe0c98563d27d73a0a8206970a
4
- data.tar.gz: 42e8e639795cb3385692039e5c528d012ea0adec
3
+ metadata.gz: 209139512c300777b5a3df975664b217b832636d
4
+ data.tar.gz: 43c5ba18a6bb7a814865009a0a22d3c00647ee11
5
5
  SHA512:
6
- metadata.gz: 8bfafa472add4a8b27cbe28a830fbba221e6fc81c1d460a5d597a9159cbdc9112f34c3f4d005a37cbb20a2f7f6ace40d832ad0eb87fa81028158de27d1e8b4bf
7
- data.tar.gz: ce1d384b9fc4ee3c1bad267aea04c10b7ed3b9cc00dc646f5e2a3d81d10aa1186c59f4ad712a615f041f8a928bf53cfaac2bc456c0f3d1c68bef75585d4a63bd
6
+ metadata.gz: 6725201a9556a9ad394ee13692a74879d8369fcc9bb604b4ff5cfc93af288cebf0f13ac3f07dce9981ab76a045b8b7ff24324d2a6f900228055472fadbb2a874
7
+ data.tar.gz: 03531c9d687d7dcdf5c4e76ab98ec7a356c62830f631dba30545f2f521e3ffa3838284aa8d77c72eb0f5a735722c46370900c16c8801294fc6e5beaa7c0596b6
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Spline
2
2
 
3
- TODO: Write a gem description
3
+ Sample gem project using thor!
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,13 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ Spline is a CLI. When installed there are some commands
22
+
23
+ spline install (generates the necessary folders and sample files)
24
+
25
+ spline process NAME (generates a process stub)
26
+
27
+ spline paction NAMESPACE NAME (generates an action stub)
22
28
 
23
29
  ## Contributing
24
30
 
data/bin/spline CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'rubygems'
4
-
5
4
  require 'spline'
6
5
 
7
6
  Spline::SplineCli.start
@@ -0,0 +1,14 @@
1
+ require 'thor/group'
2
+
3
+ module Spline
4
+
5
+ class CliCommand < Thor::Group
6
+ include Thor::Actions
7
+
8
+ def self.source_root
9
+ File.dirname(__FILE__) + "/.."
10
+ end
11
+
12
+ end
13
+
14
+ end
@@ -1,17 +1,12 @@
1
- require 'thor/group'
1
+ require_relative "../cli_command"
2
2
 
3
3
  module Spline
4
4
 
5
- class ActionCommand < Thor::Group
6
- include Thor::Actions
5
+ class ActionCommand < CliCommand
7
6
 
8
7
  argument :namespace, :desc => "Namespace of the action"
9
8
  argument :name, :desc => "Name of the action"
10
9
 
11
- def self.source_root
12
- File.dirname(__FILE__)
13
- end
14
-
15
10
  def generate_process
16
11
  template('templates/action.tt', "process_definition/actions/#{namespace}/#{name}.rb")
17
12
  end
@@ -1,15 +1,10 @@
1
- require 'thor/group'
1
+ require_relative "../cli_command"
2
2
 
3
3
  module Spline
4
4
 
5
- class InstallCommand < Thor::Group
6
- include Thor::Actions
5
+ class InstallCommand < CliCommand
7
6
 
8
- def self.source_root
9
- File.dirname(__FILE__)
10
- end
11
-
12
- def install_process
7
+ def install
13
8
  processes_dir_exists = File.directory?("#{Dir.pwd}/process_definition/processes")
14
9
  actions_dir_exists = File.directory?("#{Dir.pwd}/process_definition/actions")
15
10
 
@@ -1,16 +1,11 @@
1
- require 'thor/group'
1
+ require_relative "../cli_command"
2
2
 
3
3
  module Spline
4
4
 
5
- class ProcessCommand < Thor::Group
6
- include Thor::Actions
7
-
5
+ class ProcessCommand < CliCommand
6
+
8
7
  argument :name, :desc => "The name of the process"
9
8
 
10
- def self.source_root
11
- File.dirname(__FILE__)
12
- end
13
-
14
9
  def generate_process
15
10
  template('templates/process.tt', "process_definition/processes/#{name}.rb")
16
11
  end
@@ -1,9 +1,7 @@
1
1
  module Spline
2
2
 
3
3
  require 'thor'
4
- require_relative 'process_command'
5
- require_relative 'install_command'
6
- require_relative 'action_command'
4
+ Dir["#{File.dirname(__FILE__)}/commands/concrete_commands/*.rb"].each { |file| require_relative file }
7
5
 
8
6
  class SplineCli < Thor
9
7
 
@@ -1,3 +1,3 @@
1
1
  module Spline
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mrav Atomski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-02 00:00:00.000000000 Z
11
+ date: 2014-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -67,9 +67,10 @@ files:
67
67
  - Rakefile
68
68
  - bin/spline
69
69
  - lib/spline.rb
70
- - lib/spline/action_command.rb
71
- - lib/spline/install_command.rb
72
- - lib/spline/process_command.rb
70
+ - lib/spline/commands/cli_command.rb
71
+ - lib/spline/commands/concrete_commands/action_command.rb
72
+ - lib/spline/commands/concrete_commands/install_command.rb
73
+ - lib/spline/commands/concrete_commands/process_command.rb
73
74
  - lib/spline/spline_cli.rb
74
75
  - lib/spline/templates/action.tt
75
76
  - lib/spline/templates/my_first_action.tt