Created
July 22, 2010 21:31
-
-
Save jonforums/486619 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/config/ruby_installer.rb b/config/ruby_installer.rb | |
index cc18270..c8db950 100644 | |
--- a/config/ruby_installer.rb | |
+++ b/config/ruby_installer.rb | |
@@ -226,7 +226,7 @@ module RubyInstaller | |
:release => 'official', | |
:version => '1.3.7', | |
:url => 'http://rubyforge.org/frs/download.php/70696', | |
- :checkout => 'http://rubygems.rubyforge.org/svn/trunk', | |
+ :checkout => 'git://github.com/rubygems/rubygems.git', | |
:checkout_target => 'downloads/rubygems', | |
:target => 'sandbox/rubygems', | |
:configure_options => [ | |
diff --git a/recipes/tools/rubygems.rake b/recipes/tools/rubygems.rake | |
index 0c54a1b..b0b973b 100644 | |
--- a/recipes/tools/rubygems.rake | |
+++ b/recipes/tools/rubygems.rake | |
@@ -13,21 +13,23 @@ namespace(:tools) do | |
file_source = "#{package.url}/#{f}" | |
file_target = "downloads/#{f}" | |
download file_target => file_source | |
- | |
+ | |
# depend on downloads directory | |
file file_target => "downloads" | |
- | |
+ | |
# download task need these files as pre-requisites | |
task :download => file_target | |
end | |
task :checkout => "downloads" do | |
cd RubyInstaller::ROOT do | |
- # If is there already a checkout, update instead of checkout" | |
- if File.exist?(File.join(RubyInstaller::ROOT, package.checkout_target, '.svn')) | |
- sh "svn update #{package.checkout_target}" | |
+ # If is there already a checkout, update instead of checkout | |
+ if File.exist?(File.join(RubyInstaller::ROOT, package.checkout_target, '.git')) | |
+ Dir.chdir(package.checkout_target) do | |
+ sh "git checkout master && git pull" | |
+ end | |
else | |
- sh "svn co #{package.checkout} #{package.checkout_target}" | |
+ sh "git clone #{package.checkout} #{package.checkout_target}" | |
end | |
end | |
end | |
@@ -61,11 +63,11 @@ namespace(:tools) do | |
end | |
task :install19 => [package.target, RubyInstaller::Ruby19.target] do | |
- do_install RubyInstaller::RubyGems, RubyInstaller::Ruby19 | |
+ do_install RubyInstaller::RubyGems, RubyInstaller::Ruby19, '--disable-gems' | |
end | |
private | |
- def do_install(package, interpreter) | |
+ def do_install(package, interpreter, *options) | |
new_ruby = File.join(RubyInstaller::ROOT, interpreter.install_target, "bin").gsub(File::SEPARATOR, File::ALT_SEPARATOR) | |
ENV['PATH'] = "#{new_ruby};#{ENV['PATH']}" | |
['RUBYOPT', 'GEM_HOME', 'GEM_PATH'].each do |var| | |
@@ -73,7 +75,7 @@ namespace(:tools) do | |
end | |
cd package.target do | |
- sh "ruby setup.rb install #{package.configure_options.join(' ')}" | |
+ sh "ruby #{options.join(' ')} setup.rb install #{package.configure_options.join(' ')}" | |
end | |
# now fixes the stub batch files form bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment