Rakefile in rubygems-update-1.0.1 vs Rakefile in rubygems-update-1.1.0

- old
+ new

@@ -16,11 +16,15 @@ def announce(msg='') STDERR.puts msg end # Disable certs for now. -ENV['CERT_DIR'] ||= File.expand_path(File.join('~', '.gem')) +if RUBY_PLATFORM.match('mswin') + ENV['CERT_DIR'] ||= (File.join(ENV['USERPROFILE'], '.gem')) +else + ENV['CERT_DIR'] ||= File.expand_path(File.join('~', '.gem')) +end PKG_NAME = 'rubygems' def package_version `ruby -Ilib bin/gem environment packageversion`.chomp end @@ -280,13 +284,13 @@ p.need_zip = true p.package_files = PKG_FILES end Spec = Gem::Specification.new do |s| - s.name = PKG_NAME + "-update" + s.name = PKG_NAME + "-update" s.version = PKG_VERSION - s.required_ruby_version = Gem::Requirement.new '> 1.8.2' + s.required_ruby_version = Gem::Requirement.new '> 1.8.3' s.summary = "RubyGems Update GEM" s.description = %{RubyGems is a package management framework for Ruby. This Gem is a update for the base RubyGems software. You must have a base installation of RubyGems before this update can be applied. } @@ -369,37 +373,57 @@ task :rf => :rubyfiles # These tasks expect to have the following directory structure: # -# ruby/trunk # ruby subversion HEAD checkout -# rubygems/trunk # RubyGems subversion HEAD checkout +# git/git.rubini.us/code # Rubinius git HEAD checkout +# svn/ruby/trunk # ruby subversion HEAD checkout +# svn/rubygems/trunk # RubyGems subversion HEAD checkout # -# If you don't have this directory structure, set RUBY_PATH. +# If you don't have this directory structure, set RUBY_PATH and/or +# RUBINIUS_PATH. -desc "Updates Ruby HEAD with the currently checked-out copy of RubyGems." -task :update_ruby do - ruby_dir = ENV['RUBY_PATH'] || '../../ruby/trunk' +diff_options = "-urpN --exclude '*svn*' --exclude '*swp' --exclude '*rbc'" +rsync_options = "-avP --exclude '*svn*' --exclude '*swp' --exclude '*rbc' --exclude '*.rej' --exclude '*.orig'" - options = "-avP --exclude '*svn*' --exclude '*swp' --exclude '*rbc'" +rubinius_dir = ENV['RUBINIUS_PATH'] || '../../../git/git.rubini.us/code' +ruby_dir = ENV['RUBY_PATH'] || '../../ruby/trunk' - sh "rsync #{options} bin/gem #{ruby_dir}/bin/gem" - sh "rsync #{options} lib/ #{ruby_dir}/lib" - sh "rsync #{options} test/ #{ruby_dir}/test/rubygems" - sh "rsync #{options} util/gem_prelude.rb #{ruby_dir}/gem_prelude.rb" +desc "Updates Ruby HEAD with the currently checked-out copy of RubyGems." +task :update_ruby do + sh "rsync #{rsync_options} bin/gem #{ruby_dir}/bin/gem" + sh "rsync #{rsync_options} lib/ #{ruby_dir}/lib" + sh "rsync #{rsync_options} test/ #{ruby_dir}/test/rubygems" + sh "rsync #{rsync_options} util/gem_prelude.rb #{ruby_dir}/gem_prelude.rb" end desc "Diffs Ruby HEAD with the currently checked-out copy of RubyGems." task :diff_ruby do - ruby_dir = ENV['RUBY_PATH'] || '../../ruby/trunk' - options = "-urpN --exclude '*svn*' --exclude '*swp' --exclude '*rbc'" - sh "diff #{options} bin/gem #{ruby_dir}/bin/gem; true" - sh "diff #{options} lib/ubygems.rb #{ruby_dir}/lib/ubygems.rb; true" - sh "diff #{options} lib/rubygems.rb #{ruby_dir}/lib/rubygems.rb; true" - sh "diff #{options} lib/rubygems #{ruby_dir}/lib/rubygems; true" - sh "diff #{options} lib/rbconfig #{ruby_dir}/lib/rbconfig; true" - sh "diff #{options} test #{ruby_dir}/test/rubygems; true" - sh "diff #{options} util/gem_prelude.rb #{ruby_dir}/gem_prelude.rb; true" + sh "diff #{diff_options} bin/gem #{ruby_dir}/bin/gem; true" + sh "diff #{diff_options} lib/ubygems.rb #{ruby_dir}/lib/ubygems.rb; true" + sh "diff #{diff_options} lib/rubygems.rb #{ruby_dir}/lib/rubygems.rb; true" + sh "diff #{diff_options} lib/rubygems #{ruby_dir}/lib/rubygems; true" + sh "diff #{diff_options} lib/rbconfig #{ruby_dir}/lib/rbconfig; true" + sh "diff #{diff_options} test #{ruby_dir}/test/rubygems; true" + sh "diff #{diff_options} util/gem_prelude.rb #{ruby_dir}/gem_prelude.rb; true" end +desc "Updates Rubinius HEAD with the currently checked-out copy of RubyGems." +task :update_rubinius do + sh "rsync #{rsync_options} bin/gem #{rubinius_dir}/lib/bin/gem.rb" + sh "rsync #{rsync_options} lib/ #{rubinius_dir}/lib" + sh "rsync #{rsync_options} test/ #{rubinius_dir}/test/rubygems" + sh "rsync #{rsync_options} util/gem_prelude.rb #{rubinius_dir}/kernel/core/gem_prelude.rb" +end + +desc "Diffs Rubinius HEAD with the currently checked-out copy of RubyGems." +task :diff_rubinius do + sh "diff #{diff_options} bin/gem #{rubinius_dir}/lib/bin/gem.rb; true" + sh "diff #{diff_options} lib/ubygems.rb #{rubinius_dir}/lib/ubygems.rb; true" + sh "diff #{diff_options} lib/rubygems.rb #{rubinius_dir}/lib/rubygems.rb; true" + sh "diff #{diff_options} lib/rubygems #{rubinius_dir}/lib/rubygems; true" + sh "diff #{diff_options} lib/rbconfig #{rubinius_dir}/lib/rbconfig; true" + sh "diff #{diff_options} test #{rubinius_dir}/test/rubygems; true" + sh "diff #{diff_options} util/gem_prelude.rb #{rubinius_dir}/kernel/core/gem_prelude.rb; true" +end