actionpack 4.2.4 → 4.2.5.rc1

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: 27bfdee6c3cdd08df027171d707b66968712b5da
4
- data.tar.gz: 6cde1ccb704e4fedcc061e9369572a94bfba77a6
3
+ metadata.gz: 5cf81b19b1ccd127cbbc5b8b2a57fdbf71191e3c
4
+ data.tar.gz: 608599f2b673102ed1304fbc2c52619ebefc8012
5
5
  SHA512:
6
- metadata.gz: f63a7c3b24d8b59bcf9f07a73f7a63dfae4c39e93368f53344f469eb5c4eda7efa7aff45d9aa7adcbc956eaa2f476a4a32f05743e659b07f87d5a7f18f054558
7
- data.tar.gz: ef77b90e8f8c5356566741a418173068e31aad5c19fe0a3a19906e3730b6e4f94d4e3d28920630a7d2d44ee9a188b3a91ba2fdfa9ce6107abee6db0c4f6c87fa
6
+ metadata.gz: 7385abbf457e62d15562e05ab31acf1bb3cf772484fbaca94c56cad31561299bbb43666c5b963e50ff7c55ec1c1d8e191e390b180995ba2af4d5461b9d4cfb02
7
+ data.tar.gz: 5cd1cb3919c9167840e6cd8bf486336e6e119f7702498f510857fb9e0e5470847a5a212b2770b4aed4f801169fe65f89e6f76dd15d0fa91d2b9ce920512607e6
@@ -1,3 +1,32 @@
1
+ ## Rails 4.2.5.rc1 (October 30, 2015) ##
2
+
3
+ * `ActionController::TestCase` can teardown gracefully if an error is raised
4
+ early in the `setup` chain.
5
+
6
+ *Yves Senn*
7
+
8
+ * Parse RSS/ATOM responses as XML, not HTML.
9
+
10
+ *Alexander Kaupanin*
11
+
12
+ * Fix regression in mounted engine named routes generation for app deployed to
13
+ a subdirectory. `relative_url_root` was prepended to the path twice (e.g.
14
+ "/subdir/subdir/engine_path" instead of "/subdir/engine_path")
15
+
16
+ Fixes #20920. Fixes #21459.
17
+
18
+ *Matthew Erhard*
19
+
20
+ * `url_for` does not modify its arguments when generating polymorphic URLs.
21
+
22
+ *Bernerd Schaefer*
23
+
24
+ * Update `ActionController::TestSession#fetch` to behave more like
25
+ `ActionDispatch::Request::Session#fetch` when using non-string keys.
26
+
27
+ *Jeremy Friesen*
28
+
29
+
1
30
  ## Rails 4.2.4 (August 24, 2015) ##
2
31
 
3
32
  * ActionController::TestSession now accepts a default value as well as
@@ -55,6 +55,8 @@ module ActionController
55
55
  end
56
56
 
57
57
  def teardown_subscriptions
58
+ return unless defined?(@_subscribers)
59
+
58
60
  @_subscribers.each do |subscriber|
59
61
  ActiveSupport::Notifications.unsubscribe(subscriber)
60
62
  end
@@ -327,8 +329,8 @@ module ActionController
327
329
  clear
328
330
  end
329
331
 
330
- def fetch(*args, &block)
331
- @data.fetch(*args, &block)
332
+ def fetch(key, *args, &block)
333
+ @data.fetch(key.to_s, *args, &block)
332
334
  end
333
335
 
334
336
  private
@@ -5,7 +5,7 @@ module ActionDispatch
5
5
  module Http
6
6
  module URL
7
7
  IP_HOST_REGEXP = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/
8
- HOST_REGEXP = /(^[^:]+:\/\/)?([^:]+)(?::(\d+$))?/
8
+ HOST_REGEXP = /(^[^:]+:\/\/)?(\[[^\]]+\]|[^:]+)(?::(\d+$))?/
9
9
  PROTOCOL_REGEXP = /^([^:]+)(:)?(\/\/)?$/
10
10
 
11
11
  mattr_accessor :tld_length
@@ -632,6 +632,7 @@ module ActionDispatch
632
632
  super(options)
633
633
  else
634
634
  prefix_options = options.slice(*_route.segment_keys)
635
+ prefix_options[:relative_url_root] = ''.freeze
635
636
  # we must actually delete prefix segment keys to avoid passing them to next url_for
636
637
  _route.segment_keys.each { |k| options.delete(k) }
637
638
  _routes.url_helpers.send("#{name}_path", prefix_options)
@@ -485,14 +485,6 @@ module ActionDispatch
485
485
  end
486
486
 
487
487
  def url_helpers(supports_path = true)
488
- if supports_path
489
- @url_helpers_with_paths ||= generate_url_helpers(supports_path)
490
- else
491
- @url_helpers_without_paths ||= generate_url_helpers(supports_path)
492
- end
493
- end
494
-
495
- def generate_url_helpers(supports_path)
496
488
  routes = self
497
489
 
498
490
  Module.new do
@@ -763,14 +755,18 @@ module ActionDispatch
763
755
 
764
756
  RESERVED_OPTIONS = [:host, :protocol, :port, :subdomain, :domain, :tld_length,
765
757
  :trailing_slash, :anchor, :params, :only_path, :script_name,
766
- :original_script_name]
758
+ :original_script_name, :relative_url_root]
767
759
 
768
760
  def optimize_routes_generation?
769
761
  default_url_options.empty?
770
762
  end
771
763
 
772
764
  def find_script_name(options)
773
- options.delete(:script_name) || relative_url_root || ''
765
+ options.delete(:script_name) || find_relative_url_root(options) || ''
766
+ end
767
+
768
+ def find_relative_url_root(options)
769
+ options.delete(:relative_url_root) || relative_url_root
774
770
  end
775
771
 
776
772
  def path_for(options, route_name = nil)
@@ -160,7 +160,8 @@ module ActionDispatch
160
160
  when Symbol
161
161
  HelperMethodBuilder.url.handle_string_call self, options
162
162
  when Array
163
- polymorphic_url(options, options.extract_options!)
163
+ components = options.dup
164
+ polymorphic_url(components, components.extract_options!)
164
165
  when Class
165
166
  HelperMethodBuilder.url.handle_class_call self, options
166
167
  else
@@ -12,7 +12,7 @@ module ActionDispatch
12
12
  include Rails::Dom::Testing::Assertions
13
13
 
14
14
  def html_document
15
- @html_document ||= if @response.content_type === Mime::XML
15
+ @html_document ||= if @response.content_type.to_s =~ /xml$/
16
16
  Nokogiri::XML::Document.parse(@response.body)
17
17
  else
18
18
  Nokogiri::HTML::Document.parse(@response.body)
@@ -7,8 +7,8 @@ module ActionPack
7
7
  module VERSION
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
- TINY = 4
11
- PRE = nil
10
+ TINY = 5
11
+ PRE = "rc1"
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.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,14 +16,14 @@ 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: rack
29
29
  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.4
101
+ version: 4.2.5.rc1
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.4
108
+ version: 4.2.5.rc1
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.4
115
+ version: 4.2.5.rc1
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.4
122
+ version: 4.2.5.rc1
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,15 +294,14 @@ 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: '0'
299
+ version: 1.3.1
300
300
  requirements:
301
301
  - none
302
302
  rubyforge_project:
303
- rubygems_version: 2.4.7
303
+ rubygems_version: 2.4.5.1
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).
307
307
  test_files: []
308
- has_rdoc: