nexmo-voice 0.1.0 → 0.1.1

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: 7ed1c1f753d58c6150bf9ebd530581db7a4a8087
4
- data.tar.gz: da4b358a220faa34f0a9a1de37a0bc5f084a3826
3
+ metadata.gz: ae184c99ebe299cbd4292676ecf3cbd3abd3d26b
4
+ data.tar.gz: 21b45d35a87c5398f69bb85eef539bb2dd44079f
5
5
  SHA512:
6
- metadata.gz: e2d5bf776ca0a39bc00b4817d649bb52964b2827785d178d686bdd226034a3bd2ba3c632edf8ab125e6e0b076c0b02f94863a1d84c3dee1bdf54f2dafa44037c
7
- data.tar.gz: 4d4f695d64b4493226e82c7103ea75b61741fd4858a64fcb6bb2348b8b39f37208eea990c93871733cd0f5c1ea14f25583c283977241704c7087d82fdfb38796
6
+ metadata.gz: 78ced49e4f68710e11f573f5e904d6c797acfe8c2d55a1c69286b73c9dedd36fad67176ae9cea0ab149198e3e0c87aeb37ffe4b1fe5e28ec66d97cc34fa388ec
7
+ data.tar.gz: 2487753de41f53f8813518e1a81b10af0da1324d6ab6ab4813ef623e004d0f3eb9a12d7271f3c86f4b2673ceacbaa137b6ba94d38a7ecedec8b097c29d652a2a
@@ -9,11 +9,15 @@ module Nexmo
9
9
  BASE_URL = 'https://api.nexmo.com'
10
10
 
11
11
  class Client
12
+ DEFAULT_TIMEOUT = 10
13
+
12
14
  attr_accessor :nexmo_adaptor, :api_config,
13
15
  :calls, :ttses
14
16
 
15
17
  def initialize(api_key, api_secret, options = {})
16
- @nexmo_adaptor = RestClient::Resource.new(BASE_URL, timeout: options.fetch(:timeout, 10))
18
+ @nexmo_adaptor = RestClient::Resource.new(BASE_URL,
19
+ timeout: options.fetch(:timeout) { DEFAULT_TIMEOUT },
20
+ open_timeout: options.fetch(:open_timeout) { DEFAULT_TIMEOUT })
17
21
 
18
22
  @api_config = {
19
23
  api_key: api_key,
@@ -1,5 +1,5 @@
1
1
  module Nexmo
2
2
  module Voice
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -17,10 +17,12 @@ RSpec.describe Nexmo::Voice::Client do
17
17
 
18
18
  it 'sets the default timeout' do
19
19
  expect(client.nexmo_adaptor.timeout).to eq 10
20
+ expect(client.nexmo_adaptor.open_timeout).to eq 10
20
21
  end
21
22
 
22
23
  it 'sets the timeout' do
23
- another_client = Nexmo::Voice::Client.new api_key, api_secret, timeout: 2
24
+ another_client = Nexmo::Voice::Client.new api_key, api_secret, timeout: 2, open_timeout: 1
24
25
  expect(another_client.nexmo_adaptor.timeout).to eq 2
26
+ expect(another_client.nexmo_adaptor.open_timeout).to eq 1
25
27
  end
26
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexmo-voice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - fahchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client