turbograft 0.4.5 → 0.4.6
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62f47fb4e633a50fbdb15227ef0a8590f732a270
|
4
|
+
data.tar.gz: dacee1d039cb0f2334b1127dadb6707431b2948d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ce7e994ce7824989dec3cd74db3da3a93e4c729ad06107c0494b33b6f8e50710de74e6f8da14f0812765ea2f8f7386ea66db80d74d26f3899cec428a7a5fc7d
|
7
|
+
data.tar.gz: e25127d111f3ceca40bec0fed3163865cc02adb2a9a00791d2e2e152bf85932ca091e467a22bfac9982cbc809e6aee4830a52c770cafb36e837cd3c683a599f5
|
@@ -1,11 +1,11 @@
|
|
1
1
|
class TurboGraft.Response
|
2
2
|
constructor: (@xhr, intendedURL) ->
|
3
3
|
if intendedURL && intendedURL.withoutHash() != @xhr.responseURL
|
4
|
-
|
4
|
+
redirectedTo = @xhr.responseURL
|
5
5
|
else
|
6
|
-
|
6
|
+
redirectedTo = @xhr.getResponseHeader('X-XHR-Redirected-To')
|
7
7
|
|
8
|
-
@finalURL =
|
8
|
+
@finalURL = redirectedTo || intendedURL
|
9
9
|
|
10
10
|
valid: -> @hasRenderableHttpStatus() && @hasValidContent()
|
11
11
|
|
@@ -23,12 +23,6 @@ class TurboGraft.Response
|
|
23
23
|
else
|
24
24
|
throw new Error("Error encountered for XHR Response: #{this}")
|
25
25
|
|
26
|
-
redirectedToNewUrl: () ->
|
27
|
-
Boolean(
|
28
|
-
@redirectedTo &&
|
29
|
-
@redirectedTo != TurboGraft.location()
|
30
|
-
)
|
31
|
-
|
32
26
|
toString: () ->
|
33
27
|
"URL: #{@xhr.responseURL}, " +
|
34
28
|
"ReadyState: #{@xhr.readyState}, " +
|
@@ -7,10 +7,9 @@ module TurboGraft
|
|
7
7
|
private
|
8
8
|
def redirect_via_turbolinks_to(url = {}, response_status = {})
|
9
9
|
redirect_to(url, response_status)
|
10
|
-
|
11
10
|
self.status = 200
|
12
11
|
self.response_body = "Turbolinks.visit('#{location}');"
|
13
|
-
response.content_type = Mime
|
12
|
+
response.content_type = Mime[:js]
|
14
13
|
end
|
15
14
|
end
|
16
15
|
end
|
data/lib/turbograft/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbograft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristian Plettenberg-Dussault
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date:
|
18
|
+
date: 2017-09-28 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: coffee-rails
|
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
263
|
version: '0'
|
264
264
|
requirements: []
|
265
265
|
rubyforge_project:
|
266
|
-
rubygems_version: 2.
|
266
|
+
rubygems_version: 2.6.13
|
267
267
|
signing_key:
|
268
268
|
specification_version: 4
|
269
269
|
summary: turbolinks with partial page replacement
|