requestjs-rails 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/requestjs.js +6 -2
- data/lib/requestjs/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fad5960e6459e419a6a684ebc12194003f4b19f83b984004c5a62205ea761ea5
|
4
|
+
data.tar.gz: 1f1d45bd1e64fda7a075641e00fd78a97f84606ee0843b3663be143a9896295f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a55c0defd7b2890825932f7d53f01d6d6388bc4ce8c8bf4949da772a4e4bb8712a4378feae12c0fb75fb1afc3b8221ae32f60ace6f373533cbe962298978eb60
|
7
|
+
data.tar.gz: a5eb76765f8a41f810d65dc2742138191b37ab7e3bf5bc561cbcd5f706cb3791cc5ca211e4c1be761e2b400fdb5007cd0fcfd0e32088792f05f436e9a1d476ef
|
@@ -133,7 +133,8 @@ class FetchRequest {
|
|
133
133
|
if (response.unauthenticated && response.authenticationURL) {
|
134
134
|
return Promise.reject(window.location.href = response.authenticationURL);
|
135
135
|
}
|
136
|
-
|
136
|
+
const responseStatusIsTurboStreamable = response.ok || response.unprocessableEntity;
|
137
|
+
if (responseStatusIsTurboStreamable && response.isTurboStream) {
|
137
138
|
await response.renderTurboStream();
|
138
139
|
}
|
139
140
|
return response;
|
@@ -159,7 +160,7 @@ class FetchRequest {
|
|
159
160
|
headers: this.headers,
|
160
161
|
body: this.formattedBody,
|
161
162
|
signal: this.signal,
|
162
|
-
credentials:
|
163
|
+
credentials: this.credentials,
|
163
164
|
redirect: this.redirect
|
164
165
|
};
|
165
166
|
}
|
@@ -232,6 +233,9 @@ class FetchRequest {
|
|
232
233
|
get redirect() {
|
233
234
|
return this.options.redirect || "follow";
|
234
235
|
}
|
236
|
+
get credentials() {
|
237
|
+
return this.options.credentials || "same-origin";
|
238
|
+
}
|
235
239
|
get additionalHeaders() {
|
236
240
|
return this.options.headers || {};
|
237
241
|
}
|
data/lib/requestjs/version.rb
CHANGED
metadata
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: requestjs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Lauxen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 6.
|
19
|
+
version: 6.1.0
|
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: 6.
|
27
|
-
description:
|
26
|
+
version: 6.1.0
|
27
|
+
description:
|
28
28
|
email: marcelolauxen16@gmail.com
|
29
29
|
executables: []
|
30
30
|
extensions: []
|
@@ -46,7 +46,7 @@ homepage: https://github.com/marcelolx/requestjs-rails
|
|
46
46
|
licenses:
|
47
47
|
- MIT
|
48
48
|
metadata: {}
|
49
|
-
post_install_message:
|
49
|
+
post_install_message:
|
50
50
|
rdoc_options: []
|
51
51
|
require_paths:
|
52
52
|
- lib
|
@@ -61,8 +61,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
rubygems_version: 3.
|
65
|
-
signing_key:
|
64
|
+
rubygems_version: 3.4.19
|
65
|
+
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: A tiny Fetch API wrapper that allows you to make http requests without need
|
68
68
|
to handle to send the CSRF Token on every request
|