From 41a94048e55e082f373e19d9fcee311860aaba9e Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Sat, 6 Jun 2009 17:59:33 -0400 Subject: Fix several issues with the 2.3.2 gem loader. Incorporates the following: - migrates back small change to gems:build:force from bfc1609a501fc3ed442685819de5bcdb5fbada1c to finish closing #2266. - unrolls to_proc calls in gems.rake, to match the change in master. - fixes #2722 by passing the options hash to dependencies during build. (includes a test) - fixes #2721 by loading the specification directly in from_directory_name. Adds an option to opt-out of specification loading when needed (in gems:refresh_specs, for instance). Includes tests. - fixes #2679 by refreshing specs for all frozen gems rather than just gems loaded from the environment. - fixes #2678 by passing the options hash to dependencies during unpack. Signed-off-by: Michael Koziarski --- railties/lib/tasks/gems.rake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'railties/lib/tasks/gems.rake') diff --git a/railties/lib/tasks/gems.rake b/railties/lib/tasks/gems.rake index e496e1a04f..f1c34c7cca 100644 --- a/railties/lib/tasks/gems.rake +++ b/railties/lib/tasks/gems.rake @@ -20,7 +20,7 @@ namespace :gems do desc "Build any native extensions for unpacked gems" task :build do $gems_build_rake_task = true - frozen_gems.each {|gem| gem.build } + frozen_gems.each { |gem| gem.build } end namespace :build do @@ -33,12 +33,12 @@ namespace :gems do desc "Installs all required gems." task :install => :base do - current_gems.each {|gem| gem.install } + current_gems.each { |gem| gem.install } end desc "Unpacks all required gems into vendor/gems." task :unpack => :install do - current_gems.each {|gem| gem.unpack } + current_gems.each { |gem| gem.unpack } end namespace :unpack do @@ -49,8 +49,8 @@ namespace :gems do end desc "Regenerate gem specifications in correct format." - task :refresh_specs => :base do - current_gems.each {|gem| gem.refresh } + task :refresh_specs do + frozen_gems(false).each { |gem| gem.refresh } end end @@ -60,9 +60,9 @@ def current_gems gems end -def frozen_gems +def frozen_gems(load_specs=true) Dir[File.join(RAILS_ROOT, 'vendor', 'gems', '*-*')].map do |gem_dir| - Rails::GemDependency.from_directory_name(gem_dir) + Rails::GemDependency.from_directory_name(gem_dir, load_specs) end end -- cgit v1.2.3