xrpc 0.1.4 → 0.1.5
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 +4 -4
- 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: 888100afa57e9d231ced56deeb8c2081106e80010a39222471b96f52f4a4ec0e
|
4
|
+
data.tar.gz: e67558c7515a072013cb7cec64348c15e5a0a50c0a63704a653a4ba3102b7e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afedadd059ba04cd2089b45493f9e452a7f5cf415273a53581af91349d6b6fa5a025ec91ed905e6cb3dc42fe73a9f04b2d4dd6454bdec1444fb2ecb01c59b94f
|
7
|
+
data.tar.gz: 5aa3f9656bad8a5512c50dd7e2aab8b529912d4877cf032bf287176640b8d79c87f72dad615221a49c666831e45aae004e5e6ad8874a9a22ea83ab959351c529
|
data/lib/xrpc/client.rb
CHANGED
@@ -27,8 +27,8 @@ module XRPC
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def method_missing(method_name, **params)
|
30
|
-
response = self.class.get("/xrpc/#{method_name.to_s.gsub("_", ".")}", query: params, headers: @headers)
|
31
|
-
response.empty? ? response.code : JSON.parse(response)
|
30
|
+
response = self.class.get("/xrpc/#{method_name.to_s.gsub("_", ".")}", query: params, headers: @headers)
|
31
|
+
response.body.empty? ? response.code : JSON.parse(response.body)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -41,8 +41,8 @@ module XRPC
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def method_missing(method_name, **params)
|
44
|
-
response = self.class.post("/xrpc/#{method_name.to_s.gsub("_", ".")}", body: params.to_json, headers: @headers)
|
45
|
-
response.empty? ? response.code : JSON.parse(response)
|
44
|
+
response = self.class.post("/xrpc/#{method_name.to_s.gsub("_", ".")}", body: params.to_json, headers: @headers)
|
45
|
+
response.body.empty? ? response.code : JSON.parse(response.body)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
data/lib/xrpc/version.rb
CHANGED