gemtronics 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gemtronics/manager.rb +5 -6
- metadata +1 -1
data/lib/gemtronics/manager.rb
CHANGED
@@ -48,19 +48,18 @@ module Gemtronics
|
|
48
48
|
def warp_drive(name, options = {})
|
49
49
|
options = {:load => false}.merge(options)
|
50
50
|
group(:warp_drives) {|g| g.add(name, options)}
|
51
|
-
if defined?(RAILS_ENV)
|
52
|
-
group(RAILS_ENV.to_sym) {|g| g.add(name, options)}
|
53
|
-
end
|
54
51
|
begin
|
55
|
-
|
52
|
+
g = find(name, :group => :warp_drives)
|
53
|
+
g.require_gem
|
56
54
|
load(WarpDrive::Path.config.gemtronics.rb)
|
57
55
|
rescue Exception => e
|
58
56
|
if e.message.match(/Could not find RubyGem #{name}/)
|
59
|
-
|
57
|
+
g = find(name, :group => :warp_drives)
|
58
|
+
cmd = g.install_command
|
60
59
|
puts cmd
|
61
60
|
system cmd
|
62
61
|
Gem.clear_paths
|
63
|
-
|
62
|
+
g.require_gem
|
64
63
|
load(WarpDrive::Path.config.gemtronics.rb)
|
65
64
|
end
|
66
65
|
end
|