actionpack 5.0.1.rc1 → 5.0.1.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: ec4e939e3051bb6e62c29b8e14be2cf7fd3c1067
4
- data.tar.gz: 52f14ea10ddf0ee7e4536f52ee615e08377ac783
3
+ metadata.gz: 78120e6032355f83a541aea2b9244d9af059a336
4
+ data.tar.gz: a7363d48f334f9ce6da98514d719349041c400df
5
5
  SHA512:
6
- metadata.gz: 558700b79b1d18c569d846bb1e44a3384c3e1c7f5dd6e4322f4d8a428b1d91e02cb5cc44b4e68facf0e6531f66dd05fcee2be7844c2f2320c5ac6b9763542a26
7
- data.tar.gz: 7a8eee67d4a321617be9c909be937b7f0f0603404c731946d07b33a343bafc1e00656caef764c73b3ad6314625f44373a4db90d2255f6067906cd0def1476bd3
6
+ metadata.gz: 516c9c4d7c5993d2b6dbd6ff382fae0aff3b1789065431988f00c2a556ab5855b74e054575b1ec3f696479085369098973b3f0354d07300ae9f482562531b9d2
7
+ data.tar.gz: 8c7bc165fea6532ec1caec33fa10f9995e5af2b5c665c935c7e230e5bc6af552448ce3f00eedee229ca1b7716e5856f688835c49c7dd7919915335587dcc7571
@@ -1,3 +1,16 @@
1
+ ## Rails 5.0.1.rc2 (December 10, 2016) ##
2
+
3
+ * Move `cookies`, `flash`, and `session` methods back to
4
+ `ActionDispatch::Integration::Session`.
5
+
6
+ *Matthew Draper*
7
+
8
+ * Do not reset in `ActionDispatch::IntegrationTest#open_session`; doing so
9
+ is incompatible with existing (unintended) API usage.
10
+
11
+ *Sean Griffin*
12
+
13
+
1
14
  ## Rails 5.0.1.rc1 (December 01, 2016) ##
2
15
 
3
16
  * Fixed error caused by `force_ssl_redirect` when `session_store` is
@@ -119,6 +132,12 @@
119
132
 
120
133
  *David Chen*
121
134
 
135
+ * Reset a new session directly after its creation in `ActionDispatch::IntegrationTest#open_session`.
136
+
137
+ Fixes #22742.
138
+
139
+ *Tawan Sierek*
140
+
122
141
  * Fix 'defaults' option for root route.
123
142
 
124
143
  A regression from some refactoring for the 5.0 release, this change
@@ -140,7 +140,7 @@ module ActionDispatch
140
140
  DEFAULT_HOST = "www.example.com"
141
141
 
142
142
  include Minitest::Assertions
143
- include RequestHelpers, Assertions
143
+ include TestProcess, RequestHelpers, Assertions
144
144
 
145
145
  %w( status status_message headers body redirect? ).each do |method|
146
146
  delegate method, :to => :response, :allow_nil => true
@@ -453,7 +453,6 @@ module ActionDispatch
453
453
  # simultaneously.
454
454
  def open_session
455
455
  dup.tap do |session|
456
- session.reset!
457
456
  yield session if block_given?
458
457
  end
459
458
  end
@@ -685,7 +684,7 @@ module ActionDispatch
685
684
  # Consult the Rails Testing Guide for more.
686
685
 
687
686
  class IntegrationTest < ActiveSupport::TestCase
688
- include TestProcess
687
+ include TestProcess::FixtureFile
689
688
 
690
689
  module UrlOptions
691
690
  extend ActiveSupport::Concern
@@ -3,6 +3,26 @@ require 'action_dispatch/middleware/flash'
3
3
 
4
4
  module ActionDispatch
5
5
  module TestProcess
6
+ module FixtureFile
7
+ # Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.fixture_path, path), type)</tt>:
8
+ #
9
+ # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png')
10
+ #
11
+ # To upload binary files on Windows, pass <tt>:binary</tt> as the last parameter.
12
+ # This will not affect other platforms:
13
+ #
14
+ # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png', :binary)
15
+ def fixture_file_upload(path, mime_type = nil, binary = false)
16
+ if self.class.respond_to?(:fixture_path) && self.class.fixture_path &&
17
+ !File.exist?(path)
18
+ path = File.join(self.class.fixture_path, path)
19
+ end
20
+ Rack::Test::UploadedFile.new(path, mime_type, binary)
21
+ end
22
+ end
23
+
24
+ include FixtureFile
25
+
6
26
  def assigns(key = nil)
7
27
  raise NoMethodError,
8
28
  "assigns has been extracted to a gem. To continue using it,
@@ -24,21 +44,5 @@ module ActionDispatch
24
44
  def redirect_to_url
25
45
  @response.redirect_url
26
46
  end
27
-
28
- # Shortcut for <tt>Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.fixture_path, path), type)</tt>:
29
- #
30
- # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png')
31
- #
32
- # To upload binary files on Windows, pass <tt>:binary</tt> as the last parameter.
33
- # This will not affect other platforms:
34
- #
35
- # post :change_avatar, avatar: fixture_file_upload('files/spongebob.png', 'image/png', :binary)
36
- def fixture_file_upload(path, mime_type = nil, binary = false)
37
- if self.class.respond_to?(:fixture_path) && self.class.fixture_path &&
38
- !File.exist?(path)
39
- path = File.join(self.class.fixture_path, path)
40
- end
41
- Rack::Test::UploadedFile.new(path, mime_type, binary)
42
- end
43
47
  end
44
48
  end
@@ -8,7 +8,7 @@ module ActionPack
8
8
  MAJOR = 5
9
9
  MINOR = 0
10
10
  TINY = 1
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.0.1.rc1
4
+ version: 5.0.1.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: 2016-11-30 00:00:00.000000000 Z
11
+ date: 2016-12-09 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.0.1.rc1
19
+ version: 5.0.1.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.0.1.rc1
26
+ version: 5.0.1.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.0.1.rc1
95
+ version: 5.0.1.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.0.1.rc1
102
+ version: 5.0.1.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.0.1.rc1
109
+ version: 5.0.1.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.0.1.rc1
116
+ version: 5.0.1.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