gridcli 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gridcli/plugins.rb +7 -2
- data/lib/gridcli/version.rb +1 -1
- data/lib/gridcli/ymlhash.rb +0 -1
- metadata +1 -1
data/lib/gridcli/plugins.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rubygems/gem_runner'
|
2
|
+
require 'rubygems/commands/query_command'
|
2
3
|
|
3
4
|
module GridCLI
|
4
5
|
class Plugins < YMLHash
|
@@ -15,8 +16,12 @@ module GridCLI
|
|
15
16
|
|
16
17
|
def install(name)
|
17
18
|
name = "grid-plugin-#{name}" unless name.start_with?("grid-plugin-")
|
18
|
-
Gem::GemRunner.new.run ["install", name, "--no-rdoc", "--no-ri"]
|
19
|
-
|
19
|
+
Process.fork { Gem::GemRunner.new.run ["install", name, "--no-rdoc", "--no-ri"]; puts "done" }
|
20
|
+
Process.wait
|
21
|
+
|
22
|
+
if Gem::Specification.find_all_by_name(name).length == 0
|
23
|
+
puts "There was an issue installing the plugin."
|
24
|
+
elsif not fetch('enabled', []).include? name
|
20
25
|
self['enabled'] << name
|
21
26
|
save
|
22
27
|
end
|
data/lib/gridcli/version.rb
CHANGED
data/lib/gridcli/ymlhash.rb
CHANGED