filander 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/filander/actions/install_gem.rb +5 -3
- metadata +2 -2
@@ -4,18 +4,20 @@ module Filander
|
|
4
4
|
|
5
5
|
def install_gem(name, version = nil)
|
6
6
|
if version
|
7
|
-
gem_args = [name, version]
|
8
7
|
gem_install_args = "-v=#{version} #{name}"
|
9
8
|
report_name = "#{name} #{version}"
|
10
9
|
else
|
11
|
-
gem_args = [name]
|
12
10
|
gem_install_args = name
|
13
11
|
report_name = name
|
14
12
|
end
|
15
13
|
report :install, report_name
|
16
14
|
unless Filander.behavior == :pretend
|
17
15
|
begin
|
18
|
-
|
16
|
+
if version
|
17
|
+
gem name, version
|
18
|
+
else
|
19
|
+
gem name
|
20
|
+
end
|
19
21
|
rescue => Gem::LoadError
|
20
22
|
cmd "gem install #{gem_install_args}"
|
21
23
|
end
|