creditsafe 0.5.1 → 0.5.2

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