restforce-db 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c353c4cf61985f49453aeb607bbf74ed3cff9d6
4
- data.tar.gz: 125d5f6afbdb7c2d3701828cfc788877ca15498f
3
+ metadata.gz: f4b1e82e656d754fee2505a9598dcd5e02b8297e
4
+ data.tar.gz: b6be952cb6f9265899a0e52bbbe7d147528fcf83
5
5
  SHA512:
6
- metadata.gz: 51401160d558e087e8996c711b50df3f2e7eb2c68a2f45bbed155d0bcba0c13e14dc4450cf3c1516ee34b369511caea47a7e6e51a4c19cf83ea62cd7c73d6f2f
7
- data.tar.gz: 0fd4b9fce1deebb8569657431a8d130e8d9a0abc556c5a31acdd917975a7e55df17e0a750881e08e243d1c5bb64a4d2145ffd81a22ba7f304ba654da6b9df12f
6
+ metadata.gz: 544ea7874c322e617973648fa608028c5a8c63b2b4764e3f5e04ac10d930636ade8cdbcfb9e3af0570a0ba3a616939e7d827a804d879c949e35b10aa7c2faa3a
7
+ data.tar.gz: ef9be9235f09e481240d947b588e1dfc86d109a46594209b39f50484a0af9e13b4e92290ed7f70f893a22d25e92598ada48e131f56c393fcb887577747c626aa
@@ -9,6 +9,7 @@ module Restforce
9
9
  class Configuration
10
10
 
11
11
  DEFAULT_API_VERSION = "29.0".freeze
12
+ DEFAULT_TIMEOUT = 5
12
13
 
13
14
  attr_accessor(*%i(
14
15
  username
@@ -17,6 +18,7 @@ module Restforce
17
18
  client_id
18
19
  client_secret
19
20
  host
21
+ timeout
20
22
  api_version
21
23
  logger
22
24
  ))
@@ -73,6 +75,7 @@ module Restforce
73
75
  # We want to default to 29.0 or later, so we can support the API
74
76
  # endpoint for recently deleted records.
75
77
  self.api_version = configurations["api_version"] || DEFAULT_API_VERSION
78
+ self.timeout = configurations["timeout"] || DEFAULT_TIMEOUT
76
79
  end
77
80
 
78
81
  private
@@ -3,7 +3,7 @@ module Restforce
3
3
  # :nodoc:
4
4
  module DB
5
5
 
6
- VERSION = "2.3.0"
6
+ VERSION = "2.4.0"
7
7
 
8
8
  end
9
9
 
data/lib/restforce/db.rb CHANGED
@@ -90,6 +90,7 @@ module Restforce
90
90
  client_secret: configuration.client_secret,
91
91
  host: configuration.host,
92
92
  api_version: configuration.api_version,
93
+ timeout: configuration.timeout,
93
94
  )
94
95
  end
95
96
 
@@ -68,6 +68,14 @@ describe Restforce::DB::Configuration do
68
68
  expect(configuration.client_secret).to_equal secrets["client_secret"]
69
69
  expect(configuration.host).to_equal secrets["host"]
70
70
  end
71
+
72
+ it "defaults the API version to DEFAULT_API_VERSION" do
73
+ expect(configuration.api_version).to_equal Restforce::DB::Configuration::DEFAULT_API_VERSION
74
+ end
75
+
76
+ it "defaults the timeout to DEFAULT_TIMEOUT" do
77
+ expect(configuration.timeout).to_equal Restforce::DB::Configuration::DEFAULT_TIMEOUT
78
+ end
71
79
  end
72
80
 
73
81
  describe "when the loaded configuration is missing one or more keys" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restforce-db
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Horner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-11 00:00:00.000000000 Z
11
+ date: 2015-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord