frenchy 0.2.9 → 0.3.0
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/frenchy/client.rb +3 -2
- data/lib/frenchy/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: 65e1a3deb604054b63aafdf5bb1b5a565485a684
|
|
4
|
+
data.tar.gz: bf9c15219f6fa720530a1598b7adc27ef9242baf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a97314440955f6d4a7048997c4309e65d95c6d5fa0207d5b01060178cadc51fded78c96d5d8e8db1c8beb199cf976a1d28f9770e33090eb9e6bddc219742b928
|
|
7
|
+
data.tar.gz: 9f138c7b0812c883307475f06b7c0fd47f51e62602183d5706db3b802aad3c9318571b7ba6eba5e934f9dba297eaad7ded6b2c0c753b115441bb65b881f1115f
|
data/lib/frenchy/client.rb
CHANGED
|
@@ -14,6 +14,7 @@ module Frenchy
|
|
|
14
14
|
@timeout = options.fetch("timeout") { 30 }
|
|
15
15
|
@retries = options.fetch("retries") { 0 }
|
|
16
16
|
@backoff_delay = options.fetch("backoff_delay") { 1.0 }
|
|
17
|
+
@headers = options.fetch("headers") { {} }
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
# Issue a get request with the given path and query parameters. Get
|
|
@@ -50,7 +51,7 @@ module Frenchy
|
|
|
50
51
|
headers = {
|
|
51
52
|
"User-Agent" => "Frenchy/#{Frenchy::VERSION}",
|
|
52
53
|
"Accept" => "application/json",
|
|
53
|
-
}
|
|
54
|
+
}.merge(@headers)
|
|
54
55
|
|
|
55
56
|
# Set the URI path
|
|
56
57
|
uri.path = path
|
|
@@ -108,7 +109,7 @@ module Frenchy
|
|
|
108
109
|
when 404
|
|
109
110
|
# Explicitly handle not found errors
|
|
110
111
|
raise Frenchy::NotFound.new(nil, reqinfo, resp)
|
|
111
|
-
when 503
|
|
112
|
+
when 503, 504
|
|
112
113
|
# Explicitly handle temporarily unavailable errors
|
|
113
114
|
raise Frenchy::TemporarilyUnavailable.new(nil, reqinfo, resp)
|
|
114
115
|
else
|
data/lib/frenchy/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: frenchy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Coene
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|