thumbs_yup 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/thumbs_yup/configuration.rb +1 -1
- data/lib/thumbs_yup/error_renderer.rb +3 -1
- data/lib/thumbs_yup/server_embed.rb +9 -2
- data/lib/thumbs_yup/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: 6a2f1f68355fab205a7be8574642a4dae2bdd779
|
|
4
|
+
data.tar.gz: 3f070f8c63b48e52a0eb604cc3eaa24e6a861301
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d671911b8d756629ad517d1fe18ebaa0ffe410b3606efc5bbdd7c79e0cfe5f12fda2877aead23c9b263d2fa6927d7eb91936501d06aeb778b4cee7b09cf55882
|
|
7
|
+
data.tar.gz: 5a71a7ce80e18dc72640443a019da287fbda46feb3c75174e90fc882060f4b5bc1083a5f293513d2cb0985bb757f92bb715ec8f15900b09092f0f5bb2cc48038
|
|
@@ -16,8 +16,10 @@ module ThumbsYup
|
|
|
16
16
|
message = case vars[:message]
|
|
17
17
|
when "Record not found"
|
|
18
18
|
"Error: Please check your configuration and ensure that you have a ThumbsYup account."
|
|
19
|
+
when "Service unavailable"
|
|
20
|
+
"Error: A connection could not be made with the ThumbsYup service."
|
|
19
21
|
else
|
|
20
|
-
"Error:
|
|
22
|
+
"Error: There was an error retrieving your reviews."
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
vars[:message] = message
|
|
@@ -53,8 +53,15 @@ module ThumbsYup
|
|
|
53
53
|
request["Accept"] = "application/json"
|
|
54
54
|
|
|
55
55
|
http = Net::HTTP.new(uri.host, uri.port)
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
http.use_ssl = true
|
|
57
|
+
|
|
58
|
+
response = http.request(request) rescue nil
|
|
59
|
+
|
|
60
|
+
if response.present? && !response.body.blank?
|
|
61
|
+
JSON.parse(response.body)
|
|
62
|
+
else
|
|
63
|
+
{ "message" => "Service unavailable" }
|
|
64
|
+
end
|
|
58
65
|
end
|
|
59
66
|
|
|
60
67
|
def settings
|
data/lib/thumbs_yup/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thumbs_yup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jomana Malone
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-
|
|
12
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|