gitgem 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gitgem +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc0d557e36ee9313e43828e5a672a055e04bf453
|
4
|
+
data.tar.gz: e9e759e7a8bc3e216100d75e972479bd6c2d7885
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9595babb981d233affba33241e7383166208faffe9409047b3aad59f5771e9954fa00be08497ee740f72e2e6ec0ca365bb17860e5a4021df82fda22eb58bde4
|
7
|
+
data.tar.gz: 50f87490cd57bfd34dfd7078ca2bf4b5e82b6237674b3ca331aa7f73ab06a90d85bf5d1382a677dca5a4e4531b956c43c2c4d03a8e292689d0770085310764e7
|
data/bin/gitgem
CHANGED
@@ -7,11 +7,12 @@ require 'optparse'
|
|
7
7
|
|
8
8
|
require 'gitgem/action'
|
9
9
|
|
10
|
+
ARGV << '-h' if ARGV.empty?
|
10
11
|
action = ARGV.shift unless ARGV.first.start_with?("-")
|
11
12
|
|
12
13
|
options = {}
|
13
14
|
option_parser = OptionParser.new do |opts|
|
14
|
-
opts.banner =
|
15
|
+
opts.banner = "Here is help messages of the command line tool.\nAction Suppored: 'add', 'remove', 'install', 'uninstall'."
|
15
16
|
|
16
17
|
opts.on('-r REPO', '--repo Repo', 'Specify git repo') do |value|
|
17
18
|
options[:repo] = value
|
@@ -27,11 +28,10 @@ option_parser = OptionParser.new do |opts|
|
|
27
28
|
options[:gem_dir] = argvs.join("/")
|
28
29
|
end
|
29
30
|
|
30
|
-
opts.on('-h', '--help', 'Show this message')
|
31
|
+
opts.on('-h', '--help', 'Show this message') { puts opts; exit }
|
31
32
|
opts.on('-v', '--version', 'Show version') { exit }
|
32
33
|
end.parse!
|
33
34
|
|
34
|
-
|
35
35
|
case action
|
36
36
|
when 'add'
|
37
37
|
repo = options[:repo]
|
@@ -48,4 +48,6 @@ when 'uninstall'
|
|
48
48
|
repo = options[:alias]
|
49
49
|
gem_dir = options[:gem_dir]
|
50
50
|
GitGem::Action.uninstall(repo, gem_dir)
|
51
|
+
else
|
52
|
+
abort("Could not find action named '#{action}'")
|
51
53
|
end
|