actionpack 5.1.3.rc1 → 5.1.3.rc2

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: ebb4cff7e815dc558be31f6bde9c09189d2c4d3e
4
- data.tar.gz: b65b7b309ec1899127650936e4213ca313fee55d
3
+ metadata.gz: 8980492ed9c00c4d0875fa8c6a4f57cf66c77f44
4
+ data.tar.gz: 3a90031baef8f3b8ac32d4540249c1c47cc9ec12
5
5
  SHA512:
6
- metadata.gz: c99db076703a8fed396d063202cf6501afaca25fb33e8b4e415ef010cec2bb5edc36fce5790a9754bfaba66ffe1454608c4c58e146210d270ea3ccd6349a2dee
7
- data.tar.gz: c158dd8319e7c9d96ec741fe2c55af255e921f847d5bed04178f8d4d8c9dc5285856b70ee57cbbda87d6d33862249b1a4bdda7c7df5491c872006073c745f17e
6
+ metadata.gz: cfe6ab8c76ece8f065a3e0dff7a407dacf694d4d666f8fe498610ed68fb9eb89b45a53744a7f20fe5bd702f971eba5a56d832656025262a1295e83859e43d9e2
7
+ data.tar.gz: b5b36564f07f65c7af2365d2df4e149e33b6de60a23a856f2688e341ca7dd8ccc3d5343d84e8cc1b37fc3cbf76d25a9cbb7d9a9f1a81edbee336ec3654bee084
@@ -1,3 +1,8 @@
1
+ ## Rails 5.1.3.rc2 (July 25, 2017) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 5.1.3.rc1 (July 19, 2017) ##
2
7
 
3
8
  * No changes.
@@ -656,6 +656,11 @@ module ActionDispatch
656
656
  script_namer = ->(options) do
657
657
  prefix_options = options.slice(*_route.segment_keys)
658
658
  prefix_options[:relative_url_root] = "".freeze
659
+
660
+ if options[:_recall]
661
+ prefix_options.reverse_merge!(options[:_recall].slice(*_route.segment_keys))
662
+ end
663
+
659
664
  # We must actually delete prefix segment keys to avoid passing them to next url_for.
660
665
  _route.segment_keys.each { |k| options.delete(k) }
661
666
  _routes.url_helpers.send("#{name}_path", prefix_options)
@@ -30,7 +30,14 @@ module ActionDispatch
30
30
  def #{method}(*args)
31
31
  options = args.extract_options!
32
32
  options = url_options.merge((options || {}).symbolize_keys)
33
- options.reverse_merge!(script_name: @script_namer.call(options)) if @script_namer
33
+
34
+ if @script_namer
35
+ options[:script_name] = merge_script_names(
36
+ options[:script_name],
37
+ @script_namer.call(options)
38
+ )
39
+ end
40
+
34
41
  args << options
35
42
  @helpers.#{method}(*args)
36
43
  end
@@ -40,6 +47,20 @@ module ActionDispatch
40
47
  super
41
48
  end
42
49
  end
50
+
51
+ # Keeps the part of the script name provided by the global
52
+ # context via ENV["SCRIPT_NAME"], which `mount` doesn't know
53
+ # about since it depends on the specific request, but use our
54
+ # script name resolver for the mount point dependent part.
55
+ def merge_script_names(previous_script_name, new_script_name)
56
+ return new_script_name unless previous_script_name
57
+
58
+ resolved_parts = new_script_name.count("/")
59
+ previous_parts = previous_script_name.count("/")
60
+ context_parts = previous_parts - resolved_parts + 1
61
+
62
+ (previous_script_name.split("/").slice(0, context_parts).join("/")) + new_script_name
63
+ end
43
64
  end
44
65
  end
45
66
  end
@@ -8,7 +8,7 @@ module ActionPack
8
8
  MAJOR = 5
9
9
  MINOR = 1
10
10
  TINY = 3
11
- PRE = "rc1"
11
+ PRE = "rc2"
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: 5.1.3.rc1
4
+ version: 5.1.3.rc2
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: 2017-07-19 00:00:00.000000000 Z
11
+ date: 2017-07-25 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: 5.1.3.rc1
19
+ version: 5.1.3.rc2
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: 5.1.3.rc1
26
+ version: 5.1.3.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -92,28 +92,28 @@ dependencies:
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 5.1.3.rc1
95
+ version: 5.1.3.rc2
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 5.1.3.rc1
102
+ version: 5.1.3.rc2
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: activemodel
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 5.1.3.rc1
109
+ version: 5.1.3.rc2
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - '='
115
115
  - !ruby/object:Gem::Version
116
- version: 5.1.3.rc1
116
+ version: 5.1.3.rc2
117
117
  description: Web apps on Rails. Simple, battle-tested conventions for building and
118
118
  testing MVC web applications. Works with any Rack-compatible server.
119
119
  email: david@loudthinking.com