Permalink
Browse files

config.gem: Fix typo in unpack, skip dependencies on unloaded gems, a…

…nd silence spec warnings on refresh. [#1128]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent fcb45e5 commit 326030a1e843245ae493fbdfb1b5eb72d1e59f26 @al2o3cr al2o3cr committed with lifo Oct 20, 2008
Showing with 3 additions and 2 deletions.
  1. +1 −1 railties/lib/rails/gem_dependency.rb
  2. +2 −1 railties/lib/tasks/gems.rake
@@ -151,7 +151,7 @@ def unpack_to(directory)
end
# Gem.activate changes the spec - get the original
- real_spec = Gem::Specification.load(spec.loaded_from)
+ real_spec = Gem::Specification.load(specification.loaded_from)
write_spec(directory, real_spec)
end
@@ -11,7 +11,7 @@ end
def print_gem_status(gem, indent=1)
code = gem.loaded? ? (gem.frozen? ? "F" : "I") : " "
puts " "*(indent-1)+" - [#{code}] #{gem.name} #{gem.requirement.to_s}"
- gem.dependencies.each { |g| print_gem_status(g, indent+1)}
+ gem.dependencies.each { |g| print_gem_status(g, indent+1)} if gem.loaded?
end
namespace :gems do
@@ -70,6 +70,7 @@ namespace :gems do
task :refresh_specs => :base do
require 'rubygems'
require 'rubygems/gem_runner'
+ Rails::VendorGemSourceIndex.silence_spec_warnings = true
Rails.configuration.gems.each do |gem|
next unless gem.frozen? && (ENV['GEM'].blank? || ENV['GEM'] == gem.name)
gem.refresh_spec(Rails::GemDependency.unpacked_path) if gem.loaded?

0 comments on commit 326030a

Please sign in to comment.