creditsafe 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +17 -17
- data/.gitignore +2 -2
- data/.rspec +1 -1
- data/.rubocop.yml +11 -11
- data/.ruby-version +1 -1
- data/CHANGELOG.md +41 -37
- data/Gemfile +5 -5
- data/Gemfile.lock +127 -125
- data/LICENSE.txt +22 -22
- data/README.md +138 -138
- data/creditsafe.gemspec +35 -35
- data/data/creditsafe-live.xml +342 -342
- data/data/creditsafe-test.xml +342 -342
- data/lib/creditsafe.rb +4 -4
- data/lib/creditsafe/client.rb +158 -156
- data/lib/creditsafe/errors.rb +16 -14
- data/lib/creditsafe/match_type.rb +115 -115
- data/lib/creditsafe/messages.rb +97 -97
- data/lib/creditsafe/namespace.rb +20 -20
- data/lib/creditsafe/request/company_report.rb +42 -42
- data/lib/creditsafe/request/find_company.rb +98 -98
- data/lib/creditsafe/version.rb +5 -5
- data/spec/creditsafe/client_spec.rb +369 -372
- 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 +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d36d2af4798e1c4a5a8561cb308fd24b2fd046f9
|
4
|
+
data.tar.gz: 9824207f9b7024aa3590cede22f46ad242f1abc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bb9d9a0e26b2564fb4b0b18b10d246b76148de7d3e8390b96ed8a8d05b56ad724da94f20aa0909ccc4302dde619510cc044dfde44d1dff3b3af20a417374e5f
|
7
|
+
data.tar.gz: 58508f3069cf2c216774ef633ec2f80c94439ff1b0bf63c34594035e5d5260ba6c206c55a2c4d080be21353e9925ea538f2780030ce4bd76d393418189786ddd
|
data/.circleci/config.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
version: 2
|
2
|
-
jobs:
|
3
|
-
build:
|
4
|
-
working_directory: ~/creditsafe-ruby
|
5
|
-
docker:
|
6
|
-
- image: ruby:2.5.0
|
7
|
-
steps:
|
8
|
-
- checkout
|
9
|
-
- restore_cache:
|
10
|
-
key: gemfile-{{ checksum "Gemfile" }}
|
11
|
-
- run: bundle install --path vendor/bundle
|
12
|
-
- save_cache:
|
13
|
-
key: gemfile-{{ checksum "Gemfile" }}
|
14
|
-
paths:
|
15
|
-
- "vendor/bundle"
|
16
|
-
- run: bundle exec rubocop
|
17
|
-
- run: bundle exec rspec --format RspecJunitFormatter
|
1
|
+
version: 2
|
2
|
+
jobs:
|
3
|
+
build:
|
4
|
+
working_directory: ~/creditsafe-ruby
|
5
|
+
docker:
|
6
|
+
- image: ruby:2.5.0
|
7
|
+
steps:
|
8
|
+
- checkout
|
9
|
+
- restore_cache:
|
10
|
+
key: gemfile-{{ checksum "Gemfile" }}
|
11
|
+
- run: bundle install --path vendor/bundle
|
12
|
+
- save_cache:
|
13
|
+
key: gemfile-{{ checksum "Gemfile" }}
|
14
|
+
paths:
|
15
|
+
- "vendor/bundle"
|
16
|
+
- run: bundle exec rubocop
|
17
|
+
- run: bundle exec rspec --format RspecJunitFormatter
|
data/.gitignore
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
.bundle/
|
2
|
-
bin/
|
1
|
+
.bundle/
|
2
|
+
bin/
|
data/.rspec
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--color
|
1
|
+
--color
|
data/.rubocop.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
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
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.1
|
1
|
+
2.3.1
|
data/CHANGELOG.md
CHANGED
@@ -1,37 +1,41 @@
|
|
1
|
-
## v0.5.
|
2
|
-
|
3
|
-
-
|
4
|
-
|
5
|
-
## v0.5.
|
6
|
-
|
7
|
-
-
|
8
|
-
|
9
|
-
## v0.
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
-
|
23
|
-
|
24
|
-
## v0.3.
|
25
|
-
|
26
|
-
-
|
27
|
-
|
28
|
-
## v0.
|
29
|
-
|
30
|
-
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
1
|
+
## v0.5.2, 29 March 2018
|
2
|
+
|
3
|
+
- Raise `Creditsafe::TimeoutError` when a request times out
|
4
|
+
|
5
|
+
## v0.5.1, 1 March 2018
|
6
|
+
|
7
|
+
- Update allowed MatchTypes for some geos to reflect real world tests
|
8
|
+
|
9
|
+
## v0.5.0, 27 February 2018
|
10
|
+
|
11
|
+
- Automatically chooses a valid MatchType when searching for companies by name
|
12
|
+
|
13
|
+
## v0.4.0, 3 April 2017
|
14
|
+
|
15
|
+
- Adds support for including a postal code when searching for German companies by name
|
16
|
+
(@manojapr)
|
17
|
+
|
18
|
+
## v0.3.2, 27 February 2017
|
19
|
+
|
20
|
+
- Adds support for using Creditsafe's test environment, specified when instantiating the
|
21
|
+
client, as well as customising the log level used by the Savon SOAP client
|
22
|
+
- Adds support for finding companies in Germany by name, as well as company number
|
23
|
+
|
24
|
+
## v0.3.1, 6 January 2017
|
25
|
+
|
26
|
+
- Suppress password when inspecting client
|
27
|
+
|
28
|
+
## v0.3.0, 4 August 2016
|
29
|
+
|
30
|
+
- Add instrumentation to SOAP requests
|
31
|
+
|
32
|
+
## v0.2.0, 16 March 2016
|
33
|
+
|
34
|
+
- Subclass `ApiError` to distinguish between different Creditsafe error types
|
35
|
+
(patch by [greysteil](https://github.com/greysteil))
|
36
|
+
|
37
|
+
|
38
|
+
## v0.1.1, 15 February 2016
|
39
|
+
|
40
|
+
- Allow `city` parameter in `find_company` for German company lookups
|
41
|
+
(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/Gemfile.lock
CHANGED
@@ -1,125 +1,127 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
creditsafe (0.5.
|
5
|
-
activesupport (>= 4.2.0)
|
6
|
-
excon (~> 0.45)
|
7
|
-
savon (~> 2.8)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
activesupport (5.1.
|
13
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
i18n (
|
15
|
-
minitest (~> 5.1)
|
16
|
-
tzinfo (~> 1.1)
|
17
|
-
addressable (2.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
rubocop
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
rspec-
|
61
|
-
|
62
|
-
rspec-
|
63
|
-
rspec-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
rspec-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
creditsafe (0.5.2)
|
5
|
+
activesupport (>= 4.2.0)
|
6
|
+
excon (~> 0.45)
|
7
|
+
savon (~> 2.8)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activesupport (5.1.6)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (>= 0.7, < 2)
|
15
|
+
minitest (~> 5.1)
|
16
|
+
tzinfo (~> 1.1)
|
17
|
+
addressable (2.5.2)
|
18
|
+
public_suffix (>= 2.0.2, < 4.0)
|
19
|
+
akami (1.3.1)
|
20
|
+
gyoku (>= 0.4.0)
|
21
|
+
nokogiri
|
22
|
+
ast (2.4.0)
|
23
|
+
builder (3.2.3)
|
24
|
+
coderay (1.1.2)
|
25
|
+
compare-xml (0.65)
|
26
|
+
nokogiri (~> 1.8)
|
27
|
+
concurrent-ruby (1.0.5)
|
28
|
+
crack (0.4.3)
|
29
|
+
safe_yaml (~> 1.0.0)
|
30
|
+
diff-lcs (1.3)
|
31
|
+
excon (0.62.0)
|
32
|
+
gc_ruboconfig (2.3.5)
|
33
|
+
rubocop (~> 0.54.0)
|
34
|
+
rubocop-rspec (~> 1.24)
|
35
|
+
gyoku (1.3.1)
|
36
|
+
builder (>= 2.1.2)
|
37
|
+
hashdiff (0.3.7)
|
38
|
+
httpi (2.4.3)
|
39
|
+
rack
|
40
|
+
socksify
|
41
|
+
i18n (1.0.0)
|
42
|
+
concurrent-ruby (~> 1.0)
|
43
|
+
method_source (0.9.0)
|
44
|
+
mini_portile2 (2.3.0)
|
45
|
+
minitest (5.11.3)
|
46
|
+
nokogiri (1.8.2)
|
47
|
+
mini_portile2 (~> 2.3.0)
|
48
|
+
nori (2.6.0)
|
49
|
+
parallel (1.12.1)
|
50
|
+
parser (2.5.0.5)
|
51
|
+
ast (~> 2.4.0)
|
52
|
+
powerpack (0.1.1)
|
53
|
+
pry (0.11.3)
|
54
|
+
coderay (~> 1.1.0)
|
55
|
+
method_source (~> 0.9.0)
|
56
|
+
public_suffix (3.0.2)
|
57
|
+
rack (2.0.4)
|
58
|
+
rainbow (3.0.0)
|
59
|
+
rspec (3.7.0)
|
60
|
+
rspec-core (~> 3.7.0)
|
61
|
+
rspec-expectations (~> 3.7.0)
|
62
|
+
rspec-mocks (~> 3.7.0)
|
63
|
+
rspec-core (3.7.1)
|
64
|
+
rspec-support (~> 3.7.0)
|
65
|
+
rspec-expectations (3.7.0)
|
66
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
67
|
+
rspec-support (~> 3.7.0)
|
68
|
+
rspec-its (1.2.0)
|
69
|
+
rspec-core (>= 3.0.0)
|
70
|
+
rspec-expectations (>= 3.0.0)
|
71
|
+
rspec-mocks (3.7.0)
|
72
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
73
|
+
rspec-support (~> 3.7.0)
|
74
|
+
rspec-support (3.7.1)
|
75
|
+
rspec_junit_formatter (0.3.0)
|
76
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
77
|
+
rubocop (0.54.0)
|
78
|
+
parallel (~> 1.10)
|
79
|
+
parser (>= 2.5)
|
80
|
+
powerpack (~> 0.1)
|
81
|
+
rainbow (>= 2.2.2, < 4.0)
|
82
|
+
ruby-progressbar (~> 1.7)
|
83
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
84
|
+
rubocop-rspec (1.24.0)
|
85
|
+
rubocop (>= 0.53.0)
|
86
|
+
ruby-progressbar (1.9.0)
|
87
|
+
safe_yaml (1.0.4)
|
88
|
+
savon (2.12.0)
|
89
|
+
akami (~> 1.2)
|
90
|
+
builder (>= 2.1.2)
|
91
|
+
gyoku (~> 1.2)
|
92
|
+
httpi (~> 2.3)
|
93
|
+
nokogiri (>= 1.8.1)
|
94
|
+
nori (~> 2.4)
|
95
|
+
wasabi (~> 3.4)
|
96
|
+
socksify (1.7.1)
|
97
|
+
thread_safe (0.3.6)
|
98
|
+
timecop (0.9.1)
|
99
|
+
tzinfo (1.2.5)
|
100
|
+
thread_safe (~> 0.1)
|
101
|
+
unicode-display_width (1.3.0)
|
102
|
+
wasabi (3.5.0)
|
103
|
+
httpi (~> 2.0)
|
104
|
+
nokogiri (>= 1.4.2)
|
105
|
+
webmock (3.3.0)
|
106
|
+
addressable (>= 2.3.6)
|
107
|
+
crack (>= 0.3.2)
|
108
|
+
hashdiff
|
109
|
+
|
110
|
+
PLATFORMS
|
111
|
+
ruby
|
112
|
+
|
113
|
+
DEPENDENCIES
|
114
|
+
bundler (~> 1.3)
|
115
|
+
compare-xml (~> 0.5)
|
116
|
+
creditsafe!
|
117
|
+
gc_ruboconfig (~> 2.3)
|
118
|
+
pry (~> 0.11)
|
119
|
+
rspec (~> 3.1)
|
120
|
+
rspec-its (~> 1.2)
|
121
|
+
rspec_junit_formatter (~> 0.3)
|
122
|
+
rubocop (~> 0.52)
|
123
|
+
timecop (~> 0.8)
|
124
|
+
webmock (~> 3.3)
|
125
|
+
|
126
|
+
BUNDLED WITH
|
127
|
+
1.16.1
|
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.
|