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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a99c228624ca2ec36237affb7fdbf746d9b1724
4
- data.tar.gz: a4168d8e73a16f0d8b07b3f1df61935744148230
3
+ metadata.gz: 779a49cfbc8460b94ae46ad955a41bf1e2d335dc
4
+ data.tar.gz: e44af0188302e7d69ac26e2e83e0a5132246a381
5
5
  SHA512:
6
- metadata.gz: c8d5fa224163611d37e81e1de952530c01785f515e83b606c1afa7195c8ce45f9bee910874ae2e61250c930cf759404883a7bb9e6a124a1aeb5c69c252e46591
7
- data.tar.gz: df53d45fda4f43e983d11b29c6ac75bcb610c533fa54219e0226f10431826d4dd5a43852789794637befe9b8101a1cd3201213fdeabbbbcf6d724e370b5711fd
6
+ metadata.gz: 75b293d35eb31d34f886d3c1b54a03062e52d4b892842deaacb7a41337cdfe07f24e3965c7137c0e623a9df5017abd6df3c5c1f76fb56785c978a971acd7b791
7
+ data.tar.gz: f3551a2db0ead18982b91de2f0e64b940899dcd82d0a5409989959cda9d02668fb6b84b4e4a3bb956bf65c9483e78826207e49e389aed8615f6cde5898df639e
@@ -4,7 +4,19 @@ module Menilite
4
4
  def get_json(url, &block)
5
5
  (callback, promise) = prepare(url, &block)
6
6
 
7
- `fetch(url).then(callback)`
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
- `fetch(url, {method: 'post', body: #{data.to_json}}).then(callback)`
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
 
@@ -71,7 +71,9 @@ module Menilite
71
71
  { result: 'error', message: e.message }.to_json
72
72
  end
73
73
 
74
- enable :sessions
74
+ configure do
75
+ enable :sessions
76
+ end
75
77
 
76
78
  classes.each do |klass|
77
79
  case
@@ -1,3 +1,3 @@
1
1
  module Menilite
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
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.1
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-09 00:00:00.000000000 Z
11
+ date: 2017-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler