gitgem 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/gitgem +5 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b97e4c4449299b6c67b51dab1b1128a6c58ac17
4
- data.tar.gz: ba89f9ebfe76087e27ffa3801e0572ad8a502dd3
3
+ metadata.gz: dc0d557e36ee9313e43828e5a672a055e04bf453
4
+ data.tar.gz: e9e759e7a8bc3e216100d75e972479bd6c2d7885
5
5
  SHA512:
6
- metadata.gz: 3e2ad5835ab62a41e697250bb6d460461ee76b496f74378bf5c313f9405a691e74e1b45f80f28919e46434f9268c48152123ea104be0470aa9b6d948ae8b0190
7
- data.tar.gz: bac8723d5b4ef37c297936194229e9dfab7ec8faef81db9d1e13a3e7e934df541b17fbf15d74b0c77dc47a6ea69e3ad32e6a38b5cd322955cfa18cea87a63a23
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 = 'Here is help messages of the command line tool.'
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') { puts opts; exit }
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - saitjr