railties 5.2.2.1 → 5.2.3.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/rails/application.rb +1 -0
- data/lib/rails/command/actions.rb +10 -0
- data/lib/rails/commands/credentials/credentials_command.rb +2 -2
- data/lib/rails/commands/encrypted/USAGE +28 -0
- data/lib/rails/commands/encrypted/encrypted_command.rb +1 -0
- data/lib/rails/engine.rb +13 -1
- data/lib/rails/gem_version.rb +2 -2
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +1 -1
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +5 -0
- data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +8 -0
- data/lib/rails/tasks/yarn.rake +1 -2
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82114135a83fcae9e315c6c34eef559eab3bc8615e5690194f5bde5f468c9716
|
4
|
+
data.tar.gz: '08248d734321a6f5ffdce5f81fc2443ef0cbbdc497cf974be428aa1552822d13'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab96ee66a15072e68aaa7fe814381d3939d9875feb9a6a086e1308b6f63b52833cdd13e9290fb352e41d35a4c8ab72a5a22f454a7f90dcfce50f96e65f857cef
|
7
|
+
data.tar.gz: 4004dedfe90a3da6e765eb18c5d27376b90666860b3afdaf3e730038ee2346a040ed177d9554e55c60680440f28b3339e88ede430ff508d7cb0ab0a9551e8bb3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## Rails 5.2.3.rc1 (March 21, 2019) ##
|
2
|
+
|
3
|
+
* Seed database with inline ActiveJob job adapter.
|
4
|
+
|
5
|
+
*Gannon McGibbon*
|
6
|
+
|
7
|
+
* Fix boolean interaction in scaffold system tests.
|
8
|
+
|
9
|
+
*Gannon McGibbon*
|
10
|
+
|
11
|
+
|
1
12
|
## Rails 5.2.2.1 (March 11, 2019) ##
|
2
13
|
|
3
14
|
* No changes.
|
data/lib/rails/application.rb
CHANGED
@@ -11,10 +11,20 @@ module Rails
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def require_application_and_environment!
|
14
|
+
require_application!
|
15
|
+
require_environment!
|
16
|
+
end
|
17
|
+
|
18
|
+
def require_application!
|
14
19
|
require ENGINE_PATH if defined?(ENGINE_PATH)
|
15
20
|
|
16
21
|
if defined?(APP_PATH)
|
17
22
|
require APP_PATH
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def require_environment!
|
27
|
+
if defined?(APP_PATH)
|
18
28
|
Rails.application.require_environment!
|
19
29
|
end
|
20
30
|
end
|
@@ -17,7 +17,7 @@ module Rails
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def edit
|
20
|
-
|
20
|
+
require_application!
|
21
21
|
|
22
22
|
ensure_editor_available(command: "bin/rails credentials:edit") || (return)
|
23
23
|
ensure_master_key_has_been_added if Rails.application.credentials.key.nil?
|
@@ -31,7 +31,7 @@ module Rails
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def show
|
34
|
-
|
34
|
+
require_application!
|
35
35
|
|
36
36
|
say Rails.application.credentials.read.presence || missing_credentials_message
|
37
37
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
=== Storing Encrypted Files in Source Control
|
2
|
+
|
3
|
+
The Rails `encrypted` commands provide access to encrypted files or configurations.
|
4
|
+
See the `Rails.application.encrypted` documentation for using them in your app.
|
5
|
+
|
6
|
+
=== Encryption Keys
|
7
|
+
|
8
|
+
By default, Rails looks for the encryption key in `config/master.key` or
|
9
|
+
`ENV["RAILS_MASTER_KEY"]`, but that lookup can be overriden with `--key`:
|
10
|
+
|
11
|
+
rails encrypted:edit config/encrypted_file.yml.enc --key config/encrypted_file.key
|
12
|
+
|
13
|
+
Don't commit the key! Add it to your source control's ignore file. If you use
|
14
|
+
Git, Rails handles this for you.
|
15
|
+
|
16
|
+
=== Editing Files
|
17
|
+
|
18
|
+
To edit or create an encrypted file use:
|
19
|
+
|
20
|
+
rails encrypted:edit config/encrypted_file.yml.enc
|
21
|
+
|
22
|
+
This opens a temporary file in `$EDITOR` with the decrypted contents for editing.
|
23
|
+
|
24
|
+
=== Viewing Files
|
25
|
+
|
26
|
+
To print the decrypted contents of an encrypted file use:
|
27
|
+
|
28
|
+
rails encrypted:show config/encrypted_file.yml.enc
|
data/lib/rails/engine.rb
CHANGED
@@ -548,7 +548,7 @@ module Rails
|
|
548
548
|
# Blog::Engine.load_seed
|
549
549
|
def load_seed
|
550
550
|
seed_file = paths["db/seeds.rb"].existent.first
|
551
|
-
load(seed_file) if seed_file
|
551
|
+
with_inline_jobs { load(seed_file) } if seed_file
|
552
552
|
end
|
553
553
|
|
554
554
|
# Add configured load paths to Ruby's load path, and remove duplicate entries.
|
@@ -658,6 +658,18 @@ module Rails
|
|
658
658
|
end
|
659
659
|
end
|
660
660
|
|
661
|
+
def with_inline_jobs
|
662
|
+
queue_adapter = config.active_job.queue_adapter
|
663
|
+
ActiveSupport.on_load(:active_job) do
|
664
|
+
self.queue_adapter = :inline
|
665
|
+
end
|
666
|
+
yield
|
667
|
+
ensure
|
668
|
+
ActiveSupport.on_load(:active_job) do
|
669
|
+
self.queue_adapter = queue_adapter
|
670
|
+
end
|
671
|
+
end
|
672
|
+
|
661
673
|
def has_migrations?
|
662
674
|
paths["db/migrate"].existent.any?
|
663
675
|
end
|
data/lib/rails/gem_version.rb
CHANGED
@@ -45,6 +45,7 @@ group :development, :test do
|
|
45
45
|
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
|
46
46
|
end
|
47
47
|
|
48
|
+
<% end -%>
|
48
49
|
group :development do
|
49
50
|
<%- unless options.api? -%>
|
50
51
|
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
@@ -75,7 +76,6 @@ group :test do
|
|
75
76
|
gem 'chromedriver-helper'
|
76
77
|
end
|
77
78
|
<%- end -%>
|
78
|
-
<% end -%>
|
79
79
|
|
80
80
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
81
81
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
@@ -16,8 +16,12 @@ class <%= class_name.pluralize %>Test < ApplicationSystemTestCase
|
|
16
16
|
click_on "New <%= class_name.titleize %>"
|
17
17
|
|
18
18
|
<%- attributes_hash.each do |attr, value| -%>
|
19
|
+
<%- if boolean?(attr) -%>
|
20
|
+
check "<%= attr.humanize %>" if <%= value %>
|
21
|
+
<%- else -%>
|
19
22
|
fill_in "<%= attr.humanize %>", with: <%= value %>
|
20
23
|
<%- end -%>
|
24
|
+
<%- end -%>
|
21
25
|
click_on "Create <%= human_name %>"
|
22
26
|
|
23
27
|
assert_text "<%= human_name %> was successfully created"
|
@@ -29,8 +33,12 @@ class <%= class_name.pluralize %>Test < ApplicationSystemTestCase
|
|
29
33
|
click_on "Edit", match: :first
|
30
34
|
|
31
35
|
<%- attributes_hash.each do |attr, value| -%>
|
36
|
+
<%- if boolean?(attr) -%>
|
37
|
+
check "<%= attr.humanize %>" if <%= value %>
|
38
|
+
<%- else -%>
|
32
39
|
fill_in "<%= attr.humanize %>", with: <%= value %>
|
33
40
|
<%- end -%>
|
41
|
+
<%- end -%>
|
34
42
|
click_on "Update <%= human_name %>"
|
35
43
|
|
36
44
|
assert_text "<%= human_name %> was successfully updated"
|
data/lib/rails/tasks/yarn.rake
CHANGED
@@ -6,8 +6,7 @@ namespace :yarn do
|
|
6
6
|
# Install only production deps when for not usual envs.
|
7
7
|
valid_node_envs = %w[test development production]
|
8
8
|
node_env = ENV.fetch("NODE_ENV") do
|
9
|
-
|
10
|
-
valid_node_envs.include?(rails_env) ? rails_env : "production"
|
9
|
+
valid_node_envs.include?(Rails.env) ? Rails.env : "production"
|
11
10
|
end
|
12
11
|
system({ "NODE_ENV" => node_env }, "./bin/yarn install --no-progress")
|
13
12
|
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: 5.2.
|
4
|
+
version: 5.2.3.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-22 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: 5.2.
|
19
|
+
version: 5.2.3.rc1
|
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: 5.2.
|
26
|
+
version: 5.2.3.rc1
|
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: 5.2.
|
33
|
+
version: 5.2.3.rc1
|
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: 5.2.
|
40
|
+
version: 5.2.3.rc1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,14 +92,14 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 5.2.
|
95
|
+
version: 5.2.3.rc1
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 5.2.
|
102
|
+
version: 5.2.3.rc1
|
103
103
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
104
104
|
email: david@loudthinking.com
|
105
105
|
executables:
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- lib/rails/commands/credentials/credentials_command.rb
|
144
144
|
- lib/rails/commands/dbconsole/dbconsole_command.rb
|
145
145
|
- lib/rails/commands/destroy/destroy_command.rb
|
146
|
+
- lib/rails/commands/encrypted/USAGE
|
146
147
|
- lib/rails/commands/encrypted/encrypted_command.rb
|
147
148
|
- lib/rails/commands/generate/generate_command.rb
|
148
149
|
- lib/rails/commands/help/USAGE
|
@@ -421,8 +422,8 @@ homepage: http://rubyonrails.org
|
|
421
422
|
licenses:
|
422
423
|
- MIT
|
423
424
|
metadata:
|
424
|
-
source_code_uri: https://github.com/rails/rails/tree/v5.2.
|
425
|
-
changelog_uri: https://github.com/rails/rails/blob/v5.2.
|
425
|
+
source_code_uri: https://github.com/rails/rails/tree/v5.2.3.rc1/railties
|
426
|
+
changelog_uri: https://github.com/rails/rails/blob/v5.2.3.rc1/railties/CHANGELOG.md
|
426
427
|
post_install_message:
|
427
428
|
rdoc_options:
|
428
429
|
- "--exclude"
|
@@ -436,9 +437,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
436
437
|
version: 2.2.2
|
437
438
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
438
439
|
requirements:
|
439
|
-
- - "
|
440
|
+
- - ">"
|
440
441
|
- !ruby/object:Gem::Version
|
441
|
-
version:
|
442
|
+
version: 1.3.1
|
442
443
|
requirements: []
|
443
444
|
rubygems_version: 3.0.1
|
444
445
|
signing_key:
|