aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/tasks/gems.rake
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/tasks/gems.rake')
-rw-r--r--railties/lib/tasks/gems.rake18
1 files changed, 16 insertions, 2 deletions
diff --git a/railties/lib/tasks/gems.rake b/railties/lib/tasks/gems.rake
index ed07bf2016..efadb1da3b 100644
--- a/railties/lib/tasks/gems.rake
+++ b/railties/lib/tasks/gems.rake
@@ -20,8 +20,16 @@ namespace :gems do
desc "Build any native extensions for unpacked gems"
task :build do
$gems_build_rake_task = true
- Rake::Task['gems:unpack'].invoke
- current_gems.each &:build
+ frozen_gems.each &:build
+ end
+
+ namespace :build do
+ desc "Force the build of all gems"
+ task :force do
+ $gems_build_rake_task = true
+ Rake::Task['gems:unpack'].invoke
+ current_gems.each { |gem| gem.build(:force => true) }
+ end
end
desc "Installs all required gems."
@@ -53,6 +61,12 @@ def current_gems
gems
end
+def frozen_gems
+ Dir[File.join(RAILS_ROOT, 'vendor', 'gems', '*-*')].map do |gem_dir|
+ Rails::GemDependency.from_directory_name(gem_dir)
+ end
+end
+
def print_gem_status(gem, indent=1)
code = case
when gem.framework_gem? then 'R'