actionpack 4.2.0.rc2 → 4.2.0.rc3
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/action_controller/metal/strong_parameters.rb +16 -1
- data/lib/action_dispatch/routing/mapper.rb +10 -1
- data/lib/action_pack/gem_version.rb +1 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e664089bdc097b2a9f2563431410705affad87d
|
4
|
+
data.tar.gz: 941dd3450cc055710bc47ee298f49f7af27ab0b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24aa98e6549f03e2b61df5d4c3e2b1a0321a44cd0212507d560037dcde5511d3e3c1192be7d9b2bfec97e389016a6cba4618ee82a8a0a695f6b71081771c9cfa
|
7
|
+
data.tar.gz: 5e99178370712d5c1de763d402f1cb8aa5569fecc85abe3b2a432c70d61908c7d13393bb1d32e3158b6fbf4afb5e00b09fa1f1589060df85c8cb94b22c28e6d6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
* Add `ActionController::Parameters#to_unsafe_h` to return an unfiltered
|
2
|
+
`Hash` representation of Parameters object. This is now a preferred way to
|
3
|
+
retrieve unfiltered parameters as we will stop inheriting `AC::Parameters`
|
4
|
+
object in Rails 5.0.
|
5
|
+
|
6
|
+
*Prem Sichanugrist*
|
7
|
+
|
1
8
|
* Restore handling of a bare `Authorization` header, without `token=`
|
2
9
|
prefix.
|
3
10
|
|
@@ -100,7 +100,6 @@ module ActionController
|
|
100
100
|
# params[:key] # => "value"
|
101
101
|
# params["key"] # => "value"
|
102
102
|
class Parameters < ActiveSupport::HashWithIndifferentAccess
|
103
|
-
cattr_accessor :permit_all_parameters, instance_accessor: false
|
104
103
|
cattr_accessor :action_on_unpermitted_parameters, instance_accessor: false
|
105
104
|
|
106
105
|
# By default, never raise an UnpermittedParameters exception if these
|
@@ -123,6 +122,16 @@ module ActionController
|
|
123
122
|
always_permitted_parameters
|
124
123
|
end
|
125
124
|
|
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
|
+
|
126
135
|
# Returns a new instance of <tt>ActionController::Parameters</tt>.
|
127
136
|
# Also, sets the +permitted+ attribute to the default value of
|
128
137
|
# <tt>ActionController::Parameters.permit_all_parameters</tt>.
|
@@ -163,6 +172,12 @@ module ActionController
|
|
163
172
|
end
|
164
173
|
end
|
165
174
|
|
175
|
+
# Returns an unsafe, unfiltered +Hash+ representation of this parameter.
|
176
|
+
def to_unsafe_h
|
177
|
+
to_hash
|
178
|
+
end
|
179
|
+
alias_method :to_unsafe_hash, :to_unsafe_h
|
180
|
+
|
166
181
|
# Convert all hashes in values into parameters, then yield each pair like
|
167
182
|
# the same way as <tt>Hash#each_pair</tt>
|
168
183
|
def each_pair(&block)
|
@@ -580,7 +580,7 @@ module ActionDispatch
|
|
580
580
|
raise "A rack application must be specified" unless path
|
581
581
|
|
582
582
|
rails_app = rails_app? app
|
583
|
-
options[:as] ||= app
|
583
|
+
options[:as] ||= app_name(app, rails_app)
|
584
584
|
|
585
585
|
target_as = name_for_action(options[:as], path)
|
586
586
|
options[:via] ||= :all
|
@@ -612,6 +612,15 @@ module ActionDispatch
|
|
612
612
|
app.is_a?(Class) && app < Rails::Railtie
|
613
613
|
end
|
614
614
|
|
615
|
+
def app_name(app, rails_app)
|
616
|
+
if rails_app
|
617
|
+
app.railtie_name
|
618
|
+
elsif app.is_a?(Class)
|
619
|
+
class_name = app.name
|
620
|
+
ActiveSupport::Inflector.underscore(class_name).tr("/", "_")
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
615
624
|
def define_generate_prefix(app, name)
|
616
625
|
_route = @set.named_routes.get name
|
617
626
|
_routes = @set
|
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.
|
4
|
+
version: 4.2.0.rc3
|
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-
|
11
|
+
date: 2014-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,80 +16,80 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.2.0.
|
19
|
+
version: 4.2.0.rc3
|
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.
|
26
|
+
version: 4.2.0.rc3
|
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
33
|
version: 1.6.0.beta2
|
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
40
|
version: 1.6.0.beta2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rack-test
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.6.2
|
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
54
|
version: 0.6.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rails-html-sanitizer
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.0'
|
62
|
-
- -
|
62
|
+
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: 1.0.1
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- - ~>
|
69
|
+
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '1.0'
|
72
|
-
- -
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: 1.0.1
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rails-dom-testing
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - ~>
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '1.0'
|
82
|
-
- -
|
82
|
+
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: 1.0.5
|
85
85
|
type: :runtime
|
86
86
|
prerelease: false
|
87
87
|
version_requirements: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- - ~>
|
89
|
+
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '1.0'
|
92
|
-
- -
|
92
|
+
- - ">="
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: 1.0.5
|
95
95
|
- !ruby/object:Gem::Dependency
|
@@ -98,28 +98,28 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - '='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 4.2.0.
|
101
|
+
version: 4.2.0.rc3
|
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.
|
108
|
+
version: 4.2.0.rc3
|
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.
|
115
|
+
version: 4.2.0.rc3
|
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.
|
122
|
+
version: 4.2.0.rc3
|
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
|
@@ -289,18 +289,18 @@ require_paths:
|
|
289
289
|
- lib
|
290
290
|
required_ruby_version: !ruby/object:Gem::Requirement
|
291
291
|
requirements:
|
292
|
-
- -
|
292
|
+
- - ">="
|
293
293
|
- !ruby/object:Gem::Version
|
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
299
|
version: 1.3.1
|
300
300
|
requirements:
|
301
301
|
- none
|
302
302
|
rubyforge_project:
|
303
|
-
rubygems_version: 2.2.
|
303
|
+
rubygems_version: 2.2.2
|
304
304
|
signing_key:
|
305
305
|
specification_version: 4
|
306
306
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|