Skip to content

Commit

Permalink
Merge pull request #30 from securenative/dev
Browse files Browse the repository at this point in the history
Use milliseconds instead of seconds for reader timeout
  • Loading branch information
inbaltako authored Oct 26, 2020
2 parents 1b18ef2 + 1094882 commit 685d6dd
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
securenative (0.1.35)
securenative (0.1.36)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ SECURENATIVE_API_KEY: dsbe27fh3437r2yd326fg3fdg36f43
SECURENATIVE_PROXY_HEADERS: ["CF-Connecting-IP"]
```
Initialize sdk as showed above.
Initialize sdk as shown above.
### Options 2: Using ConfigurationBuilder
Expand Down
2 changes: 1 addition & 1 deletion lib/securenative/event_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def send_sync(event, resource_path)
res = @http_client.post(resource_path, EventManager.serialize(event).to_json)

if res.nil? || res.code != '200'
SecureNative::Log.info("SecureNative failed to call endpoint #{resource_path} with event #{event}. adding back to queue")
SecureNative::Log.info("SecureNative failed to call endpoint #{resource_path} with event #{event}")
end

res
Expand Down
2 changes: 1 addition & 1 deletion lib/securenative/http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def post(path, body)
headers = _headers

client = Net::HTTP.new(uri.host, uri.port)
client.read_timeout = @options.timeout
client.read_timeout = @options.timeout / 1000
client.use_ssl = true
client.verify_mode = OpenSSL::SSL::VERIFY_NONE

Expand Down
2 changes: 1 addition & 1 deletion lib/securenative/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module SecureNative
VERSION = '0.1.35'
VERSION = '0.1.36'
end
2 changes: 1 addition & 1 deletion spec/securenative/spec_api_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Authorization' => 'YOUR_API_KEY',
'Content-Type' => 'application/json',
'Sn-Version' => '0.1.35',
'Sn-Version' => '0.1.36',
'User-Agent' => 'SecureNative-ruby'
}
).to_return(status: 200, body: '', headers: {})
Expand Down
6 changes: 3 additions & 3 deletions spec/securenative/spec_event_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def initialize
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Authorization' => 'YOUR_API_KEY',
'Content-Type' => 'application/json',
'Sn-Version' => '0.1.35',
'Sn-Version' => '0.1.36',
'User-Agent' => 'SecureNative-ruby'
})
.to_return(status: 200, body: '', headers: {})
Expand All @@ -53,7 +53,7 @@ def initialize
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Authorization' => 'YOUR_API_KEY',
'Content-Type' => 'application/json',
'Sn-Version' => '0.1.35',
'Sn-Version' => '0.1.36',
'User-Agent' => 'SecureNative-ruby'
})
.to_return(status: 401, body: '', headers: {})
Expand All @@ -74,7 +74,7 @@ def initialize
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Authorization' => 'YOUR_API_KEY',
'Content-Type' => 'application/json',
'Sn-Version' => '0.1.35',
'Sn-Version' => '0.1.36',
'User-Agent' => 'SecureNative-ruby'
})
.to_return(status: 500, body: '', headers: {})
Expand Down
2 changes: 1 addition & 1 deletion spec/securenative/spec_http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Authorization' => 'YOUR_API_KEY',
'Content-Type' => 'application/json',
'Sn-Version' => '0.1.35',
'Sn-Version' => '0.1.36',
'User-Agent' => 'SecureNative-ruby'
}).to_return(status: 200, body: '', headers: {})

Expand Down

0 comments on commit 685d6dd

Please sign in to comment.