xrpc 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xrpc/client.rb +2 -2
- data/lib/xrpc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dec847e75b45ae7c5f96ab323ea51056b487aa7d2751b701124a176dd02033d
|
4
|
+
data.tar.gz: b596ec43d3389cb83e62be7704b76b2ff5a977b6bd48181ffe26fa54b285afc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb999aacd7356b46141e42be25f268be91895f5108489b20b3e3c36ec0ff81170513f733181e3de2944dd1e804a750f86b363663efda983e61f36dbfd48030bf
|
7
|
+
data.tar.gz: 6b7f1335ff4745914a227ce006c9d07157dc6b1fed5375a92db3abc29e421d6846704950df591a3ad7aea136361c7becb17040c399692707982fe12281536b9b
|
data/lib/xrpc/client.rb
CHANGED
@@ -28,7 +28,7 @@ module XRPC
|
|
28
28
|
|
29
29
|
def method_missing(method_name, **params)
|
30
30
|
response = self.class.get("/xrpc/#{method_name.to_s.gsub("_", ".")}", query: params, headers: @headers).body
|
31
|
-
response.empty? ?
|
31
|
+
response.empty? ? response.code : JSON.parse(response)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -42,7 +42,7 @@ module XRPC
|
|
42
42
|
|
43
43
|
def method_missing(method_name, **params)
|
44
44
|
response = self.class.post("/xrpc/#{method_name.to_s.gsub("_", ".")}", body: params.to_json, headers: @headers).body
|
45
|
-
response.empty? ?
|
45
|
+
response.empty? ? response.code : JSON.parse(response)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
data/lib/xrpc/version.rb
CHANGED