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 +4 -4
- data/bin/gitgem +10 -10
- data/lib/gitgem/action.rb +3 -1
- data/lib/version.rb +1 -1
- 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: db06fbe33924e7756d3d63ce91b0a16661e25b5f
|
|
4
|
+
data.tar.gz: b9f5fe444a09e183ab1d9167e32326e8b4b3315e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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 =
|
|
34
|
-
repo_alias =
|
|
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 =
|
|
49
|
-
GitGem::Action.
|
|
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 =
|
|
71
|
-
gem_name =
|
|
72
|
-
bindir =
|
|
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 =
|
|
95
|
-
gem_name =
|
|
96
|
-
bindir =
|
|
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 =
|
|
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