taxjar-ruby 3.0.1 → 3.0.2
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/CHANGELOG.md +5 -1
- data/lib/taxjar/api/request.rb +2 -0
- data/lib/taxjar/version.rb +1 -1
- data/spec/taxjar/api/request_spec.rb +18 -0
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59f7440e50a1552f055f03501341b8883c960d9e85d50de6817ec7b7ca3908a1
|
|
4
|
+
data.tar.gz: 74712431ab3d1ad24fdfd064aa61cbdf53f5b47061d6eb61e032405ca9e2a539
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73aa9395d63a8b078699b23dcac7e97555831de2846db337e5ea32861fc6f3722589c6c0437eb7c8349d2f53614227f54cb11506d94370dbbac15f8c49fd7ea5
|
|
7
|
+
data.tar.gz: 95d3fb22ef2bcbf85fd5e256eb628765f8f1698ebedd5527b9f3fbc952357aa0fe6b3e04f87727dc4493c5feb7741ca309e73d3d93d1337c780083fc0cd6f8eb
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.0.2] - 2021-03-18
|
|
11
|
+
- Re-classify `HTTP::ConnectionError` and other `HTTP::Error` types as `Taxjar::Error`
|
|
12
|
+
|
|
10
13
|
## [3.0.1] - 2021-03-16
|
|
11
14
|
- Throw a `Taxjar::Error` exception for any non-successful HTTP response
|
|
12
15
|
|
|
@@ -46,7 +49,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
46
49
|
- Update minimum required Ruby version to 2.0
|
|
47
50
|
- Update HTTP (The Gem) to 2.2
|
|
48
51
|
|
|
49
|
-
[Unreleased]: https://github.com/taxjar/taxjar-ruby/compare/v3.0.
|
|
52
|
+
[Unreleased]: https://github.com/taxjar/taxjar-ruby/compare/v3.0.2...HEAD
|
|
53
|
+
[3.0.2]: https://github.com/taxjar/taxjar-ruby/compare/v3.0.1...v3.0.2
|
|
50
54
|
[3.0.1]: https://github.com/taxjar/taxjar-ruby/compare/v3.0.0...v3.0.1
|
|
51
55
|
[3.0.0]: https://github.com/taxjar/taxjar-ruby/compare/v2.6.1...v3.0.0
|
|
52
56
|
[2.6.1]: https://github.com/taxjar/taxjar-ruby/compare/v2.6.0...v2.6.1
|
data/lib/taxjar/api/request.rb
CHANGED
data/lib/taxjar/version.rb
CHANGED
|
@@ -175,6 +175,24 @@ describe Taxjar::API::Request do
|
|
|
175
175
|
expect{subject.perform}.to raise_error(Taxjar::Error::ServerError)
|
|
176
176
|
end
|
|
177
177
|
|
|
178
|
+
[
|
|
179
|
+
HTTP::Error,
|
|
180
|
+
HTTP::ConnectionError,
|
|
181
|
+
HTTP::RequestError,
|
|
182
|
+
HTTP::ResponseError,
|
|
183
|
+
HTTP::StateError,
|
|
184
|
+
HTTP::TimeoutError,
|
|
185
|
+
HTTP::HeaderError
|
|
186
|
+
].each do |http_error_class|
|
|
187
|
+
context "#{http_error_class}" do
|
|
188
|
+
it "is classified as a Taxjar::Error" do
|
|
189
|
+
stub_request(:get, "https://api.taxjar.com/api_path").to_raise(http_error_class)
|
|
190
|
+
|
|
191
|
+
expect{subject.perform}.to raise_error(Taxjar::Error)
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
178
196
|
Taxjar::Error::ERRORS.each do |status, exception|
|
|
179
197
|
context "when HTTP status is #{status}" do
|
|
180
198
|
it "raises #{exception}" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: taxjar-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- TaxJar
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-03-
|
|
11
|
+
date: 2021-03-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -202,8 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
202
202
|
- !ruby/object:Gem::Version
|
|
203
203
|
version: '0'
|
|
204
204
|
requirements: []
|
|
205
|
-
|
|
206
|
-
rubygems_version: 2.7.6.2
|
|
205
|
+
rubygems_version: 3.2.14
|
|
207
206
|
signing_key:
|
|
208
207
|
specification_version: 4
|
|
209
208
|
summary: Ruby wrapper for Taxjar API
|