turbolinks 5.2.0 → 5.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a35acd5dee01aa77d5bfae67e58e3b3d32dd983e8798b6ee0e4cf39ec5577c4d
4
- data.tar.gz: 5e99f07d4d43e94356d96ed55d73c7e5a5c2269868b276e69cb5bb8bc12c5ad8
3
+ metadata.gz: 356d5ae611a7ba7546230ee15c3469fc53db5922c49e3f9dbf6934c35581b6d8
4
+ data.tar.gz: 4676334c2f9332c21b1d0cc8a23845ca06072893a5017a01a2f39be4fc67e452
5
5
  SHA512:
6
- metadata.gz: d70bd13b37600f8af2aa394817d99f884584cbe547d821ce2f584ba0cbbfd1300cf20cad7261f067412c14e0a577f6b3064a7a95b7b2fd4e6e1c16ef67cb8dcd
7
- data.tar.gz: 15aad8931caa7af77a3aee54bce36f56764a208b87135344024851e7119f143bdea7e8697ac302bff233a97e038f9cd7eb89bef9b536dfbd87f2317594e3ab4f
6
+ metadata.gz: a2d398b174ad87d056378d9fbfef59c852e976ae546d6ea8bd881df744dc0be4197768be825ed31efca248e79b8454b1201e8b8a19274441ef7e24c6597c8be0
7
+ data.tar.gz: b62d468a8471925ffb85d2da5b22869fcc78f11fe27a59fe733dadcd7ad3ead74393baee90e167b6e826f35c31b2b8e301baff9705592f4745850a138d07b3b8
@@ -12,7 +12,7 @@ module Turbolinks
12
12
 
13
13
  def assert_turbolinks_visited(options = {}, message = nil)
14
14
  assert_response(:ok, message)
15
- assert_equal("text/javascript", response.content_type)
15
+ assert_equal("text/javascript", response.try(:media_type) || response.content_type)
16
16
 
17
17
  visit_location, _ = turbolinks_visit_location_and_action
18
18
 
@@ -34,7 +34,7 @@ module Turbolinks
34
34
  # header is cleared after controller action processing to prevent it
35
35
  # from leaking into subsequent requests.
36
36
  def turbolinks_request?
37
- !request.get? && response.content_type == "text/javascript"
37
+ !request.get? && (response.try(:media_type) || response.content_type) == "text/javascript"
38
38
  end
39
39
 
40
40
  def turbolinks_visit_location_and_action
@@ -33,6 +33,7 @@ module Turbolinks
33
33
  self.status = 200
34
34
  self.response_body = script.join("\n")
35
35
  response.content_type = "text/javascript"
36
+ response.headers["X-Xhr-Redirect"] = location
36
37
  end
37
38
 
38
39
  def store_turbolinks_location_in_session(location)
@@ -1,3 +1,3 @@
1
1
  module Turbolinks
2
- VERSION = '5.2.0'
2
+ VERSION = '5.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbolinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.2.1
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: 2018-08-20 00:00:00.000000000 Z
11
+ date: 2019-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: turbolinks-source
@@ -39,7 +39,8 @@ files:
39
39
  homepage: https://github.com/turbolinks/turbolinks
40
40
  licenses:
41
41
  - MIT
42
- metadata: {}
42
+ metadata:
43
+ source_code_uri: https://github.com/turbolinks/turbolinks-rails
43
44
  post_install_message:
44
45
  rdoc_options: []
45
46
  require_paths: