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.
- data/VERSION +1 -1
- data/bin/simon +9 -5
- data/lib/simon.rb +3 -49
- data/my-simon.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
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
|
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
|
-
|
23
|
-
|
25
|
+
puts "\n Create called"
|
26
|
+
simon_controller.rename
|
27
|
+
|
24
28
|
end
|
25
29
|
end
|
26
30
|
|
27
|
-
command :add
|
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
|
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
|
-
|
1
|
+
class Simon
|
2
2
|
|
3
|
-
|
4
|
-
|
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