creditsafe 0.6.0 → 0.7.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 +5 -5
- data/.circleci/config.yml +66 -17
- data/.github/dependabot.yml +17 -0
- data/.gitignore +4 -2
- data/.rspec +1 -1
- data/.rubocop.yml +18 -11
- data/.ruby-version +1 -1
- data/CHANGELOG.md +64 -45
- data/Gemfile +5 -5
- data/LICENSE.txt +22 -22
- data/README.md +175 -175
- data/creditsafe.gemspec +35 -35
- data/data/creditsafe-live.xml +342 -342
- data/data/creditsafe-test.xml +342 -342
- data/lib/creditsafe/client.rb +165 -158
- data/lib/creditsafe/{constants.rb → country.rb} +49 -49
- data/lib/creditsafe/errors.rb +23 -16
- data/lib/creditsafe/match_type.rb +115 -115
- data/lib/creditsafe/messages.rb +98 -97
- data/lib/creditsafe/namespace.rb +20 -20
- data/lib/creditsafe/request/company_report.rb +42 -42
- data/lib/creditsafe/request/find_company.rb +118 -120
- data/lib/creditsafe/version.rb +5 -5
- data/lib/creditsafe.rb +4 -4
- data/spec/creditsafe/client_spec.rb +431 -423
- data/spec/creditsafe/messages_spec.rb +76 -76
- data/spec/fixtures/company-report-not-found.xml +13 -13
- data/spec/fixtures/company-report-request.xml +1 -1
- data/spec/fixtures/company-report-successful.xml +582 -582
- data/spec/fixtures/error-fault.xml +8 -8
- data/spec/fixtures/error-invalid-credentials.html +31 -31
- data/spec/fixtures/find-companies-error-no-text.xml +11 -11
- data/spec/fixtures/find-companies-error.xml +11 -11
- data/spec/fixtures/find-companies-none-found.xml +13 -13
- data/spec/fixtures/find-companies-request.xml +1 -1
- data/spec/fixtures/find-companies-successful-multi.xml +493 -493
- data/spec/fixtures/find-companies-successful.xml +29 -29
- data/spec/spec_helper.rb +14 -14
- metadata +46 -46
- data/Gemfile.lock +0 -129
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b8b73972a559fa2c2a39d2aa8155fe6369c9cefa3285502c9a21d34536bae3c6
|
4
|
+
data.tar.gz: ff09f26c803fdba79e4bc33bb0af3b8dfd3098d0d280c81532edbbfe08e3dc9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 123929e34d1a1c6f5069164a4c4d2824cdcad775a4edd4b08af102b29e1f1721921d28a8cb33b8e45b9ad713b1e30e2c9e1baa7f9c270ee94a45282e8a0c160d
|
7
|
+
data.tar.gz: 91393f169e292ecb3e8e24a77bdd480fbafcc02a17ddd15c9d1d810e308e4fb5a1d05e39349a1229beaf18b43cc6bf977ff39932a911f817252bb4e2ac567562
|
data/.circleci/config.yml
CHANGED
@@ -1,17 +1,66 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
---
|
2
|
+
version: 2.1
|
3
|
+
|
4
|
+
references:
|
5
|
+
bundle_install: &bundle_install
|
6
|
+
run:
|
7
|
+
name: Bundle
|
8
|
+
command: |
|
9
|
+
gem install bundler --no-document && \
|
10
|
+
bundle config set no-cache 'true' && \
|
11
|
+
bundle config set jobs '4' && \
|
12
|
+
bundle config set retry '3' && \
|
13
|
+
bundle install
|
14
|
+
|
15
|
+
cache_bundle: &cache_bundle
|
16
|
+
save_cache:
|
17
|
+
key: bundle-<< parameters.ruby_version >>-{{ checksum "creditsafe.gemspec" }}-{{ checksum "Gemfile" }}
|
18
|
+
paths:
|
19
|
+
- vendor/bundle
|
20
|
+
|
21
|
+
restore_bundle: &restore_bundle
|
22
|
+
restore_cache:
|
23
|
+
key: bundle-<< parameters.ruby_version >>-{{ checksum "creditsafe.gemspec" }}-{{ checksum "Gemfile" }}
|
24
|
+
|
25
|
+
steps: &steps
|
26
|
+
- checkout
|
27
|
+
- *restore_bundle
|
28
|
+
- *bundle_install
|
29
|
+
- *cache_bundle
|
30
|
+
- run:
|
31
|
+
name: Run specs
|
32
|
+
command: |
|
33
|
+
circleci tests glob "spec/**/*_spec.rb"
|
34
|
+
bundle exec rspec $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) --profile --format progress --format RspecJunitFormatter -o /tmp/circle_artifacts/rspec.xml
|
35
|
+
- run:
|
36
|
+
name: "Rubocop"
|
37
|
+
command: bundle exec rubocop --extra-details --display-style-guide --parallel --force-exclusion
|
38
|
+
- store_artifacts:
|
39
|
+
path: /tmp/circle_artifacts/
|
40
|
+
- store_test_results:
|
41
|
+
path: /tmp/circle_artifacts/
|
42
|
+
|
43
|
+
ruby_versions: &ruby_versions
|
44
|
+
- "2.7"
|
45
|
+
- "3.0"
|
46
|
+
|
47
|
+
jobs:
|
48
|
+
test_and_lint:
|
49
|
+
working_directory: /mnt/ramdisk
|
50
|
+
parameters:
|
51
|
+
ruby_version:
|
52
|
+
type: string
|
53
|
+
docker:
|
54
|
+
- image: cimg/ruby:<< parameters.ruby_version >>
|
55
|
+
environment:
|
56
|
+
CIRCLE_TEST_REPORTS: /tmp/circle_artifacts/
|
57
|
+
steps: *steps
|
58
|
+
|
59
|
+
workflows:
|
60
|
+
version: 2
|
61
|
+
tests:
|
62
|
+
jobs:
|
63
|
+
- test_and_lint:
|
64
|
+
matrix:
|
65
|
+
parameters:
|
66
|
+
ruby_version: *ruby_versions
|
@@ -0,0 +1,17 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
- package-ecosystem: bundler
|
4
|
+
directory: "/"
|
5
|
+
schedule:
|
6
|
+
interval: daily
|
7
|
+
open-pull-requests-limit: 10
|
8
|
+
ignore:
|
9
|
+
- dependency-name: webmock
|
10
|
+
versions:
|
11
|
+
- 3.11.1
|
12
|
+
- 3.11.2
|
13
|
+
- 3.11.3
|
14
|
+
- 3.12.0
|
15
|
+
- dependency-name: pry
|
16
|
+
versions:
|
17
|
+
- 0.14.0
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--color
|
1
|
+
--color
|
data/.rubocop.yml
CHANGED
@@ -1,11 +1,18 @@
|
|
1
|
-
inherit_gem:
|
2
|
-
gc_ruboconfig: rubocop.yml
|
3
|
-
|
4
|
-
RSpec/NestedGroups:
|
5
|
-
Max: 5
|
6
|
-
|
7
|
-
RSpec/ExampleLength:
|
8
|
-
Max: 20
|
9
|
-
|
10
|
-
RSpec/MultipleExpectations:
|
11
|
-
Max: 2
|
1
|
+
inherit_gem:
|
2
|
+
gc_ruboconfig: rubocop.yml
|
3
|
+
|
4
|
+
RSpec/NestedGroups:
|
5
|
+
Max: 5
|
6
|
+
|
7
|
+
RSpec/ExampleLength:
|
8
|
+
Max: 20
|
9
|
+
|
10
|
+
RSpec/MultipleExpectations:
|
11
|
+
Max: 2
|
12
|
+
|
13
|
+
AllCops:
|
14
|
+
TargetRubyVersion: 2.7
|
15
|
+
NewCops: enable
|
16
|
+
|
17
|
+
RSpec/ImplicitBlockExpectation:
|
18
|
+
Enabled: false
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.2
|
data/CHANGELOG.md
CHANGED
@@ -1,45 +1,64 @@
|
|
1
|
-
## v0.
|
2
|
-
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
## v0.
|
29
|
-
|
30
|
-
-
|
31
|
-
|
32
|
-
## v0.
|
33
|
-
|
34
|
-
-
|
35
|
-
|
36
|
-
## v0.
|
37
|
-
|
38
|
-
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
1
|
+
## v0.7.0, 5 October 2021
|
2
|
+
|
3
|
+
- Rename Constants::Country to Creditsafe::Country, to avoid polluting other namespaces
|
4
|
+
- Update dependencies: activesupport, excon
|
5
|
+
- Downgrade savon
|
6
|
+
- Require Ruby 2.7+
|
7
|
+
|
8
|
+
## v0.6.3, 18 December 2019
|
9
|
+
|
10
|
+
- Update dependencies: excon
|
11
|
+
|
12
|
+
## v0.6.2, 4 January 2019
|
13
|
+
|
14
|
+
- Treat Bad Gateway (502) errors separately
|
15
|
+
|
16
|
+
## v0.6.1, 6 November 2018
|
17
|
+
|
18
|
+
- Update dependencies: activesupport, nokogiri, pry, rack
|
19
|
+
|
20
|
+
## v0.6.0, 25 September 2018
|
21
|
+
|
22
|
+
- Add searching by VAT number
|
23
|
+
|
24
|
+
## v0.5.2, 29 March 2018
|
25
|
+
|
26
|
+
- Raise `Creditsafe::TimeoutError` when a request times out
|
27
|
+
|
28
|
+
## v0.5.1, 1 March 2018
|
29
|
+
|
30
|
+
- Update allowed MatchTypes for some geos to reflect real world tests
|
31
|
+
|
32
|
+
## v0.5.0, 27 February 2018
|
33
|
+
|
34
|
+
- Automatically chooses a valid MatchType when searching for companies by name
|
35
|
+
|
36
|
+
## v0.4.0, 3 April 2017
|
37
|
+
|
38
|
+
- Adds support for including a postal code when searching for German companies by name
|
39
|
+
(@manojapr)
|
40
|
+
|
41
|
+
## v0.3.2, 27 February 2017
|
42
|
+
|
43
|
+
- Adds support for using Creditsafe's test environment, specified when instantiating the
|
44
|
+
client, as well as customising the log level used by the Savon SOAP client
|
45
|
+
- Adds support for finding companies in Germany by name, as well as company number
|
46
|
+
|
47
|
+
## v0.3.1, 6 January 2017
|
48
|
+
|
49
|
+
- Suppress password when inspecting client
|
50
|
+
|
51
|
+
## v0.3.0, 4 August 2016
|
52
|
+
|
53
|
+
- Add instrumentation to SOAP requests
|
54
|
+
|
55
|
+
## v0.2.0, 16 March 2016
|
56
|
+
|
57
|
+
- Subclass `ApiError` to distinguish between different Creditsafe error types
|
58
|
+
(patch by [greysteil](https://github.com/greysteil))
|
59
|
+
|
60
|
+
|
61
|
+
## v0.1.1, 15 February 2016
|
62
|
+
|
63
|
+
- Allow `city` parameter in `find_company` for German company lookups
|
64
|
+
(patch by [greysteil](https://github.com/greysteil))
|
data/Gemfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
gemspec
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gemspec
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
Copyright (c) 2017 GoCardless Ltd
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
Copyright (c) 2017 GoCardless Ltd
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|