codegears 0.0.10.pre → 0.0.11.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cg/command/version.rb +9 -0
- data/lib/cg/command.rb +11 -1
- data/lib/cg/version.rb +1 -1
- metadata +2 -1
data/lib/cg/command.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "cg/command/version"
|
2
|
+
|
1
3
|
module CG
|
2
4
|
class Command
|
3
5
|
def initialize(*args)
|
@@ -9,7 +11,15 @@ module CG
|
|
9
11
|
namespace = Kernel.const_get("Command").const_get(namespace) rescue nil
|
10
12
|
task = args.shift.downcase rescue nil
|
11
13
|
|
12
|
-
namespace
|
14
|
+
if namespace
|
15
|
+
if task
|
16
|
+
namespace.send(task, *args)
|
17
|
+
else
|
18
|
+
namespace.send("main", *args)
|
19
|
+
end
|
20
|
+
else
|
21
|
+
Command::Version.main
|
22
|
+
end
|
13
23
|
end
|
14
24
|
end
|
15
25
|
end
|
data/lib/cg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codegears
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11.pre
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/cg/cli.rb
|
97
97
|
- lib/cg/command.rb
|
98
98
|
- lib/cg/command/app.rb
|
99
|
+
- lib/cg/command/version.rb
|
99
100
|
- lib/cg/pusher.rb
|
100
101
|
- lib/cg/version.rb
|
101
102
|
- lib/generators/cg/install/install_generator.rb
|