avatax 20.9.0 → 21.6.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.
@@ -1,3 +1,3 @@
1
1
  module AvaTax
2
- VERSION = '20.9.0'.freeze unless defined?(::AvaTax::VERSION)
2
+ VERSION = '21.6.0'.freeze unless defined?(::AvaTax::VERSION)
3
3
  end
@@ -0,0 +1,25 @@
1
+ require File.expand_path('../../spec_helper', __FILE__)
2
+
3
+ describe AvaTax::Request do
4
+
5
+ describe ".request" do
6
+ it "should default to a 1200 second timeout" do
7
+ @client.faraday_response = true
8
+ response = @client.request(:get, 'path', 'model')
9
+ expect(response.env.request['timeout']).to eq(1200)
10
+ end
11
+
12
+ it "should allow setting a custom timeout" do
13
+ @client.faraday_response = true
14
+ @client.connection_options = {
15
+ request: {
16
+ open_timeout: 5,
17
+ timeout: 10
18
+ }
19
+ }
20
+ response = @client.request(:get, 'path', 'model')
21
+ expect(response.env.request['open_timeout']).to eq(5)
22
+ expect(response.env.request['timeout']).to eq(10)
23
+ end
24
+ end
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avatax
3
3
  version: !ruby/object:Gem::Version
4
- version: 20.9.0
4
+ version: 21.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Vorwaller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-14 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -170,6 +170,7 @@ files:
170
170
  - lib/avatax/version.rb
171
171
  - spec/avatax/client/accounts_spec.rb
172
172
  - spec/avatax/client/transactions_spec.rb
173
+ - spec/avatax/request_spec.rb
173
174
  - spec/avatax_spec.rb
174
175
  - spec/credentials.yaml.example
175
176
  - spec/fixtures/accounts.json