shiny-sdk 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shiny-sdk.rb +2 -2
- data/shiny-sdk.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56f3aaede8a828302d70b50a9d08195e5cde3047
|
4
|
+
data.tar.gz: e5512e3ec167d8c0a23ae907e3317d1813f7d3d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54fe92825571f5e7c1a95dc0cce93879127f513a9e0d8fefa1e342e07d0dcd3e4711bb6755cafda9879a4b1b563d876e7e0d0840fd4085ab1da767e5326567de
|
7
|
+
data.tar.gz: 83ef04ef5ae4f71663d77e18995339db3b946fd02e6b17084b2436546da32deb05cb0d0f1955a44087cc27462a9327418630041297d96bd8f5e5ebb6c8d45aeb
|
data/lib/shiny-sdk.rb
CHANGED
@@ -47,7 +47,7 @@ class Shiny
|
|
47
47
|
payload["event"] = event.to_json
|
48
48
|
|
49
49
|
response = Net::HTTP.post_form(URI.parse(url), payload)
|
50
|
-
if response.code
|
50
|
+
if response.code == '200'
|
51
51
|
return JSON.parse(response.body)
|
52
52
|
else
|
53
53
|
raise ShinyError.new('Network error:' + response.code)
|
@@ -60,7 +60,7 @@ class Shiny
|
|
60
60
|
uri = URI.parse(url)
|
61
61
|
req = Net::HTTP::Get.new(uri)
|
62
62
|
response = Net::HTTP.start(uri.host, uri.port) {|http| http.request req }
|
63
|
-
if response.code
|
63
|
+
if response.code == '200'
|
64
64
|
return JSON.parse(response.body)
|
65
65
|
else
|
66
66
|
raise ShinyError.new('Network error:' + response.code)
|
data/shiny-sdk.gemspec
CHANGED