gridcli 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- unless fetch('enabled', []).include? name
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
@@ -1,3 +1,3 @@
1
1
  module GridCLI
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -16,7 +16,6 @@ module GridCLI
16
16
  File.exists?(@conffile) ? update(YAML.load_file(@conffile)) : save
17
17
  end
18
18
 
19
-
20
19
  def default_config
21
20
  {}
22
21
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gridcli
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brian Muller