rails 4.2.5 → 4.2.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: be002b98a2d58e6a19c0c5c2ac03b1ac5cc20d71
4
- data.tar.gz: b2884ec0971314e208cffd2e2067acf56927755f
2
+ SHA256:
3
+ metadata.gz: 4102988547e646fdb3241e16210ae1facf8e3d894c36e2b1deff16131fc41e35
4
+ data.tar.gz: 15db282a7d3be7e7384a7c5adbea7f1e15c7f2ebc08e52dbcb98ebf68a9187ee
5
5
  SHA512:
6
- metadata.gz: faaa2c522dde816300a9f8ff6a725af82affa9ad8614bf9cf4b3095ce3b6165dcbd935b9f625acbfdbc16cd9f8cb8cefc0a905490f4d290eec7c194b988da024
7
- data.tar.gz: 5c3e9c862fbe3b2625580914207155ee92d41f4a87240df657818fcbee00d1c0be8a69c143320011bb66242cd066890eb9640d243adbf2855fb8122dc609c0c6
6
+ metadata.gz: '03397d1bec513121e4b39de380eda105ca1a040c13cdede32a46b49fcc1c69a18b274429bec9ebd017513fa14f83b1bd9c4ff092baa7deb3874f6b779aec37f9'
7
+ data.tar.gz: bce9f9aec430af1a231ca61323b8893022c04a225a24b0564750c8387b67bdfc542892dde397bb641d0ee4e4ef6c9620b5e7af92e063f2e81463bbd7fd8401a8
data/guides/CHANGELOG.md CHANGED
@@ -1,3 +1,48 @@
1
+ ## Rails 4.2.11.1 (March 11, 2019) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 4.2.11 (November 27, 2018) ##
7
+
8
+ * No changes.
9
+
10
+
11
+ ## Rails 4.2.10 (September 27, 2017) ##
12
+
13
+ * No changes.
14
+
15
+
16
+ ## Rails 4.2.9 (June 26, 2017) ##
17
+
18
+ * No changes.
19
+
20
+
21
+ ## Rails 4.2.8 (February 21, 2017) ##
22
+
23
+ * No changes.
24
+
25
+
26
+ ## Rails 4.2.7 (July 12, 2016) ##
27
+
28
+ * No changes.
29
+
30
+
31
+ ## Rails 4.2.6 (March 07, 2016) ##
32
+
33
+ * No changes.
34
+
35
+
36
+ ## Rails 4.2.5.2 (February 26, 2016) ##
37
+
38
+ * No changes.
39
+
40
+
41
+ ## Rails 4.2.5.1 (January 25, 2016) ##
42
+
43
+ * No changes.
44
+
45
+
1
46
  ## Rails 4.2.5 (November 12, 2015) ##
2
47
 
3
48
  * No changes.
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
- "Fixnum".constantize # => Fixnum
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
- "Fixnum" => "integer",
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 a fixnum is even or odd.
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 (if
438
- `Rails.application.config.assets.compress` is true). By serving one file rather
439
- than many, the load time of pages can be greatly reduced because the browser
440
- makes fewer requests. Compression also reduces file size, enabling the
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
@@ -169,7 +169,7 @@ class CreateCustomers < ActiveRecord::Migration
169
169
  end
170
170
 
171
171
  create_table :orders do |t|
172
- t.belongs_to :customer, index:true
172
+ t.belongs_to :customer, index: true
173
173
  t.datetime :order_date
174
174
  t.timestamps null: false
175
175
  end
@@ -33,7 +33,7 @@ In general, the work of configuring Rails means configuring the components of Ra
33
33
  For example, the `config/application.rb` file includes this setting:
34
34
 
35
35
  ```ruby
36
- config.autoload_paths += %W(#{config.root}/extras)
36
+ config.time_zone = 'Central Time (US & Canada)'
37
37
  ```
38
38
 
39
39
  This is a setting for Rails itself. If you want to pass settings to individual Rails components, you can do so via the same `config` object in `config/application.rb`:
@@ -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.
@@ -1062,11 +1060,11 @@ You can also use Rails::Application.config_for to load whole configuration files
1062
1060
  # config/application.rb
1063
1061
  module MyApp
1064
1062
  class Application < Rails::Application
1065
- config.x.payment = Rails.application.config_for(:payment)
1063
+ config.x.payment = config_for(:payment)
1066
1064
  end
1067
1065
  end
1068
1066
  ```
1069
1067
 
1070
1068
  ```ruby
1071
- Rails.configuration.x.payment.merchant_id # => production_merchant_id or development_merchant_id
1069
+ Rails.configuration.x.payment['merchant_id'] # => production_merchant_id or development_merchant_id
1072
1070
  ```
@@ -119,11 +119,11 @@ Contributing to the Rails Documentation
119
119
  Ruby on Rails has two main sets of documentation: the guides, which help you
120
120
  learn about Ruby on Rails, and the API, which serves as a reference.
121
121
 
122
- You can help improve the Rails guides by making them more coherent, consistent or readable, adding missing information, correcting factual errors, fixing typos, or bringing it up to date with the latest edge Rails. To get involved in the translation of Rails guides, please see [Translating Rails Guides](https://wiki.github.com/rails/docrails/translating-rails-guides).
122
+ You can help improve the Rails guides by making them more coherent, consistent or readable, adding missing information, correcting factual errors, fixing typos, or bringing it up to date with the latest edge Rails.
123
123
 
124
124
  You can either open a pull request to [Rails](http://github.com/rails/rails) or
125
125
  ask the [Rails core team](http://rubyonrails.org/core) for commit access on
126
- [docrails](http://github.com/rails/docrails) if you contribute regularly.
126
+ docrails if you contribute regularly.
127
127
  Please do not open pull requests in docrails, if you'd like to get feedback on your
128
128
  change, ask for it in [Rails](http://github.com/rails/rails) instead.
129
129
 
@@ -29,14 +29,11 @@
29
29
  More Ruby on Rails
30
30
  </span>
31
31
  <ul class="more-info-links s-hidden">
32
- <li class="more-info"><a href="http://rubyonrails.org/">Overview</a></li>
33
- <li class="more-info"><a href="http://rubyonrails.org/download">Download</a></li>
34
- <li class="more-info"><a href="http://rubyonrails.org/deploy">Deploy</a></li>
35
- <li class="more-info"><a href="https://github.com/rails/rails">Code</a></li>
36
- <li class="more-info"><a href="http://rubyonrails.org/screencasts">Screencasts</a></li>
37
- <li class="more-info"><a href="http://rubyonrails.org/documentation">Documentation</a></li>
38
- <li class="more-info"><a href="http://rubyonrails.org/community">Community</a></li>
39
32
  <li class="more-info"><a href="http://weblog.rubyonrails.org/">Blog</a></li>
33
+ <li class="more-info"><a href="http://guides.rubyonrails.org/">Guides</a></li>
34
+ <li class="more-info"><a href="http://api.rubyonrails.org/">API</a></li>
35
+ <li class="more-info"><a href="http://stackoverflow.com/questions/tagged/ruby-on-rails">Ask for help</a></li>
36
+ <li class="more-info"><a href="https://github.com/rails/rails">Contribute on GitHub</a></li>
40
37
  </ul>
41
38
  </div>
42
39
  </div>
@@ -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 (perhaps you're sharing views between two Rails applications):
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 to the view that you're using to render the content.
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 render a file, because Windows filenames do not have the same format as Unix filenames.
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
  ```
@@ -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
- When you generated your mailer, the generator creates stub fixtures for each of the mailers actions. If you didn't use the generator you'll have to make those files yourself.
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 `Fixnum` 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.
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.5
4
+ version: 4.2.11.1
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: 2015-11-12 00:00:00.000000000 Z
11
+ date: 2019-03-11 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.5
19
+ version: 4.2.11.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: 4.2.5
26
+ version: 4.2.11.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: 4.2.5
33
+ version: 4.2.11.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: 4.2.5
40
+ version: 4.2.11.1
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.5
47
+ version: 4.2.11.1
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.5
54
+ version: 4.2.11.1
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.5
61
+ version: 4.2.11.1
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.5
68
+ version: 4.2.11.1
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.5
75
+ version: 4.2.11.1
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.5
82
+ version: 4.2.11.1
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.5
89
+ version: 4.2.11.1
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.5
96
+ version: 4.2.11.1
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.5
103
+ version: 4.2.11.1
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.5
110
+ version: 4.2.11.1
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.5
117
+ version: 4.2.11.1
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.5
124
+ version: 4.2.11.1
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
- rubyforge_project:
403
- rubygems_version: 2.4.5.1
402
+ rubygems_version: 3.0.1
404
403
  signing_key:
405
404
  specification_version: 4
406
405
  summary: Full-stack web application framework.