Permalink
Browse files

Fixed issue with warp_drives preventing group inheritance.

  • Loading branch information...
markbates committed Oct 7, 2009
1 parent be6380a commit a33a878a07b7fe1ff4c393323e8d983ae75513d5
Showing with 6 additions and 7 deletions.
  1. +1 −1 Rakefile
  2. +5 −6 lib/gemtronics/manager.rb
View
@@ -4,7 +4,7 @@ require 'gemstub'
Gemstub.test_framework = :rspec
Gemstub.gem_spec do |s|
- s.version = "0.7.1"
+ s.version = "0.7.2"
s.rubyforge_project = 'magrathea'
# s.add_dependency('')
s.executables << 'gemtronics'
View
@@ -48,19 +48,18 @@ def group(name, options = {})
def warp_drive(name, options = {})
options = {:load => false}.merge(options)
group(:warp_drives) {|g| g.add(name, options)}
- if defined?(RAILS_ENV)
- group(RAILS_ENV.to_sym) {|g| g.add(name, options)}
- end
begin
- find_and_require_gem(name)
+ g = find(name, :group => :warp_drives)
+ g.require_gem
load(WarpDrive::Path.config.gemtronics.rb)
rescue Exception => e
if e.message.match(/Could not find RubyGem #{name}/)
- cmd = find(name).install_command
+ g = find(name, :group => :warp_drives)
+ cmd = g.install_command
puts cmd
system cmd
Gem.clear_paths
- find_and_require_gem(name)
+ g.require_gem
load(WarpDrive::Path.config.gemtronics.rb)
end
end

0 comments on commit a33a878

Please sign in to comment.