Permalink
Browse files

Merge pull request #108 from Azolo/dk_gemhook_require

Moved DevKit Environment message to Gem Hook
  • Loading branch information...
2 parents ded3058 + 461df68 commit 9166ccce5658c9303ec7675ff80c0d6c6a5a76ff @jonforums jonforums committed Apr 18, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 resources/devkit/dk.rb.erb
View
@@ -48,9 +48,7 @@ EOT
<<-EOT
# #{DEVKIT_START} override 'gem install' to enable RubyInstaller DevKit usage
Gem.pre_install do |gem_installer|
- unless gem_installer.spec.extensions.empty?
- require 'devkit'
- end
+ load 'devkit.rb' unless gem_installer.spec.extensions.empty?
end
# #{DEVKIT_END}
EOT
@@ -62,7 +60,13 @@ EOT
<<-EOT
# enable RubyInstaller DevKit usage as a vendorable helper library
unless ENV['PATH'].include?('#{d}\\\\mingw\\\\bin') then
- puts 'Temporarily enhancing PATH to include DevKit...'
+ phrase = 'Temporarily enhancing PATH to include DevKit...'
+ if defined?(Gem)
+ Gem.ui.say(phrase) if Gem.configuration.verbose
+ else
+ puts phrase
+ end
+ puts "Prepending ENV['PATH'] to include DevKit..." if $DEBUG
ENV['PATH'] = '#{d}\\\\bin;#{d}\\\\mingw\\\\bin;' + ENV['PATH']
end
ENV['RI_DEVKIT'] = '#{d}'

0 comments on commit 9166ccc

Please sign in to comment.