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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecf8dc456d1c54c95c08e178b0532c2a34120faf
4
- data.tar.gz: 2f4852e2d285944e0deb57421bc2d42d7bfc5162
3
+ metadata.gz: 65e1a3deb604054b63aafdf5bb1b5a565485a684
4
+ data.tar.gz: bf9c15219f6fa720530a1598b7adc27ef9242baf
5
5
  SHA512:
6
- metadata.gz: 4dde73ee708851cccb34da13e58db45c135f6ef4afbd7fb653ce1586519162e4028ec149c4f6f67aa9b80bae1f80f275992e4bf2098361a88010a4f5a556d713
7
- data.tar.gz: e25d72b1eb1c487956cc4a72d29dd979c5521ab8e41328ee7278411d9387d6450a46f6ca89d38985fd2186213e2bea2c003c94f5b17f57d5664812e12edef0e1
6
+ metadata.gz: a97314440955f6d4a7048997c4309e65d95c6d5fa0207d5b01060178cadc51fded78c96d5d8e8db1c8beb199cf976a1d28f9770e33090eb9e6bddc219742b928
7
+ data.tar.gz: 9f138c7b0812c883307475f06b7c0fd47f51e62602183d5706db3b802aad3c9318571b7ba6eba5e934f9dba297eaad7ded6b2c0c753b115441bb65b881f1115f
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Frenchy
2
- VERSION = "0.2.9"
2
+ VERSION = "0.3.0"
3
3
  end
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.2.9
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-01-14 00:00:00.000000000 Z
11
+ date: 2015-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json