aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/sprockets/assets.rake6
-rw-r--r--railties/lib/rails/generators/actions.rb3
2 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake
index a61a121d55..43405f3db9 100644
--- a/actionpack/lib/sprockets/assets.rake
+++ b/actionpack/lib/sprockets/assets.rake
@@ -1,12 +1,12 @@
require "fileutils"
namespace :assets do
- def ruby_rake_task(task)
+ def ruby_rake_task(task, fork = true)
env = ENV['RAILS_ENV'] || 'production'
groups = ENV['RAILS_GROUPS'] || 'assets'
args = [$0, task,"RAILS_ENV=#{env}","RAILS_GROUPS=#{groups}"]
args << "--trace" if Rake.application.options.trace
- ruby(*args)
+ fork ? ruby(*args) : Kernel.exec(FileUtils::RUBY, *args)
end
# We are currently running with no explicit bundler group
@@ -59,7 +59,7 @@ namespace :assets do
# required in order to compile digestless assets as the
# environment has already cached the assets on the primary
# run.
- ruby_rake_task "assets:precompile:nondigest" if Rails.application.config.assets.digest
+ ruby_rake_task("assets:precompile:nondigest", false) if Rails.application.config.assets.digest
end
task :primary => ["assets:environment", "tmp:cache:clear"] do
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb
index ce62ea463d..7e7d54e6ed 100644
--- a/railties/lib/rails/generators/actions.rb
+++ b/railties/lib/rails/generators/actions.rb
@@ -1,6 +1,5 @@
require 'open-uri'
require 'rbconfig'
-require 'active_support/core_ext/array/wrap'
module Rails
module Generators
@@ -92,7 +91,7 @@ module Rails
if options[:env].nil?
inject_into_file 'config/application.rb', "\n #{data}", :after => sentinel, :verbose => false
else
- Array.wrap(options[:env]).each do |env|
+ Array(options[:env]).each do |env|
inject_into_file "config/environments/#{env}.rb", "\n #{data}", :after => env_file_sentinel, :verbose => false
end
end