railties 6.1.0 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/rails/application/configuration.rb +1 -0
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/app_base.rb +8 -2
- data/lib/rails/generators/rails/app/templates/bin/spring.tt +5 -1
- data/lib/rails/generators/rails/app/templates/bin/yarn.tt +7 -9
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt +4 -0
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +1 -0
- data/lib/rails/railtie.rb +4 -4
- data/lib/rails/tasks/yarn.rake +7 -3
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e4b20eb9abd2c8e71d7c802b1adc936d2e0e3fa7afed6c547c95389bb31952a
|
4
|
+
data.tar.gz: efbbfbb14c05be75a8eff3da93a93cb7a53e9aafd357a9af14bd262b50b5f7a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: beeedae94ff8b9e2f457a988901f9c917ef4f6d1003d98a1fc0fa01ac9f8c314d22d386b9fc2a4b2aae3d9bbcfa3f4621b844c10c4d2f3f28fe0775b30322a55
|
7
|
+
data.tar.gz: 37b5a5f78bc733c05f52e071bcbc83f50894bdaa26a2a5fa60f779512640fc2b5463f436ed8073c0f5effe4dfe3dc23a02cde10296b062c787b1e6ef004809a1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## Rails 6.1.1 (January 07, 2021) ##
|
2
|
+
|
3
|
+
* Allow spaces in path to Yarn binstub and only run on precompile if needed.
|
4
|
+
|
5
|
+
*Markus Doits*
|
6
|
+
|
7
|
+
* Populate ARGV for app template.
|
8
|
+
|
9
|
+
Fixes #40945.
|
10
|
+
|
11
|
+
*Jonathan Hefner*
|
12
|
+
|
13
|
+
|
1
14
|
## Rails 6.1.0 (December 09, 2020) ##
|
2
15
|
|
3
16
|
* Added `Railtie#server` hook called when Rails starts a server.
|
data/lib/rails/gem_version.rb
CHANGED
@@ -110,8 +110,9 @@ module Rails
|
|
110
110
|
desc: "Show this help message and quit"
|
111
111
|
end
|
112
112
|
|
113
|
-
def initialize(*
|
114
|
-
@
|
113
|
+
def initialize(positional_argv, option_argv, *)
|
114
|
+
@argv = [*positional_argv, *option_argv]
|
115
|
+
@gem_filter = lambda { |gem| true }
|
115
116
|
@extra_entries = []
|
116
117
|
super
|
117
118
|
end
|
@@ -172,9 +173,14 @@ module Rails
|
|
172
173
|
end
|
173
174
|
|
174
175
|
def apply_rails_template # :doc:
|
176
|
+
original_argv = ARGV.dup
|
177
|
+
ARGV.replace(@argv)
|
178
|
+
|
175
179
|
apply rails_template if rails_template
|
176
180
|
rescue Thor::Error, LoadError, Errno::ENOENT => e
|
177
181
|
raise Error, "The template [#{rails_template}] could not be loaded. Error: #{e}"
|
182
|
+
ensure
|
183
|
+
ARGV.replace(original_argv)
|
178
184
|
end
|
179
185
|
|
180
186
|
def set_default_accessors! # :doc:
|
@@ -1,9 +1,13 @@
|
|
1
1
|
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
|
2
|
-
|
2
|
+
gem "bundler"
|
3
3
|
require "bundler"
|
4
|
+
|
5
|
+
# Load Spring without loading other gems in the Gemfile, for speed.
|
4
6
|
Bundler.locked_gems.specs.find { |spec| spec.name == "spring" }&.tap do |spring|
|
5
7
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
6
8
|
gem "spring", spring.version
|
7
9
|
require "spring/binstub"
|
10
|
+
rescue Gem::LoadError
|
11
|
+
# Ignore when Spring is not installed.
|
8
12
|
end
|
9
13
|
end
|
@@ -1,15 +1,13 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
|
3
1
|
APP_ROOT = File.expand_path('..', __dir__)
|
4
2
|
Dir.chdir(APP_ROOT) do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
|
4
|
+
select { |dir| File.expand_path(dir) != __dir__ }.
|
5
|
+
product(["yarn", "yarn.exe"]).
|
6
|
+
map { |dir, file| File.expand_path(file, dir) }.
|
7
|
+
find { |file| File.executable?(file) }
|
10
8
|
|
11
|
-
if
|
12
|
-
exec
|
9
|
+
if yarn
|
10
|
+
exec yarn, *ARGV
|
13
11
|
else
|
14
12
|
$stderr.puts "Yarn executable was not detected in the system."
|
15
13
|
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt
CHANGED
@@ -61,3 +61,7 @@
|
|
61
61
|
|
62
62
|
# Set the default queue name for the mail deliver job to the queue adapter default.
|
63
63
|
# Rails.application.config.action_mailer.deliver_later_queue_name = nil
|
64
|
+
|
65
|
+
# Generate a `Link` header that gives a hint to modern browsers about
|
66
|
+
# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
|
67
|
+
# Rails.application.config.action_view.preload_links_header = true
|
@@ -103,6 +103,7 @@ task default: :test
|
|
103
103
|
opts = options.transform_keys(&:to_sym).except(*DUMMY_IGNORE_OPTIONS)
|
104
104
|
opts[:force] = force
|
105
105
|
opts[:skip_bundle] = true
|
106
|
+
opts[:skip_spring] = true
|
106
107
|
opts[:skip_listen] = true
|
107
108
|
opts[:skip_git] = true
|
108
109
|
opts[:skip_turbolinks] = true
|
data/lib/rails/railtie.rb
CHANGED
@@ -120,11 +120,11 @@ module Rails
|
|
120
120
|
# this less confusing for everyone.
|
121
121
|
# It can be used like this:
|
122
122
|
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
123
|
+
# class MyRailtie < Rails::Railtie
|
124
|
+
# server do
|
125
|
+
# WebpackServer.start
|
126
|
+
# end
|
126
127
|
# end
|
127
|
-
# end
|
128
128
|
#
|
129
129
|
# == Application and Engine
|
130
130
|
#
|
data/lib/rails/tasks/yarn.rake
CHANGED
@@ -10,17 +10,21 @@ namespace :yarn do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
yarn_flags =
|
13
|
-
if
|
13
|
+
if `"#{Rails.root}/bin/yarn" --version`.start_with?("1")
|
14
14
|
"--no-progress --frozen-lockfile"
|
15
15
|
else
|
16
16
|
"--immutable"
|
17
17
|
end
|
18
18
|
|
19
|
-
system({ "NODE_ENV" => node_env }, "#{Rails.root}/bin/yarn install #{yarn_flags}")
|
19
|
+
system({ "NODE_ENV" => node_env }, "\"#{Rails.root}/bin/yarn\" install #{yarn_flags}")
|
20
|
+
rescue Errno::ENOENT
|
21
|
+
$stderr.puts "bin/yarn was not found."
|
22
|
+
$stderr.puts "Please run `bundle exec rails app:update:bin` to create it."
|
23
|
+
exit 1
|
20
24
|
end
|
21
25
|
end
|
22
26
|
|
23
27
|
# Run Yarn prior to Sprockets assets precompilation, so dependencies are available for use.
|
24
|
-
if Rake::Task.task_defined?("assets:precompile")
|
28
|
+
if Rake::Task.task_defined?("assets:precompile") && File.exist?(Rails.root.join("bin", "yarn"))
|
25
29
|
Rake::Task["assets:precompile"].enhance [ "yarn:install" ]
|
26
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railties
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.1.
|
19
|
+
version: 6.1.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 6.1.
|
26
|
+
version: 6.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actionpack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 6.1.
|
33
|
+
version: 6.1.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 6.1.
|
40
|
+
version: 6.1.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 6.1.
|
89
|
+
version: 6.1.1
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 6.1.
|
96
|
+
version: 6.1.1
|
97
97
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
98
98
|
email: david@loudthinking.com
|
99
99
|
executables:
|
@@ -426,11 +426,11 @@ licenses:
|
|
426
426
|
- MIT
|
427
427
|
metadata:
|
428
428
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
429
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.1.
|
430
|
-
documentation_uri: https://api.rubyonrails.org/v6.1.
|
429
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.1.1/railties/CHANGELOG.md
|
430
|
+
documentation_uri: https://api.rubyonrails.org/v6.1.1/
|
431
431
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
432
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.1.
|
433
|
-
post_install_message:
|
432
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.1.1/railties
|
433
|
+
post_install_message:
|
434
434
|
rdoc_options:
|
435
435
|
- "--exclude"
|
436
436
|
- "."
|
@@ -447,8 +447,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
447
447
|
- !ruby/object:Gem::Version
|
448
448
|
version: '0'
|
449
449
|
requirements: []
|
450
|
-
rubygems_version: 3.
|
451
|
-
signing_key:
|
450
|
+
rubygems_version: 3.2.3
|
451
|
+
signing_key:
|
452
452
|
specification_version: 4
|
453
453
|
summary: Tools for creating, working with, and running Rails applications.
|
454
454
|
test_files: []
|