Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue with warp_drives preventing group inheritance.

  • Loading branch information...
commit a33a878a07b7fe1ff4c393323e8d983ae75513d5 1 parent be6380a
@markbates authored
Showing with 6 additions and 7 deletions.
  1. +1 −1  Rakefile
  2. +5 −6 lib/gemtronics/manager.rb
View
2  Rakefile
@@ -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
11 lib/gemtronics/manager.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.