rails 4.2.4 → 4.2.5.rc1

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
2
  SHA1:
3
- metadata.gz: 381fcfe9cb7ab7f5715e6be32e8e2cbca389b6c7
4
- data.tar.gz: 32223b7404d86143e7087623b2b3788596cfb857
3
+ metadata.gz: 841428517a8ffeeec240d89aa23e54c98d62f197
4
+ data.tar.gz: 8ffde0adc281b96c672244a5830cc469d46300cc
5
5
  SHA512:
6
- metadata.gz: 61fcaead99f7135a42959e8439f485f56d829f5b60340b659c5da0b5ee68eff1dae17364acb28cf3cf20ca0abd1429a657dfe637b46a3233a34af679f069ecd4
7
- data.tar.gz: 1b75679287fe4cd72c409147c7a37fdb9f71a2eaa6bb9daecbb8cf088f2db217ef01770d75754f09283f20cbfdc885d71174f1f46fe9ff174a01b7deeb2e845f
6
+ metadata.gz: 3dd790267fe651b97ed51c3470b878815746f52667ec312b9148d96d0d1878bfe7388ef2e08cb4b3f009583e96cadf9671e0cc2dbac8ff3026910f60df73ab32
7
+ data.tar.gz: 8e1ca6a687544b79fe266fc677f0e52ca7c1f175d1556613f82723b6d082294ff5ae8a8624eb876ed8a139ab2c050731b25580f206727efc680689299a5bbbb7
@@ -1,3 +1,8 @@
1
+ ## Rails 4.2.5.rc1 (October 30, 2015) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 4.2.4 (August 24, 2015) ##
2
7
 
3
8
  * No Changes *
@@ -15,5 +15,9 @@
15
15
  </p>
16
16
  <% end %>
17
17
  <p>
18
- The guides for earlier releases: <a href="http://guides.rubyonrails.org/v4.1.8/">Rails 4.1.8</a>, <a href="http://guides.rubyonrails.org/v4.0.12/">Rails 4.0.12</a>, <a href="http://guides.rubyonrails.org/v3.2.21/">Rails 3.2.21</a> and <a href="http://guides.rubyonrails.org/v2.3.11/">Rails 2.3.11</a>.
18
+ The guides for earlier releases:
19
+ <a href="http://guides.rubyonrails.org/v4.1/">Rails 4.1</a>,
20
+ <a href="http://guides.rubyonrails.org/v4.0/">Rails 4.0</a>,
21
+ <a href="http://guides.rubyonrails.org/v3.2/">Rails 3.2</a>, and
22
+ <a href="http://guides.rubyonrails.org/v2.3/">Rails 2.3</a>.
19
23
  </p>
@@ -65,33 +65,41 @@ Here's what a job looks like:
65
65
  class GuestsCleanupJob < ActiveJob::Base
66
66
  queue_as :default
67
67
 
68
- def perform(*args)
68
+ def perform(*guests)
69
69
  # Do something later
70
70
  end
71
71
  end
72
72
  ```
73
73
 
74
+ Note that you can define `perform` with as many arguments as you want.
75
+
74
76
  ### Enqueue the Job
75
77
 
76
78
  Enqueue a job like so:
77
79
 
78
80
  ```ruby
79
- # Enqueue a job to be performed as soon the queueing system is free.
80
- MyJob.perform_later record
81
+ # Enqueue a job to be performed as soon the queuing system is
82
+ # free.
83
+ GuestsCleanupJob.perform_later guest
81
84
  ```
82
85
 
83
86
  ```ruby
84
87
  # Enqueue a job to be performed tomorrow at noon.
85
- MyJob.set(wait_until: Date.tomorrow.noon).perform_later(record)
88
+ GuestsCleanupJob.set(wait_until: Date.tomorrow.noon).perform_later(guest)
86
89
  ```
87
90
 
88
91
  ```ruby
89
92
  # Enqueue a job to be performed 1 week from now.
90
- MyJob.set(wait: 1.week).perform_later(record)
93
+ GuestsCleanupJob.set(wait: 1.week).perform_later(guest)
91
94
  ```
92
95
 
93
- That's it!
96
+ ```ruby
97
+ # `perform_now` and `perform_later` will call `perform` under the hood so
98
+ # you can pass as many arguments as defined in the latter.
99
+ GuestsCleanupJob.perform_later(guest1, guest2, filter: 'some_filter')
100
+ ```
94
101
 
102
+ That's it!
95
103
 
96
104
  Job Execution
97
105
  -------------
@@ -332,8 +332,6 @@ User.find_each(start: 2000, batch_size: 5000) do |user|
332
332
  end
333
333
  ```
334
334
 
335
- Another example would be if you wanted multiple workers handling the same processing queue. You could have each worker handle 10000 records by setting the appropriate `:start` option on each worker.
336
-
337
335
  #### `find_in_batches`
338
336
 
339
337
  The `find_in_batches` method is similar to `find_each`, since both retrieve batches of records. The difference is that `find_in_batches` yields _batches_ to the block as an array of models, instead of individually. The following example will yield to the supplied block an array of up to 1000 invoices at a time, with the final block containing any remaining invoices:
@@ -1027,7 +1027,7 @@ NOTE. If you are running in a multi-threaded environment, there could be a chanc
1027
1027
  Custom configuration
1028
1028
  --------------------
1029
1029
 
1030
- You can configure your own code through the Rails configuration object with custom configuration. It works like this:
1030
+ You can configure your own code through the Rails configuration object with custom configuration under the `config.x` property. It works like this:
1031
1031
 
1032
1032
  ```ruby
1033
1033
  config.x.payment_processing.schedule = :daily
@@ -1043,3 +1043,30 @@ These configuration points are then available through the configuration object:
1043
1043
  Rails.configuration.x.super_debugger # => true
1044
1044
  Rails.configuration.x.super_debugger.not_set # => nil
1045
1045
  ```
1046
+
1047
+ You can also use Rails::Application.config_for to load whole configuration files:
1048
+
1049
+ ```ruby
1050
+ # config/payment.yml:
1051
+ production:
1052
+ environment: production
1053
+ merchant_id: production_merchant_id
1054
+ public_key: production_public_key
1055
+ private_key: production_private_key
1056
+ development:
1057
+ environment: sandbox
1058
+ merchant_id: development_merchant_id
1059
+ public_key: development_public_key
1060
+ private_key: development_private_key
1061
+
1062
+ # config/application.rb
1063
+ module MyApp
1064
+ class Application < Rails::Application
1065
+ config.x.payment = Rails.application.config_for(:payment)
1066
+ end
1067
+ end
1068
+ ```
1069
+
1070
+ ```ruby
1071
+ Rails.configuration.x.payment.merchant_id # => production_merchant_id or development_merchant_id
1072
+ ```
@@ -699,7 +699,7 @@ The log files on www.attacker.com will read like this:
699
699
  GET http://www.attacker.com/_app_session=836c1c25278e5b321d6bea4f19cb57e2
700
700
  ```
701
701
 
702
- You can mitigate these attacks (in the obvious way) by adding the [httpOnly](http://dev.rubyonrails.org/ticket/8895) flag to cookies, so that document.cookie may not be read by JavaScript. Http only cookies can be used from IE v6.SP1, Firefox v2.0.0.5 and Opera 9.5. Safari is still considering, it ignores the option. But other, older browsers (such as WebTV and IE 5.5 on Mac) can actually cause the page to fail to load. Be warned that cookies [will still be visible using Ajax](http://ha.ckers.org/blog/20070719/firefox-implements-httponly-and-is-vulnerable-to-xmlhttprequest/), though.
702
+ You can mitigate these attacks (in the obvious way) by adding the **httpOnly** flag to cookies, so that document.cookie may not be read by JavaScript. Http only cookies can be used from IE v6.SP1, Firefox v2.0.0.5 and Opera 9.5. Safari is still considering, it ignores the option. But other, older browsers (such as WebTV and IE 5.5 on Mac) can actually cause the page to fail to load. Be warned that cookies [will still be visible using Ajax](https://www.owasp.org/index.php/HTTPOnly#Browsers_Supporting_HttpOnly), though.
703
703
 
704
704
  ##### Defacement
705
705
 
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
4
+ version: 4.2.5.rc1
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-08-24 00:00:00.000000000 Z
11
+ date: 2015-10-30 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.4
19
+ version: 4.2.5.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: 4.2.4
26
+ version: 4.2.5.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: 4.2.4
33
+ version: 4.2.5.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: 4.2.4
40
+ version: 4.2.5.rc1
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.4
47
+ version: 4.2.5.rc1
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.4
54
+ version: 4.2.5.rc1
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.4
61
+ version: 4.2.5.rc1
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.4
68
+ version: 4.2.5.rc1
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.4
75
+ version: 4.2.5.rc1
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.4
82
+ version: 4.2.5.rc1
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.4
89
+ version: 4.2.5.rc1
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.4
96
+ version: 4.2.5.rc1
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.4
103
+ version: 4.2.5.rc1
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.4
110
+ version: 4.2.5.rc1
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.4
117
+ version: 4.2.5.rc1
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.4
124
+ version: 4.2.5.rc1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -400,9 +400,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
400
400
  version: 1.8.11
401
401
  requirements: []
402
402
  rubyforge_project:
403
- rubygems_version: 2.4.7
403
+ rubygems_version: 2.4.5.1
404
404
  signing_key:
405
405
  specification_version: 4
406
406
  summary: Full-stack web application framework.
407
407
  test_files: []
408
- has_rdoc: