restforce-db 2.3.0 → 2.4.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/restforce/db/configuration.rb +3 -0
- data/lib/restforce/db/version.rb +1 -1
- data/lib/restforce/db.rb +1 -0
- data/test/lib/restforce/db/configuration_test.rb +8 -0
- 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: f4b1e82e656d754fee2505a9598dcd5e02b8297e
|
4
|
+
data.tar.gz: b6be952cb6f9265899a0e52bbbe7d147528fcf83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/restforce/db/version.rb
CHANGED
data/lib/restforce/db.rb
CHANGED
@@ -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.
|
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
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|