quince 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/quince/version.rb +1 -1
- data/lib/quince.rb +1 -0
- data/scripts.js +24 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 915108de103a8f53a56eec910ca301b090ad537b2b368f919750283fe7781ae4
|
4
|
+
data.tar.gz: e0ce22c06ac12cc12bf901aac59443e61e587bdf870af52c97faa0fe38cd65fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7bf3cd3af27f2523d6d2b57ad4bcb121478bfa72cf71ae459f3bafe2a2a5a5ff2826acc645e3e7da3479df7548d32560b572e0bf09fa5101a631e819feb5a03
|
7
|
+
data.tar.gz: f063a5d900d22b5c66a9cbc674782e04873b02a51860bb0c74146fb854e34a53de74dc7200a365bb5bfa85f85caf5b9c0c81ead9c2990066139ebc6e5387f00d
|
data/Gemfile.lock
CHANGED
data/lib/quince/version.rb
CHANGED
data/lib/quince.rb
CHANGED
data/scripts.js
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
const callRemoteEndpoint = (endpoint, payload, selector) => {
|
2
|
+
fetch(
|
3
|
+
endpoint,
|
4
|
+
{
|
5
|
+
method: `POST`,
|
6
|
+
headers: {
|
7
|
+
"Content-Type": `application/json;charset=utf-8`
|
8
|
+
},
|
9
|
+
body: payload,
|
10
|
+
}
|
11
|
+
).then(resp => resp.text()).then(html => {
|
12
|
+
const element = document.querySelector(selector);
|
13
|
+
if (!element) {
|
14
|
+
throw `element not found for ${selector}`;
|
15
|
+
}
|
16
|
+
|
17
|
+
element.outerHTML = html
|
18
|
+
})
|
19
|
+
}
|
20
|
+
|
21
|
+
const getFormValues = (form) => {
|
22
|
+
const fd = new FormData(form);
|
23
|
+
return Object.fromEntries(fd.entries());
|
24
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quince
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph Johansen
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/quince/types.rb
|
65
65
|
- lib/quince/version.rb
|
66
66
|
- quince.gemspec
|
67
|
+
- scripts.js
|
67
68
|
homepage: https://github.com/johansenja/quince
|
68
69
|
licenses:
|
69
70
|
- MIT
|