gem-wrappers 1.2.6.1 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gem-wrappers/command.rb +9 -6
- data/lib/gem-wrappers/version.rb +1 -1
- data/test/gem-wrappers/command_test.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
|
4
|
-
|
3
|
+
data.tar.gz: e3c4b6e90e5eb8b635169e54b0c976962c082222
|
4
|
+
metadata.gz: 38d025a4910fed667ee8de884032a87729e549e0
|
5
5
|
SHA512:
|
6
|
-
|
7
|
-
|
6
|
+
data.tar.gz: 13d86554a5436703e8215f875811db78ecbab2b200cb01272845acc227ac850ff0e87029dd8a8974f0fd3609c6e17cf5c9c03e6fac22b5f582855c2545bc4bb8
|
7
|
+
metadata.gz: 3413b198ab7c93a41c7b4a1a5f27100d30dfb50fe54a918b927cdcbffe907841bbc99eff6e10267f9ecc1ca8b64912d849523450811d3fe6acb4a5d35d661e6a
|
data/lib/gem-wrappers/command.rb
CHANGED
@@ -28,12 +28,13 @@ DOC
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def execute
|
31
|
-
|
31
|
+
args = options[:args] || []
|
32
|
+
subcommand = args.shift || ''
|
32
33
|
case subcommand
|
33
|
-
when ''
|
34
|
-
execute_show
|
34
|
+
when '', 'show'
|
35
|
+
execute_show(args)
|
35
36
|
when 'regenerate'
|
36
|
-
execute_regenerate
|
37
|
+
execute_regenerate(args)
|
37
38
|
when FileExist
|
38
39
|
execute_regenerate([File.expand_path(subcommand)])
|
39
40
|
else
|
@@ -41,7 +42,8 @@ DOC
|
|
41
42
|
end
|
42
43
|
end
|
43
44
|
|
44
|
-
def execute_show(list =
|
45
|
+
def execute_show(list = [])
|
46
|
+
list = executables if list.empty?
|
45
47
|
$stdout.puts description
|
46
48
|
$stdout.puts " Wrappers path: #{gem_wrappers.wrappers_path}"
|
47
49
|
$stdout.puts "Environment file: #{gem_wrappers.environment_file}"
|
@@ -54,7 +56,8 @@ DOC
|
|
54
56
|
false
|
55
57
|
end
|
56
58
|
|
57
|
-
def execute_regenerate(list =
|
59
|
+
def execute_regenerate(list = [])
|
60
|
+
list = executables if list.empty?
|
58
61
|
execute_show(list) if ENV['GEM_WRAPPERS_DEBUG']
|
59
62
|
gem_wrappers.install(list)
|
60
63
|
end
|
data/lib/gem-wrappers/version.rb
CHANGED
@@ -36,7 +36,7 @@ describe WrappersCommand do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "does show" do
|
39
|
-
subject.options[:args] = []
|
39
|
+
subject.options[:args] = ["show", "rake"]
|
40
40
|
subject.execute
|
41
41
|
|
42
42
|
$stderr.string.must_equal("")
|
@@ -44,7 +44,7 @@ describe WrappersCommand do
|
|
44
44
|
#{subject.description.strip}
|
45
45
|
Wrappers path: /path/to/wrappers
|
46
46
|
Environment file: /path/to/environment
|
47
|
-
Executables: rake
|
47
|
+
Executables: rake
|
48
48
|
EXPECTED
|
49
49
|
end
|
50
50
|
|