Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the timeout #220

Merged
merged 1 commit into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Castle.configure do |config|
# For authenticate method you can set failover strategies: allow(default), deny, challenge, throw
config.failover_strategy = :deny

# Castle::RequestError is raised when timing out in milliseconds (default: 500 milliseconds)
config.request_timeout = 2000
# Castle::RequestError is raised when timing out in milliseconds (default: 1000 milliseconds)
config.request_timeout = 1500

# Base Castle API url
# config.base_url = "https://api.castle.io/v1"
Expand Down
2 changes: 1 addition & 1 deletion lib/castle/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Configuration

# API endpoint
BASE_URL = 'https://api.castle.io/v1'
REQUEST_TIMEOUT = 500 # in milliseconds
REQUEST_TIMEOUT = 1000 # in milliseconds
# regexp of trusted proxies which is always appended to the trusted proxy list
TRUSTED_PROXIES = [/
\A127\.0\.0\.1\Z|
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/castle/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

describe 'request_timeout' do
it do
expect(config.request_timeout).to be_eql(500)
expect(config.request_timeout).to be_eql(1000)
end

context 'with setter' do
Expand Down