Merge branch 'master' of git@github.com:rails/rails
This commit is contained in:
commit
68d84e2593
@ -144,6 +144,7 @@ def reload_application
|
||||
|
||||
Routing::Routes.reload
|
||||
ActionController::Base.view_paths.reload!
|
||||
ActionView::Helpers::AssetTagHelper::AssetTag::Cache.clear
|
||||
end
|
||||
|
||||
# Cleanup the application by clearing out loaded classes so they can
|
||||
|
@ -26,9 +26,17 @@ def teardown
|
||||
end
|
||||
|
||||
def test_clears_dependencies_after_dispatch_if_in_loading_mode
|
||||
ActionController::Routing::Routes.expects(:reload).once
|
||||
ActiveSupport::Dependencies.expects(:clear).once
|
||||
dispatch(@output, false)
|
||||
end
|
||||
|
||||
def test_reloads_routes_before_dispatch_if_in_loading_mode
|
||||
ActionController::Routing::Routes.expects(:reload).once
|
||||
dispatch(@output, false)
|
||||
end
|
||||
|
||||
def test_clears_asset_tag_cache_before_dispatch_if_in_loading_mode
|
||||
ActionView::Helpers::AssetTagHelper::AssetTag::Cache.expects(:clear).once
|
||||
dispatch(@output, false)
|
||||
end
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
begin
|
||||
gem 'tzinfo', '~> 0.3.11'
|
||||
rescue Gem::LoadError
|
||||
$:.unshift "#{File.dirname(__FILE__)}/vendor/tzinfo-0.3.9"
|
||||
$:.unshift "#{File.dirname(__FILE__)}/vendor/tzinfo-0.3.11"
|
||||
end
|
||||
|
||||
# TODO I18n gem has not been released yet
|
||||
|
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user