rails 4.2.6 → 4.2.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/guides/CHANGELOG.md +41 -1
- data/guides/Rakefile +16 -3
- data/guides/source/active_support_core_extensions.md +2 -3
- data/guides/source/api_documentation_guidelines.md +1 -1
- data/guides/source/asset_pipeline.md +5 -5
- data/guides/source/association_basics.md +1 -1
- data/guides/source/configuring.md +0 -2
- data/guides/source/layouts_and_rendering.md +8 -9
- data/guides/source/rails_on_rack.md +0 -1
- data/guides/source/testing.md +1 -1
- data/guides/source/upgrading_ruby_on_rails.md +1 -1
- metadata +19 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d4073c294efe444213b93605bd058bdfcfe7fd21df0673d411aaacb8444d6311
|
4
|
+
data.tar.gz: 6ced0776f690d103fd1ae235809fe9244f59538b6153c5f75247e76a35c9f600
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e399f8b1df884ceb451de70d9e0a821f1a0c4621eb7ee8af0e9fdc1a955661aab731e6b9a7b3928f09d2a86d492ec737f5c488709d2ba734cbb9a42a1ef5e829
|
7
|
+
data.tar.gz: d302ab1709953482477f8ca896e45e54d69c8dcc16edf1f49e09ce1c8b451d0a1725baf3d3c7a2b138b97ca0018813e2cf907db01768188a8a025e68c4679b16
|
data/guides/CHANGELOG.md
CHANGED
@@ -1,3 +1,43 @@
|
|
1
|
+
## Rails 4.2.11.3 (May 15, 2020) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 4.2.11.2 (May 15, 2020) ##
|
7
|
+
|
8
|
+
* No changes.
|
9
|
+
|
10
|
+
|
11
|
+
## Rails 4.2.11.1 (March 11, 2019) ##
|
12
|
+
|
13
|
+
* No changes.
|
14
|
+
|
15
|
+
|
16
|
+
## Rails 4.2.11 (November 27, 2018) ##
|
17
|
+
|
18
|
+
* No changes.
|
19
|
+
|
20
|
+
|
21
|
+
## Rails 4.2.10 (September 27, 2017) ##
|
22
|
+
|
23
|
+
* No changes.
|
24
|
+
|
25
|
+
|
26
|
+
## Rails 4.2.9 (June 26, 2017) ##
|
27
|
+
|
28
|
+
* No changes.
|
29
|
+
|
30
|
+
|
31
|
+
## Rails 4.2.8 (February 21, 2017) ##
|
32
|
+
|
33
|
+
* No changes.
|
34
|
+
|
35
|
+
|
36
|
+
## Rails 4.2.7 (July 12, 2016) ##
|
37
|
+
|
38
|
+
* No changes.
|
39
|
+
|
40
|
+
|
1
41
|
## Rails 4.2.6 (March 07, 2016) ##
|
2
42
|
|
3
43
|
* No changes.
|
@@ -8,7 +48,7 @@
|
|
8
48
|
* No changes.
|
9
49
|
|
10
50
|
|
11
|
-
## Rails 4.2.5.1 (January 25,
|
51
|
+
## Rails 4.2.5.1 (January 25, 2016) ##
|
12
52
|
|
13
53
|
* No changes.
|
14
54
|
|
data/guides/Rakefile
CHANGED
@@ -3,16 +3,29 @@ namespace :guides do
|
|
3
3
|
desc 'Generate guides (for authors), use ONLY=foo to process just "foo.md"'
|
4
4
|
task :generate => 'generate:html'
|
5
5
|
|
6
|
+
# Guides are written in UTF-8, but the environment may be configured for some
|
7
|
+
# other locale, these tasks are responsible for ensuring the default external
|
8
|
+
# encoding is UTF-8.
|
9
|
+
#
|
10
|
+
# Real use cases: Generation was reported to fail on a machine configured with
|
11
|
+
# GBK (Chinese). The docs server once got misconfigured somehow and had "C",
|
12
|
+
# which broke generation too.
|
13
|
+
task :encoding do
|
14
|
+
%w(LANG LANGUAGE LC_ALL).each do |env_var|
|
15
|
+
ENV[env_var] = "en_US.UTF-8"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
6
19
|
namespace :generate do
|
7
20
|
|
8
21
|
desc "Generate HTML guides"
|
9
|
-
task :html do
|
22
|
+
task :html => :encoding do
|
10
23
|
ENV["WARN_BROKEN_LINKS"] = "1" # authors can't disable this
|
11
24
|
ruby "rails_guides.rb"
|
12
25
|
end
|
13
26
|
|
14
27
|
desc "Generate .mobi file. The kindlegen executable must be in your PATH. You can get it for free from http://www.amazon.com/kindlepublishing"
|
15
|
-
task :kindle do
|
28
|
+
task :kindle => :encoding do
|
16
29
|
unless `kindlerb -v 2> /dev/null` =~ /kindlerb 0.1.1/
|
17
30
|
abort "Please `gem install kindlerb` and make sure you have `kindlegen` in your PATH"
|
18
31
|
end
|
@@ -26,7 +39,7 @@ namespace :guides do
|
|
26
39
|
|
27
40
|
# Validate guides -------------------------------------------------------------------------
|
28
41
|
desc 'Validate guides, use ONLY=foo to process just "foo.html"'
|
29
|
-
task :validate do
|
42
|
+
task :validate => :encoding do
|
30
43
|
ruby "w3c_validator.rb"
|
31
44
|
end
|
32
45
|
|
@@ -1760,7 +1760,7 @@ NOTE: Defined in `active_support/core_ext/string/inflections.rb`.
|
|
1760
1760
|
The method `constantize` resolves the constant reference expression in its receiver:
|
1761
1761
|
|
1762
1762
|
```ruby
|
1763
|
-
"
|
1763
|
+
"Integer".constantize # => Integer
|
1764
1764
|
|
1765
1765
|
module M
|
1766
1766
|
X = 1
|
@@ -2612,8 +2612,7 @@ To do so, the method loops over the pairs and builds nodes that depend on the _v
|
|
2612
2612
|
```ruby
|
2613
2613
|
XML_TYPE_NAMES = {
|
2614
2614
|
"Symbol" => "symbol",
|
2615
|
-
"
|
2616
|
-
"Bignum" => "integer",
|
2615
|
+
"Integer" => "integer",
|
2617
2616
|
"BigDecimal" => "decimal",
|
2618
2617
|
"Float" => "float",
|
2619
2618
|
"TrueClass" => "boolean",
|
@@ -111,7 +111,7 @@ On the other hand, big chunks of structured documentation may have a separate "E
|
|
111
111
|
The results of expressions follow them and are introduced by "# => ", vertically aligned:
|
112
112
|
|
113
113
|
```ruby
|
114
|
-
# For checking if
|
114
|
+
# For checking if an integer is even or odd.
|
115
115
|
#
|
116
116
|
# 1.even? # => false
|
117
117
|
# 1.odd? # => true
|
@@ -434,11 +434,11 @@ Sprockets uses manifest files to determine which assets to include and serve.
|
|
434
434
|
These manifest files contain _directives_ - instructions that tell Sprockets
|
435
435
|
which files to require in order to build a single CSS or JavaScript file. With
|
436
436
|
these directives, Sprockets loads the files specified, processes them if
|
437
|
-
necessary, concatenates them into one single file and then compresses them
|
438
|
-
`Rails.application.config.assets.
|
439
|
-
than many, the load time of pages can be greatly reduced because
|
440
|
-
makes fewer requests. Compression also reduces file size, enabling
|
441
|
-
browser to download them faster.
|
437
|
+
necessary, concatenates them into one single file and then compresses them
|
438
|
+
(based on value of `Rails.application.config.assets.js_compressor`). By serving
|
439
|
+
one file rather than many, the load time of pages can be greatly reduced because
|
440
|
+
the browser makes fewer requests. Compression also reduces file size, enabling
|
441
|
+
the browser to download them faster.
|
442
442
|
|
443
443
|
|
444
444
|
For example, a new Rails 4 application includes a default
|
@@ -139,8 +139,6 @@ pipeline is enabled. It is set to true by default.
|
|
139
139
|
|
140
140
|
* `config.assets.raise_runtime_errors` Set this flag to `true` to enable additional runtime error checking. Recommended in `config/environments/development.rb` to minimize unexpected behavior when deploying to `production`.
|
141
141
|
|
142
|
-
* `config.assets.compress` a flag that enables the compression of compiled assets. It is explicitly set to true in `config/environments/production.rb`.
|
143
|
-
|
144
142
|
* `config.assets.css_compressor` defines the CSS compressor to use. It is set by default by `sass-rails`. The unique alternative value at the moment is `:yui`, which uses the `yui-compressor` gem.
|
145
143
|
|
146
144
|
* `config.assets.js_compressor` defines the JavaScript compressor to use. Possible values are `:closure`, `:uglifier` and `:yui` which require the use of the `closure-compiler`, `uglifier` or `yui-compressor` gems respectively.
|
@@ -175,23 +175,22 @@ render template: "products/show"
|
|
175
175
|
|
176
176
|
#### Rendering an Arbitrary File
|
177
177
|
|
178
|
-
The `render` method can also use a view that's entirely outside of your application
|
179
|
-
|
180
|
-
```ruby
|
181
|
-
render "/u/apps/warehouse_app/current/app/views/products/show"
|
182
|
-
```
|
183
|
-
|
184
|
-
Rails determines that this is a file render because of the leading slash character. To be explicit, you can use the `:file` option (which was required on Rails 2.2 and earlier):
|
178
|
+
The `render` method can also use a view that's entirely outside of your application:
|
185
179
|
|
186
180
|
```ruby
|
187
181
|
render file: "/u/apps/warehouse_app/current/app/views/products/show"
|
188
182
|
```
|
189
183
|
|
190
|
-
The `:file` option takes an absolute file-system path. Of course, you need to have rights
|
184
|
+
The `:file` option takes an absolute file-system path. Of course, you need to have rights
|
185
|
+
to the view that you're using to render the content.
|
186
|
+
|
187
|
+
NOTE: Using the `:file` option in combination with users input can lead to security problems
|
188
|
+
since an attacker could use this action to access security sensitive files in your file system.
|
191
189
|
|
192
190
|
NOTE: By default, the file is rendered using the current layout.
|
193
191
|
|
194
|
-
TIP: If you're running Rails on Microsoft Windows, you should use the `:file` option to
|
192
|
+
TIP: If you're running Rails on Microsoft Windows, you should use the `:file` option to
|
193
|
+
render a file, because Windows filenames do not have the same format as Unix filenames.
|
195
194
|
|
196
195
|
#### Wrapping it up
|
197
196
|
|
@@ -82,7 +82,6 @@ To use `rackup` instead of Rails' `rails server`, you can put the following insi
|
|
82
82
|
# Rails.root/config.ru
|
83
83
|
require ::File.expand_path('../config/environment', __FILE__)
|
84
84
|
|
85
|
-
use Rails::Rack::Debugger
|
86
85
|
use Rack::ContentLength
|
87
86
|
run Rails.application
|
88
87
|
```
|
data/guides/source/testing.md
CHANGED
@@ -950,7 +950,7 @@ In order to test that your mailer is working as expected, you can use unit tests
|
|
950
950
|
|
951
951
|
For the purposes of unit testing a mailer, fixtures are used to provide an example of how the output _should_ look. Because these are example emails, and not Active Record data like the other fixtures, they are kept in their own subdirectory apart from the other fixtures. The name of the directory within `test/fixtures` directly corresponds to the name of the mailer. So, for a mailer named `UserMailer`, the fixtures should reside in `test/fixtures/user_mailer` directory.
|
952
952
|
|
953
|
-
|
953
|
+
If you generated your mailer, the generator does not create stub fixtures for the mailers actions. You'll have to create those files yourself as described above.
|
954
954
|
|
955
955
|
#### The Basic Test Case
|
956
956
|
|
@@ -793,7 +793,7 @@ Rails 4.0 no longer supports loading plugins from `vendor/plugins`. You must rep
|
|
793
793
|
|
794
794
|
* Rails 4.0 has removed the identity map from Active Record, due to [some inconsistencies with associations](https://github.com/rails/rails/commit/302c912bf6bcd0fa200d964ec2dc4a44abe328a6). If you have manually enabled it in your application, you will have to remove the following config that has no effect anymore: `config.active_record.identity_map`.
|
795
795
|
|
796
|
-
* The `delete` method in collection associations can now receive `
|
796
|
+
* The `delete` method in collection associations can now receive `Integer` or `String` arguments as record ids, besides records, pretty much like the `destroy` method does. Previously it raised `ActiveRecord::AssociationTypeMismatch` for such arguments. From Rails 4.0 on `delete` automatically tries to find the records matching the given ids before deleting them.
|
797
797
|
|
798
798
|
* In Rails 4.0 when a column or a table is renamed the related indexes are also renamed. If you have migrations which rename the indexes, they are no longer needed.
|
799
799
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,112 +16,112 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.2.
|
19
|
+
version: 4.2.11.3
|
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: 4.2.
|
26
|
+
version: 4.2.11.3
|
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: 4.2.
|
33
|
+
version: 4.2.11.3
|
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: 4.2.
|
40
|
+
version: 4.2.11.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: actionview
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.2.
|
47
|
+
version: 4.2.11.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.2.
|
54
|
+
version: 4.2.11.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activemodel
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 4.2.
|
61
|
+
version: 4.2.11.3
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 4.2.
|
68
|
+
version: 4.2.11.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activerecord
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 4.2.
|
75
|
+
version: 4.2.11.3
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 4.2.
|
82
|
+
version: 4.2.11.3
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: actionmailer
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 4.2.
|
89
|
+
version: 4.2.11.3
|
90
90
|
type: :runtime
|
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: 4.2.
|
96
|
+
version: 4.2.11.3
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: activejob
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 4.2.
|
103
|
+
version: 4.2.11.3
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 4.2.
|
110
|
+
version: 4.2.11.3
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: railties
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 4.2.
|
117
|
+
version: 4.2.11.3
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 4.2.
|
124
|
+
version: 4.2.11.3
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: bundler
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -399,8 +399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
399
399
|
- !ruby/object:Gem::Version
|
400
400
|
version: 1.8.11
|
401
401
|
requirements: []
|
402
|
-
|
403
|
-
rubygems_version: 2.5.1
|
402
|
+
rubygems_version: 3.0.3
|
404
403
|
signing_key:
|
405
404
|
specification_version: 4
|
406
405
|
summary: Full-stack web application framework.
|