codegears 0.0.10.pre → 0.0.11.pre

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.
@@ -0,0 +1,9 @@
1
+ require "cg/version"
2
+
3
+ module Command
4
+ class Version
5
+ def self.main(*args)
6
+ puts CG::VERSION
7
+ end
8
+ end
9
+ end
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.send(task, *args)
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
@@ -1,3 +1,3 @@
1
1
  module CG
2
- VERSION = "0.0.10.pre"
2
+ VERSION = "0.0.11.pre"
3
3
  end
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.10.pre
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