actionpack 4.2.0.rc3 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of actionpack might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e664089bdc097b2a9f2563431410705affad87d
4
- data.tar.gz: 941dd3450cc055710bc47ee298f49f7af27ab0b4
3
+ metadata.gz: db3b1d94aec02f7ed76183b903787e5bd9bfca02
4
+ data.tar.gz: 3ef6b6441b9d2a59410bc8c225370101c99fcedb
5
5
  SHA512:
6
- metadata.gz: 24aa98e6549f03e2b61df5d4c3e2b1a0321a44cd0212507d560037dcde5511d3e3c1192be7d9b2bfec97e389016a6cba4618ee82a8a0a695f6b71081771c9cfa
7
- data.tar.gz: 5e99178370712d5c1de763d402f1cb8aa5569fecc85abe3b2a432c70d61908c7d13393bb1d32e3158b6fbf4afb5e00b09fa1f1589060df85c8cb94b22c28e6d6
6
+ metadata.gz: a57950149ec89fc35ec8d6ae35668b6fd03185873aeb017ead0525394909b2823eef67cf423d16832efe15e05f85114f6f2ba4e017cc773c9d82a2389fcdfb76
7
+ data.tar.gz: 3125bff973091c0c917eb736594b9fd657898c2db3b3cf0e5d1a5693a732beabb227b29fd418d688920193adbe2c3b2c13497b33ddaadbf178b6e564bec6d2a0
@@ -209,6 +209,7 @@ module ActionController #:nodoc:
209
209
  forgery_protection_strategy.new(self).handle_unverified_request
210
210
  end
211
211
 
212
+ #:nodoc:
212
213
  CROSS_ORIGIN_JAVASCRIPT_WARNING = "Security warning: an embedded " \
213
214
  "<script> tag on another site requested protected JavaScript. " \
214
215
  "If you know what you're doing, go ahead and disable forgery " \
@@ -92,7 +92,11 @@ module ActionController
92
92
  # params.permit(:c)
93
93
  # # => ActionController::UnpermittedParameters: found unpermitted keys: a, b
94
94
  #
95
- # <tt>ActionController::Parameters</tt> is inherited from
95
+ # Please note that these options *are not thread-safe*. In a multi-threaded
96
+ # environment they should only be set once at boot-time and never mutated at
97
+ # runtime.
98
+ #
99
+ # <tt>ActionController::Parameters</tt> inherits from
96
100
  # <tt>ActiveSupport::HashWithIndifferentAccess</tt>, this means
97
101
  # that you can fetch values using either <tt>:key</tt> or <tt>"key"</tt>.
98
102
  #
@@ -100,6 +104,7 @@ module ActionController
100
104
  # params[:key] # => "value"
101
105
  # params["key"] # => "value"
102
106
  class Parameters < ActiveSupport::HashWithIndifferentAccess
107
+ cattr_accessor :permit_all_parameters, instance_accessor: false
103
108
  cattr_accessor :action_on_unpermitted_parameters, instance_accessor: false
104
109
 
105
110
  # By default, never raise an UnpermittedParameters exception if these
@@ -122,16 +127,6 @@ module ActionController
122
127
  always_permitted_parameters
123
128
  end
124
129
 
125
- # Returns the value of +permit_all_parameters+.
126
- def self.permit_all_parameters
127
- Thread.current[:action_controller_permit_all_parameters]
128
- end
129
-
130
- # Sets the value of +permit_all_parameters+.
131
- def self.permit_all_parameters=(value)
132
- Thread.current[:action_controller_permit_all_parameters] = value
133
- end
134
-
135
130
  # Returns a new instance of <tt>ActionController::Parameters</tt>.
136
131
  # Also, sets the +permitted+ attribute to the default value of
137
132
  # <tt>ActionController::Parameters.permit_all_parameters</tt>.
@@ -72,11 +72,12 @@ module ActionDispatch
72
72
  end
73
73
  end
74
74
  end
75
+
75
76
  # Sets the \variant for template.
76
77
  def variant=(variant)
77
78
  if variant.is_a?(Symbol)
78
79
  @variant = [variant]
79
- elsif variant.is_a?(Array) && variant.any? && variant.all?{ |v| v.is_a?(Symbol) }
80
+ elsif variant.nil? || variant.is_a?(Array) && variant.any? && variant.all?{ |v| v.is_a?(Symbol) }
80
81
  @variant = variant
81
82
  else
82
83
  raise ArgumentError, "request.variant must be set to a Symbol or an Array of Symbols, not a #{variant.class}. " \
@@ -8,7 +8,7 @@ module ActionPack
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
10
  TINY = 0
11
- PRE = "rc3"
11
+ PRE = nil
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.rc3
4
+ version: 4.2.0
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: 2014-12-13 00:00:00.000000000 Z
11
+ date: 2014-12-20 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: 4.2.0.rc3
19
+ version: 4.2.0
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.0.rc3
26
+ version: 4.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.6.0.beta2
33
+ version: 1.6.0
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: 1.6.0.beta2
40
+ version: 1.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack-test
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -98,28 +98,28 @@ dependencies:
98
98
  requirements:
99
99
  - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: 4.2.0.rc3
101
+ version: 4.2.0
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - '='
107
107
  - !ruby/object:Gem::Version
108
- version: 4.2.0.rc3
108
+ version: 4.2.0
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: activemodel
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - '='
114
114
  - !ruby/object:Gem::Version
115
- version: 4.2.0.rc3
115
+ version: 4.2.0
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - '='
121
121
  - !ruby/object:Gem::Version
122
- version: 4.2.0.rc3
122
+ version: 4.2.0
123
123
  description: Web apps on Rails. Simple, battle-tested conventions for building and
124
124
  testing MVC web applications. Works with any Rack-compatible server.
125
125
  email: david@loudthinking.com
@@ -294,9 +294,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
294
294
  version: 1.9.3
295
295
  required_rubygems_version: !ruby/object:Gem::Requirement
296
296
  requirements:
297
- - - ">"
297
+ - - ">="
298
298
  - !ruby/object:Gem::Version
299
- version: 1.3.1
299
+ version: '0'
300
300
  requirements:
301
301
  - none
302
302
  rubyforge_project: