actionpack 3.1.10 → 3.1.11

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
- !binary "U0hBMQ==":
3
- metadata.gz: 90968dc970e80ff89a11d7d2aa97c5cfa67bbf7b
4
- data.tar.gz: 0d05b45c288729d7a5e17cd7df18fe652f1d6429
5
- !binary "U0hBNTEy":
6
- metadata.gz: e3ab880006ca03db0c7f425582637ff5aa4f00680d80fcf4007f60645f5c1a20d96635332ea3a1592fcef55f35a9e184177df6ef43e2f9f97a79842885f2823d
7
- data.tar.gz: ce0c161b8ac8343f61f5dba717f7028340d8a5c833d238fb9b33faa3d2b1cc862dc708d08cd8fe036ecc1b8056b32b7a90ad47d752772f4d3bc0d8f1694f5e48
2
+ SHA1:
3
+ metadata.gz: 3e37bbcafb1b07b0732f02113ac4d8a0b50dccf9
4
+ data.tar.gz: 3741c6f652f01ea438825ce7a8d72874b5183332
5
+ SHA512:
6
+ metadata.gz: e27fb48371aadb9db7d34b68bae46c9b17509695d3387ea55817bfb6007648e3b607f7e0a855c800449d67f1f5e567b99b37921f42c1a177f397d01ddbe21139
7
+ data.tar.gz: bf22b6ca891c7b117257330d8277696c37a6e251c24bd09f1ceeb646dbccf19c275d901f74e4afaf63788878bec672052b7c8792f00a692cc0eb3f9c4c121359
@@ -1,8 +1,14 @@
1
- ## Rails 3.1.10
1
+ ## Rails 3.1.11 (unreleased)
2
+
3
+ * Fixed JSON params parsing regression for non-object JSON content.
4
+
5
+ ## Rails 3.1.10 (Jan 8, 2013)
2
6
 
3
7
  * Strip nils from collections on JSON and XML posts. [CVE-2013-0155]
4
8
 
5
- ## Rails 3.1.9
9
+ ## Rails 3.1.9 (Jan 2, 2013)
10
+
11
+ * No changes.
6
12
 
7
13
  ## Rails 3.1.8 (Aug 9, 2012)
8
14
 
@@ -45,7 +51,7 @@
45
51
 
46
52
  ## Rails 3.1.4 (unreleased) ##
47
53
 
48
- * :subdomain can now be specified with a value of false in url_for,
54
+ * :subdomain can now be specified with a value of false in url_for,
49
55
  allowing for subdomain(s) removal from the host during link generation. GH #4083
50
56
 
51
57
  *Arun Agrawal*
@@ -1,11 +1,11 @@
1
1
  module ActionController #:nodoc:
2
2
  module Caching
3
- # Fragment caching is used for caching various blocks within
3
+ # Fragment caching is used for caching various blocks within
4
4
  # views without caching the entire action as a whole. This is
5
- # useful when certain elements of an action change frequently or
6
- # depend on complicated state while other parts rarely change or
5
+ # useful when certain elements of an action change frequently or
6
+ # depend on complicated state while other parts rarely change or
7
7
  # can be shared amongst multiple parties. The caching is done using
8
- # the <tt>cache</tt> helper available in the Action View. A
8
+ # the <tt>cache</tt> helper available in the Action View. A
9
9
  # template with fragment caching might look like:
10
10
  #
11
11
  # <b>Hello <%= @name %></b>
@@ -16,21 +16,21 @@ module ActionController #:nodoc:
16
16
  # <% end %>
17
17
  #
18
18
  # This cache will bind the name of the action that called it, so if
19
- # this code was part of the view for the topics/list action, you
19
+ # this code was part of the view for the topics/list action, you
20
20
  # would be able to invalidate it using:
21
- #
21
+ #
22
22
  # expire_fragment(:controller => "topics", :action => "list")
23
23
  #
24
- # This default behavior is limited if you need to cache multiple
25
- # fragments per action or if the action itself is cached using
26
- # <tt>caches_action</tt>. To remedy this, there is an option to
27
- # qualify the name of the cached fragment by using the
24
+ # This default behavior is limited if you need to cache multiple
25
+ # fragments per action or if the action itself is cached using
26
+ # <tt>caches_action</tt>. To remedy this, there is an option to
27
+ # qualify the name of the cached fragment by using the
28
28
  # <tt>:action_suffix</tt> option:
29
29
  #
30
30
  # <% cache(:action => "list", :action_suffix => "all_topics") do %>
31
31
  #
32
- # That would result in a name such as
33
- # <tt>/topics/list/all_topics</tt>, avoiding conflicts with the
32
+ # That would result in a name such as
33
+ # <tt>/topics/list/all_topics</tt>, avoiding conflicts with the
34
34
  # action cache and with any fragments that use a different suffix.
35
35
  # Note that the URL doesn't have to really exist or be callable
36
36
  # - the url_for system is just used to generate unique cache names
@@ -38,21 +38,21 @@ module ActionController #:nodoc:
38
38
  #
39
39
  # The expiration call for this example is:
40
40
  #
41
- # expire_fragment(:controller => "topics",
42
- # :action => "list",
41
+ # expire_fragment(:controller => "topics",
42
+ # :action => "list",
43
43
  # :action_suffix => "all_topics")
44
44
  module Fragments
45
45
  # Given a key (as described in <tt>expire_fragment</tt>), returns
46
- # a key suitable for use in reading, writing, or expiring a
46
+ # a key suitable for use in reading, writing, or expiring a
47
47
  # cached fragment. If the key is a hash, the generated key is the
48
- # return value of url_for on that hash (without the protocol).
48
+ # return value of url_for on that hash (without the protocol).
49
49
  # All keys are prefixed with <tt>views/</tt> and uses
50
50
  # ActiveSupport::Cache.expand_cache_key for the expansion.
51
51
  def fragment_cache_key(key)
52
52
  ActiveSupport::Cache.expand_cache_key(key.is_a?(Hash) ? url_for(key).split("://").last : key, :views)
53
53
  end
54
54
 
55
- # Writes <tt>content</tt> to the location signified by
55
+ # Writes <tt>content</tt> to the location signified by
56
56
  # <tt>key</tt> (see <tt>expire_fragment</tt> for acceptable formats).
57
57
  def write_fragment(key, content, options = nil)
58
58
  return content unless cache_configured?
@@ -77,7 +77,7 @@ module ActionController #:nodoc:
77
77
  end
78
78
  end
79
79
 
80
- # Check if a cached fragment from the location signified by
80
+ # Check if a cached fragment from the location signified by
81
81
  # <tt>key</tt> exists (see <tt>expire_fragment</tt> for acceptable formats)
82
82
  def fragment_exist?(key, options = nil)
83
83
  return unless cache_configured?
@@ -109,7 +109,6 @@ module ActionController #:nodoc:
109
109
  def expire_fragment(key, options = nil)
110
110
  return unless cache_configured?
111
111
  key = fragment_cache_key(key) unless key.is_a?(Regexp)
112
- message = nil
113
112
 
114
113
  instrument_fragment_cache :expire_fragment, key do
115
114
  if key.is_a?(Regexp)
@@ -426,7 +426,7 @@ module ActionController
426
426
  # Returns an Array of [String, Hash] if a token is present.
427
427
  # Returns nil if no token is found.
428
428
  def token_and_options(request)
429
- if header = request.authorization.to_s[/^Token (.*)/]
429
+ if request.authorization.to_s[/^Token (.*)/]
430
430
  values = Hash[$1.split(',').map do |value|
431
431
  value.strip! # remove any spaces between commas and values
432
432
  key, value = value.split(/\=\"?/) # split key=value pairs
@@ -26,8 +26,6 @@ module ActionDispatch
26
26
  module FilterParameters
27
27
  extend ActiveSupport::Concern
28
28
 
29
- @@parameter_filter_for = {}
30
-
31
29
  # Return a hash of parameters with all sensitive data replaced.
32
30
  def filtered_parameters
33
31
  @filtered_parameters ||= parameter_filter.filter(parameters)
@@ -54,7 +52,7 @@ module ActionDispatch
54
52
  end
55
53
 
56
54
  def parameter_filter_for(filters)
57
- @@parameter_filter_for[filters] ||= ParameterFilter.new(filters)
55
+ ParameterFilter.new(filters)
58
56
  end
59
57
 
60
58
  KV_RE = '[^&;=]+'
@@ -33,7 +33,8 @@ module ActionDispatch # :nodoc:
33
33
  # end
34
34
  # end
35
35
  class Response
36
- attr_accessor :request, :header, :status
36
+ attr_accessor :request, :header
37
+ attr_reader :status
37
38
  attr_writer :sending_file
38
39
 
39
40
  alias_method :headers=, :header=
@@ -8,7 +8,7 @@ module ActionDispatch
8
8
  if env["REQUEST_METHOD"] == "HEAD"
9
9
  env["REQUEST_METHOD"] = "GET"
10
10
  env["rack.methodoverride.original_method"] = "HEAD"
11
- status, headers, body = @app.call(env)
11
+ status, headers, _ = @app.call(env)
12
12
  [status, headers, []]
13
13
  else
14
14
  @app.call(env)
@@ -44,10 +44,10 @@ module ActionDispatch
44
44
  when :yaml
45
45
  YAML.load(request.raw_post)
46
46
  when :json
47
- data = request.deep_munge ActiveSupport::JSON.decode(request.body)
47
+ data = ActiveSupport::JSON.decode(request.body)
48
48
  request.body.rewind if request.body.respond_to?(:rewind)
49
49
  data = {:_json => data} unless data.is_a?(Hash)
50
- data.with_indifferent_access
50
+ request.deep_munge(data).with_indifferent_access
51
51
  else
52
52
  false
53
53
  end
@@ -215,9 +215,6 @@ module ActionDispatch
215
215
  "*/*;q=0.5"
216
216
 
217
217
  unless defined? @named_routes_configured
218
- # install the named routes in this session instance.
219
- klass = singleton_class
220
-
221
218
  # the helpers are made protected by default--we make them public for
222
219
  # easier access during testing and troubleshooting.
223
220
  @named_routes_configured = true
@@ -2,7 +2,7 @@ module ActionPack
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- TINY = 10
5
+ TINY = 11
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -30,7 +30,7 @@ module ActionView
30
30
  begin
31
31
  Marshal::dump(object)
32
32
  "<pre class='debug_dump'>#{h(object.to_yaml).gsub(" ", "&nbsp; ")}</pre>".html_safe
33
- rescue Exception => e # errors from Marshal or YAML
33
+ rescue Exception # errors from Marshal or YAML
34
34
  # Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
35
35
  "<code class='debug_dump'>#{h(object.inspect)}</code>".html_safe
36
36
  end
@@ -64,7 +64,7 @@ module ActionView
64
64
  layout =~ /^\// ?
65
65
  with_fallbacks { find_template(layout, nil, false, keys) } : find_template(layout, nil, false, keys)
66
66
  end
67
- rescue ActionView::MissingTemplate => e
67
+ rescue ActionView::MissingTemplate
68
68
  update_details(:formats => nil) do
69
69
  raise unless template_exists?(layout)
70
70
  end
@@ -31,7 +31,6 @@ module ActionView
31
31
  def initialize(paths, path, prefixes, partial, details, *)
32
32
  @path = path
33
33
  prefixes = Array.wrap(prefixes)
34
- display_paths = paths.compact.map{ |p| p.to_s.inspect }.join(", ")
35
34
  template_type = if partial
36
35
  "partial"
37
36
  elsif path =~ /layouts/i
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: 3.1.10
4
+ version: 3.1.11
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: 2013-01-08 00:00:00.000000000 Z
11
+ date: 2013-02-11 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: 3.1.10
19
+ version: 3.1.11
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: 3.1.10
26
+ version: 3.1.11
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.1.10
33
+ version: 3.1.11
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: 3.1.10
40
+ version: 3.1.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack-cache
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -379,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
379
379
  requirements:
380
380
  - none
381
381
  rubyforge_project:
382
- rubygems_version: 2.0.0.preview3
382
+ rubygems_version: 2.0.0.rc.2
383
383
  signing_key:
384
384
  specification_version: 4
385
385
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).