menilite 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/menilite/client/http.rb +27 -2
- data/lib/menilite/server/router.rb +3 -1
- data/lib/menilite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 779a49cfbc8460b94ae46ad955a41bf1e2d335dc
|
4
|
+
data.tar.gz: e44af0188302e7d69ac26e2e83e0a5132246a381
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75b293d35eb31d34f886d3c1b54a03062e52d4b892842deaacb7a41337cdfe07f24e3965c7137c0e623a9df5017abd6df3c5c1f76fb56785c978a971acd7b791
|
7
|
+
data.tar.gz: f3551a2db0ead18982b91de2f0e64b940899dcd82d0a5409989959cda9d02668fb6b84b4e4a3bb956bf65c9483e78826207e49e389aed8615f6cde5898df639e
|
data/lib/menilite/client/http.rb
CHANGED
@@ -4,7 +4,19 @@ module Menilite
|
|
4
4
|
def get_json(url, &block)
|
5
5
|
(callback, promise) = prepare(url, &block)
|
6
6
|
|
7
|
-
|
7
|
+
%x(
|
8
|
+
fetch(
|
9
|
+
url,
|
10
|
+
{
|
11
|
+
method: 'get',
|
12
|
+
headers: {
|
13
|
+
'Accept': 'application/json',
|
14
|
+
'Content-Type': 'application/json'
|
15
|
+
},
|
16
|
+
credentials: "same-origin",
|
17
|
+
}
|
18
|
+
).then(callback)
|
19
|
+
)
|
8
20
|
|
9
21
|
promise
|
10
22
|
end
|
@@ -12,7 +24,20 @@ module Menilite
|
|
12
24
|
def post_json(url, data, &block)
|
13
25
|
(callback, promise) = prepare(url, &block)
|
14
26
|
|
15
|
-
|
27
|
+
%x(
|
28
|
+
fetch(
|
29
|
+
url,
|
30
|
+
{
|
31
|
+
method: 'post',
|
32
|
+
headers: {
|
33
|
+
'Accept': 'application/json',
|
34
|
+
'Content-Type': 'application/json'
|
35
|
+
},
|
36
|
+
credentials: "same-origin",
|
37
|
+
body: #{data.to_json}
|
38
|
+
}
|
39
|
+
).then(callback)
|
40
|
+
)
|
16
41
|
|
17
42
|
promise
|
18
43
|
|
data/lib/menilite/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: menilite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- youchan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|