Skip to content

Commit 884bc3f

Browse files
committed
Rename serve_static_assets to serve_static_files
1 parent 83364fd commit 884bc3f

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

bin/rails

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
begin
3+
load File.expand_path("../spring", __FILE__)
4+
rescue LoadError
5+
end
26
APP_PATH = File.expand_path('../../config/application', __FILE__)
37
require_relative '../config/boot'
48
require 'rails/commands'

bin/rake

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
begin
3+
load File.expand_path("../spring", __FILE__)
4+
rescue LoadError
5+
end
26
require_relative '../config/boot'
37
require 'rake'
48
Rake.application.run

bin/spring

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ unless defined?(Spring)
77
require "rubygems"
88
require "bundler"
99

10-
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
10+
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
1111
ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
1212
ENV["GEM_HOME"] = ""
1313
Gem.paths = ENV

config/environments/production.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
# NGINX, varnish or squid.
2121
# config.action_dispatch.rack_cache = true
2222

23-
# Disable Rails's static asset server (Apache or NGINX will already do this).
24-
config.serve_static_assets = false
23+
# Disable serving static files from the `/public` folder by default since
24+
# Apache or NGINX already handles this.
25+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
2526

2627
# Compress JavaScripts and CSS.
2728
config.assets.js_compressor = :uglifier

config/environments/test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# preloads Rails for running tests, you may have to set it to true.
1313
config.eager_load = false
1414

15-
# Configure static asset server for tests with Cache-Control for performance.
16-
config.serve_static_assets = true
15+
# Configure static file server for tests with Cache-Control for performance.
16+
config.serve_static_files = true
1717
config.static_cache_control = 'public, max-age=3600'
1818

1919
# Show full error reports and disable caching.
@@ -32,7 +32,7 @@
3232
config.action_mailer.delivery_method = :test
3333
config.action_mailer.default_url_options = {host: 'localhost:3000'}
3434

35-
# Randomize the order test cases are executed
35+
# Randomize the order test cases are executed.
3636
config.active_support.test_order = :random
3737

3838
# Print deprecation notices to the stderr.

0 commit comments

Comments
 (0)