my-simon 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/simon +9 -5
  3. data/lib/simon.rb +3 -49
  4. data/my-simon.gemspec +1 -1
  5. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
data/bin/simon CHANGED
@@ -5,13 +5,16 @@ require "pathname"
5
5
  bin_file = Pathname.new(__FILE__).realpath
6
6
  $:.unshift File.expand_path("../../lib", bin_file)
7
7
 
8
+ require 'simon'
8
9
  require 'rubygems'
9
10
  require 'commander/import'
10
11
 
12
+ simon_controller = Simon.new
13
+
11
14
  program :version, '0.0.1'
12
15
  program :description, 'CLI tool for Simon, a simple MVC boilerplate'
13
16
 
14
- command :create, do |c|
17
+ command :create do |c|
15
18
  c.syntax = 'my-simon create, [options]'
16
19
  c.summary = ''
17
20
  c.description = ''
@@ -19,12 +22,13 @@ command :create, do |c|
19
22
  c.option '--some-switch', 'Some switch that does something'
20
23
  c.action do |args, options|
21
24
  # Do something or c.when_called My-simon::Commands::Create,
22
- notify 'Create was called'
23
- puts 'Create was called'
25
+ puts "\n Create called"
26
+ simon_controller.rename
27
+
24
28
  end
25
29
  end
26
30
 
27
- command :add, do |c|
31
+ command :add do |c|
28
32
  c.syntax = 'my-simon add, [options]'
29
33
  c.summary = ''
30
34
  c.description = ''
@@ -35,7 +39,7 @@ command :add, do |c|
35
39
  end
36
40
  end
37
41
 
38
- command :setup, do |c|
42
+ command :setup do |c|
39
43
  c.syntax = 'my-simon setup, [options]'
40
44
  c.summary = ''
41
45
  c.description = ''
data/lib/simon.rb CHANGED
@@ -1,53 +1,7 @@
1
- #!/usr/bin/env ruby
1
+ class Simon
2
2
 
3
- require 'rubygems'
4
- require 'commander/import'
5
-
6
- program :version, '0.0.1'
7
- program :description, 'CLI tool for Simon, a simple MVC boilerplate'
8
-
9
- command :create, do |c|
10
- c.syntax = 'my-simon create, [options]'
11
- c.summary = ''
12
- c.description = ''
13
- c.example 'description', 'command example'
14
- c.option '--some-switch', 'Some switch that does something'
15
- c.action do |args, options|
16
- # Do something or c.when_called My-simon::Commands::Create,
17
- notify 'Create was called'
18
- puts 'Create was called'
19
- end
20
- end
21
-
22
- command :add, do |c|
23
- c.syntax = 'my-simon add, [options]'
24
- c.summary = ''
25
- c.description = ''
26
- c.example 'description', 'command example'
27
- c.option '--some-switch', 'Some switch that does something'
28
- c.action do |args, options|
29
- # Do something or c.when_called My-simon::Commands::Add,
3
+ def rename
4
+ puts "rename called"
30
5
  end
31
- end
32
6
 
33
- command :setup, do |c|
34
- c.syntax = 'my-simon setup, [options]'
35
- c.summary = ''
36
- c.description = ''
37
- c.example 'description', 'command example'
38
- c.option '--some-switch', 'Some switch that does something'
39
- c.action do |args, options|
40
- # Do something or c.when_called My-simon::Commands::Setup,
41
- end
42
- end
43
-
44
- command :help do |c|
45
- c.syntax = 'my-simon help [options]'
46
- c.summary = ''
47
- c.description = ''
48
- c.example 'description', 'command example'
49
- c.option '--some-switch', 'Some switch that does something'
50
- c.action do |args, options|
51
- # Do something or c.when_called My-simon::Commands::Help
52
- end
53
7
  end
data/my-simon.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "my-simon"
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aaron McGuire"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my-simon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: