creditsafe 0.6.0 → 0.6.1

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.
Files changed (39) hide show
  1. checksums.yaml +5 -5
  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 +49 -45
  8. data/Gemfile +5 -5
  9. data/Gemfile.lock +129 -129
  10. data/LICENSE.txt +22 -22
  11. data/README.md +175 -175
  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 -158
  17. data/lib/creditsafe/constants.rb +49 -49
  18. data/lib/creditsafe/errors.rb +16 -16
  19. data/lib/creditsafe/match_type.rb +115 -115
  20. data/lib/creditsafe/messages.rb +97 -97
  21. data/lib/creditsafe/namespace.rb +20 -20
  22. data/lib/creditsafe/request/company_report.rb +42 -42
  23. data/lib/creditsafe/request/find_company.rb +120 -120
  24. data/lib/creditsafe/version.rb +5 -5
  25. data/spec/creditsafe/client_spec.rb +423 -423
  26. data/spec/creditsafe/messages_spec.rb +76 -76
  27. data/spec/fixtures/company-report-not-found.xml +13 -13
  28. data/spec/fixtures/company-report-request.xml +1 -1
  29. data/spec/fixtures/company-report-successful.xml +582 -582
  30. data/spec/fixtures/error-fault.xml +8 -8
  31. data/spec/fixtures/error-invalid-credentials.html +31 -31
  32. data/spec/fixtures/find-companies-error-no-text.xml +11 -11
  33. data/spec/fixtures/find-companies-error.xml +11 -11
  34. data/spec/fixtures/find-companies-none-found.xml +13 -13
  35. data/spec/fixtures/find-companies-request.xml +1 -1
  36. data/spec/fixtures/find-companies-successful-multi.xml +493 -493
  37. data/spec/fixtures/find-companies-successful.xml +29 -29
  38. data/spec/spec_helper.rb +14 -14
  39. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d7e9dc737539af843ce3a9b181fdb7d08bdcd7c1
4
- data.tar.gz: b05479c1bd360574152a8d2e2d73f975248da52e
2
+ SHA256:
3
+ metadata.gz: '009dfc0b688a963214823a18e0de40494984e1594edc42862bd3fb6b1ed507b1'
4
+ data.tar.gz: 6656c4d91637820929955fa221bd42944e783655cf28ce5952fa8c665bf19c7b
5
5
  SHA512:
6
- metadata.gz: bcee6d9fb09ce4ece19f833031437f6ccd721f13456cdb0278a434f1f05ed86dc9ba364fd79924c74f4e08b975c620d0919998165ddc35416962635fc45dde01
7
- data.tar.gz: 14da6df79c7baf7de5ca7989311a5deafee3efd36b060cad04d9ec3fc5b4cb9bb626f2a17574c2a9e0197ffbdec1a5ae583ac83aa8129312f0aa680caba54bf1
6
+ metadata.gz: 64a9f02e073da8a1d5c0be1b77c8417cc4ce418134604cd8fb1ef0740ca4d7716465536979a716d049dc5dcaa179ddc8fe331b63e7a29039faac283eb1617fe3
7
+ data.tar.gz: f9b01be220c9ee3837a2d75491ddccebfb7e1c9fcc460a7a10c56cf56313c15ab1bc27cd828b86fb2ebf83dd41ff3a9467a16b3eff3ad543a261abc58fffbc6a
@@ -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,45 +1,49 @@
1
- ## v0.6.0, 25 September 2018
2
-
3
- - Add searching by VAT number
4
-
5
- ## v0.5.2, 29 March 2018
6
-
7
- - Raise `Creditsafe::TimeoutError` when a request times out
8
-
9
- ## v0.5.1, 1 March 2018
10
-
11
- - Update allowed MatchTypes for some geos to reflect real world tests
12
-
13
- ## v0.5.0, 27 February 2018
14
-
15
- - Automatically chooses a valid MatchType when searching for companies by name
16
-
17
- ## v0.4.0, 3 April 2017
18
-
19
- - Adds support for including a postal code when searching for German companies by name
20
- (@manojapr)
21
-
22
- ## v0.3.2, 27 February 2017
23
-
24
- - Adds support for using Creditsafe's test environment, specified when instantiating the
25
- client, as well as customising the log level used by the Savon SOAP client
26
- - Adds support for finding companies in Germany by name, as well as company number
27
-
28
- ## v0.3.1, 6 January 2017
29
-
30
- - Suppress password when inspecting client
31
-
32
- ## v0.3.0, 4 August 2016
33
-
34
- - Add instrumentation to SOAP requests
35
-
36
- ## v0.2.0, 16 March 2016
37
-
38
- - Subclass `ApiError` to distinguish between different Creditsafe error types
39
- (patch by [greysteil](https://github.com/greysteil))
40
-
41
-
42
- ## v0.1.1, 15 February 2016
43
-
44
- - Allow `city` parameter in `find_company` for German company lookups
45
- (patch by [greysteil](https://github.com/greysteil))
1
+ ## v0.6.1, 6 November 2018
2
+
3
+ - Update dependencies: activesupport, nokogiri, pry, rack
4
+
5
+ ## v0.6.0, 25 September 2018
6
+
7
+ - Add searching by VAT number
8
+
9
+ ## v0.5.2, 29 March 2018
10
+
11
+ - Raise `Creditsafe::TimeoutError` when a request times out
12
+
13
+ ## v0.5.1, 1 March 2018
14
+
15
+ - Update allowed MatchTypes for some geos to reflect real world tests
16
+
17
+ ## v0.5.0, 27 February 2018
18
+
19
+ - Automatically chooses a valid MatchType when searching for companies by name
20
+
21
+ ## v0.4.0, 3 April 2017
22
+
23
+ - Adds support for including a postal code when searching for German companies by name
24
+ (@manojapr)
25
+
26
+ ## v0.3.2, 27 February 2017
27
+
28
+ - Adds support for using Creditsafe's test environment, specified when instantiating the
29
+ client, as well as customising the log level used by the Savon SOAP client
30
+ - Adds support for finding companies in Germany by name, as well as company number
31
+
32
+ ## v0.3.1, 6 January 2017
33
+
34
+ - Suppress password when inspecting client
35
+
36
+ ## v0.3.0, 4 August 2016
37
+
38
+ - Add instrumentation to SOAP requests
39
+
40
+ ## v0.2.0, 16 March 2016
41
+
42
+ - Subclass `ApiError` to distinguish between different Creditsafe error types
43
+ (patch by [greysteil](https://github.com/greysteil))
44
+
45
+
46
+ ## v0.1.1, 15 February 2016
47
+
48
+ - Allow `city` parameter in `find_company` for German company lookups
49
+ (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,129 +1,129 @@
1
- PATH
2
- remote: .
3
- specs:
4
- creditsafe (0.6.0)
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.2.0)
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.66)
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.11)
33
- rubocop (>= 0.57, < 0.59)
34
- rubocop-rspec (~> 1.25)
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
- jaro_winkler (1.5.1)
44
- method_source (0.9.0)
45
- mini_portile2 (2.3.0)
46
- minitest (5.11.3)
47
- nokogiri (1.8.4)
48
- mini_portile2 (~> 2.3.0)
49
- nori (2.6.0)
50
- parallel (1.12.1)
51
- parser (2.5.1.2)
52
- ast (~> 2.4.0)
53
- powerpack (0.1.2)
54
- pry (0.11.3)
55
- coderay (~> 1.1.0)
56
- method_source (~> 0.9.0)
57
- public_suffix (3.0.2)
58
- rack (2.0.4)
59
- rainbow (3.0.0)
60
- rspec (3.8.0)
61
- rspec-core (~> 3.8.0)
62
- rspec-expectations (~> 3.8.0)
63
- rspec-mocks (~> 3.8.0)
64
- rspec-core (3.8.0)
65
- rspec-support (~> 3.8.0)
66
- rspec-expectations (3.8.0)
67
- diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.8.0)
69
- rspec-its (1.2.0)
70
- rspec-core (>= 3.0.0)
71
- rspec-expectations (>= 3.0.0)
72
- rspec-mocks (3.8.0)
73
- diff-lcs (>= 1.2.0, < 2.0)
74
- rspec-support (~> 3.8.0)
75
- rspec-support (3.8.0)
76
- rspec_junit_formatter (0.4.1)
77
- rspec-core (>= 2, < 4, != 2.12.0)
78
- rubocop (0.58.2)
79
- jaro_winkler (~> 1.5.1)
80
- parallel (~> 1.10)
81
- parser (>= 2.5, != 2.5.1.1)
82
- powerpack (~> 0.1)
83
- rainbow (>= 2.2.2, < 4.0)
84
- ruby-progressbar (~> 1.7)
85
- unicode-display_width (~> 1.0, >= 1.0.1)
86
- rubocop-rspec (1.27.0)
87
- rubocop (>= 0.56.0)
88
- ruby-progressbar (1.10.0)
89
- safe_yaml (1.0.4)
90
- savon (2.12.0)
91
- akami (~> 1.2)
92
- builder (>= 2.1.2)
93
- gyoku (~> 1.2)
94
- httpi (~> 2.3)
95
- nokogiri (>= 1.8.1)
96
- nori (~> 2.4)
97
- wasabi (~> 3.4)
98
- socksify (1.7.1)
99
- thread_safe (0.3.6)
100
- timecop (0.9.1)
101
- tzinfo (1.2.5)
102
- thread_safe (~> 0.1)
103
- unicode-display_width (1.4.0)
104
- wasabi (3.5.0)
105
- httpi (~> 2.0)
106
- nokogiri (>= 1.4.2)
107
- webmock (3.4.2)
108
- addressable (>= 2.3.6)
109
- crack (>= 0.3.2)
110
- hashdiff
111
-
112
- PLATFORMS
113
- ruby
114
-
115
- DEPENDENCIES
116
- bundler (~> 1.3)
117
- compare-xml (~> 0.5)
118
- creditsafe!
119
- gc_ruboconfig (~> 2.3)
120
- pry (~> 0.11)
121
- rspec (~> 3.1)
122
- rspec-its (~> 1.2)
123
- rspec_junit_formatter (~> 0.3)
124
- rubocop (~> 0.52)
125
- timecop (~> 0.8)
126
- webmock (~> 3.3)
127
-
128
- BUNDLED WITH
129
- 1.16.5
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ creditsafe (0.6.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.2.1)
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.66)
26
+ nokogiri (~> 1.8)
27
+ concurrent-ruby (1.1.2)
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.11)
33
+ rubocop (>= 0.57, < 0.59)
34
+ rubocop-rspec (~> 1.25)
35
+ gyoku (1.3.1)
36
+ builder (>= 2.1.2)
37
+ hashdiff (0.3.7)
38
+ httpi (2.4.4)
39
+ rack
40
+ socksify
41
+ i18n (1.1.1)
42
+ concurrent-ruby (~> 1.0)
43
+ jaro_winkler (1.5.1)
44
+ method_source (0.9.1)
45
+ mini_portile2 (2.3.0)
46
+ minitest (5.11.3)
47
+ nokogiri (1.8.5)
48
+ mini_portile2 (~> 2.3.0)
49
+ nori (2.6.0)
50
+ parallel (1.12.1)
51
+ parser (2.5.1.2)
52
+ ast (~> 2.4.0)
53
+ powerpack (0.1.2)
54
+ pry (0.12.0)
55
+ coderay (~> 1.1.0)
56
+ method_source (~> 0.9.0)
57
+ public_suffix (3.0.2)
58
+ rack (2.0.6)
59
+ rainbow (3.0.0)
60
+ rspec (3.8.0)
61
+ rspec-core (~> 3.8.0)
62
+ rspec-expectations (~> 3.8.0)
63
+ rspec-mocks (~> 3.8.0)
64
+ rspec-core (3.8.0)
65
+ rspec-support (~> 3.8.0)
66
+ rspec-expectations (3.8.0)
67
+ diff-lcs (>= 1.2.0, < 2.0)
68
+ rspec-support (~> 3.8.0)
69
+ rspec-its (1.2.0)
70
+ rspec-core (>= 3.0.0)
71
+ rspec-expectations (>= 3.0.0)
72
+ rspec-mocks (3.8.0)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.8.0)
75
+ rspec-support (3.8.0)
76
+ rspec_junit_formatter (0.4.1)
77
+ rspec-core (>= 2, < 4, != 2.12.0)
78
+ rubocop (0.58.2)
79
+ jaro_winkler (~> 1.5.1)
80
+ parallel (~> 1.10)
81
+ parser (>= 2.5, != 2.5.1.1)
82
+ powerpack (~> 0.1)
83
+ rainbow (>= 2.2.2, < 4.0)
84
+ ruby-progressbar (~> 1.7)
85
+ unicode-display_width (~> 1.0, >= 1.0.1)
86
+ rubocop-rspec (1.27.0)
87
+ rubocop (>= 0.56.0)
88
+ ruby-progressbar (1.10.0)
89
+ safe_yaml (1.0.4)
90
+ savon (2.12.0)
91
+ akami (~> 1.2)
92
+ builder (>= 2.1.2)
93
+ gyoku (~> 1.2)
94
+ httpi (~> 2.3)
95
+ nokogiri (>= 1.8.1)
96
+ nori (~> 2.4)
97
+ wasabi (~> 3.4)
98
+ socksify (1.7.1)
99
+ thread_safe (0.3.6)
100
+ timecop (0.9.1)
101
+ tzinfo (1.2.5)
102
+ thread_safe (~> 0.1)
103
+ unicode-display_width (1.4.0)
104
+ wasabi (3.5.0)
105
+ httpi (~> 2.0)
106
+ nokogiri (>= 1.4.2)
107
+ webmock (3.4.2)
108
+ addressable (>= 2.3.6)
109
+ crack (>= 0.3.2)
110
+ hashdiff
111
+
112
+ PLATFORMS
113
+ ruby
114
+
115
+ DEPENDENCIES
116
+ bundler (~> 1.3)
117
+ compare-xml (~> 0.5)
118
+ creditsafe!
119
+ gc_ruboconfig (~> 2.3)
120
+ pry (~> 0.11)
121
+ rspec (~> 3.1)
122
+ rspec-its (~> 1.2)
123
+ rspec_junit_formatter (~> 0.3)
124
+ rubocop (~> 0.52)
125
+ timecop (~> 0.8)
126
+ webmock (~> 3.3)
127
+
128
+ BUNDLED WITH
129
+ 1.16.6