gitgem 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 952afaa9e8bdbe2175413c57d6e64580265f0ff4
4
- data.tar.gz: b608e9cc88058d0f1fb901f4b6b488b4ebafc502
3
+ metadata.gz: db06fbe33924e7756d3d63ce91b0a16661e25b5f
4
+ data.tar.gz: b9f5fe444a09e183ab1d9167e32326e8b4b3315e
5
5
  SHA512:
6
- metadata.gz: 174915786aaa51f442326e145d5b66ec821dc018aa8fe5c821d01a36030dec9b69d10ec7436a80fae9cf13111df11bc31a453ae57ca7b8748c30ccacfe823d17
7
- data.tar.gz: 02f380f55aa07402fe521f932c785efbee0982445ae69c8e277d4c4199298f196675c60f655dd170c94752b97381955446385a2854e0abb8865d463ca85d2c27
6
+ metadata.gz: 5179d28f0037a482e0ddee3e88c5355cfc86e0ecb82cb043dfce8902e3ce10071d2b85040aa4f2460d446d2a1c229fb5a704b0f84db4ff1a49d3a4850b4b3b58
7
+ data.tar.gz: 6b63fa0e22a57021bb917a44041d7bd739154eadb824f2cd966294f51d4e5b7166b7e1ed07ab88877fe0011bcc77b50aa83c4da18654459b9c461ca7583412bc
data/bin/gitgem CHANGED
@@ -30,8 +30,8 @@ command :add do |c|
30
30
  c.flag [:a, :alias]
31
31
 
32
32
  c.action do |_, opts, _|
33
- repo = options[:r]
34
- repo_alias = options[:a]
33
+ repo = opts[:r]
34
+ repo_alias = opts[:a]
35
35
  GitGem::Action.add(repo_alias, repo)
36
36
  end
37
37
  end
@@ -45,8 +45,8 @@ command :remove do |c|
45
45
  c.flag [:a, :alias]
46
46
 
47
47
  c.action do |_, opts, _|
48
- repo_alias = options[:a]
49
- GitGem::Action.remove(repo_alias)
48
+ repo_alias = opts[:a]
49
+ GitGem::Action.opts(repo_alias)
50
50
  end
51
51
  end
52
52
 
@@ -67,9 +67,9 @@ command :install do |c|
67
67
  c.flag [:n, :bindir]
68
68
 
69
69
  c.action do |_, opts, _|
70
- repo = options[:a]
71
- gem_name = options[:g]
72
- bindir = options[:n]
70
+ repo = opts[:a]
71
+ gem_name = opts[:g]
72
+ bindir = opts[:n]
73
73
  GitGem::Action.install(repo, gem_name, bindir)
74
74
  end
75
75
  end
@@ -91,9 +91,9 @@ command :uninstall do |c|
91
91
  c.flag [:n, :bindir]
92
92
 
93
93
  c.action do |_, opts, _|
94
- repo = options[:a]
95
- gem_name = options[:g]
96
- bindir = options[:n]
94
+ repo = opts[:a]
95
+ gem_name = opts[:g]
96
+ bindir = opts[:n]
97
97
  GitGem::Action.uninstall(repo, gem_name, bindir)
98
98
  end
99
99
  end
data/lib/gitgem/action.rb CHANGED
@@ -15,10 +15,12 @@ module GitGem
15
15
  should_add = true
16
16
 
17
17
  result = read_alias(repo_alias)
18
+
18
19
  unless result.nil?
19
20
  puts "#{repo_alias} is already exist: #{result}"
20
21
  printf "replace? (y/n): "
21
- input = readline
22
+ input = STDIN.gets
23
+
22
24
  if input.start_with?("y")
23
25
  remove(repo_alias)
24
26
  should_add = true
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GitGem
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  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.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - saitjr