creditsafe 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +17 -17
  3. data/.gitignore +3 -2
  4. data/.rspec +1 -1
  5. data/.rubocop.yml +11 -11
  6. data/.ruby-version +1 -1
  7. data/CHANGELOG.md +53 -49
  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 +165 -158
  17. data/lib/creditsafe/constants.rb +49 -49
  18. data/lib/creditsafe/errors.rb +17 -16
  19. data/lib/creditsafe/match_type.rb +115 -115
  20. data/lib/creditsafe/messages.rb +98 -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 +431 -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 +6 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '009dfc0b688a963214823a18e0de40494984e1594edc42862bd3fb6b1ed507b1'
4
- data.tar.gz: 6656c4d91637820929955fa221bd42944e783655cf28ce5952fa8c665bf19c7b
3
+ metadata.gz: 574436fed3fd1ff817c3d238e48f7b995792427aad3b55aea895581e3ef5aeb0
4
+ data.tar.gz: 420886b4cd88825d964645b3a4a8c820e729a15f446bf283067f540801648108
5
5
  SHA512:
6
- metadata.gz: 64a9f02e073da8a1d5c0be1b77c8417cc4ce418134604cd8fb1ef0740ca4d7716465536979a716d049dc5dcaa179ddc8fe331b63e7a29039faac283eb1617fe3
7
- data.tar.gz: f9b01be220c9ee3837a2d75491ddccebfb7e1c9fcc460a7a10c56cf56313c15ab1bc27cd828b86fb2ebf83dd41ff3a9467a16b3eff3ad543a261abc58fffbc6a
6
+ metadata.gz: af65359728b85b2c837c9f91e4470a61871fca66cab038a9a08469f483edf80d2ff866d139ce4d0442007d42a9437e7969eef562599ac5df868d93af45a1d48b
7
+ data.tar.gz: aacbf30d67d4e984a9dc2a30a0c4f219442ca4a2b25760f38e7d064b5032708357c21456ace8bb0c6f6c37f4d3590b97847d51b896c92c7393ebcffdd031d5d0
@@ -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,3 @@
1
- .bundle/
2
- bin/
1
+ .bundle/
2
+ bin/
3
+ *.gem
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.5.3
@@ -1,49 +1,53 @@
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))
1
+ ## v0.6.2, 4 January 2019
2
+
3
+ - Treat Bad Gateway (502) errors separately
4
+
5
+ ## v0.6.1, 6 November 2018
6
+
7
+ - Update dependencies: activesupport, nokogiri, pry, rack
8
+
9
+ ## v0.6.0, 25 September 2018
10
+
11
+ - Add searching by VAT number
12
+
13
+ ## v0.5.2, 29 March 2018
14
+
15
+ - Raise `Creditsafe::TimeoutError` when a request times out
16
+
17
+ ## v0.5.1, 1 March 2018
18
+
19
+ - Update allowed MatchTypes for some geos to reflect real world tests
20
+
21
+ ## v0.5.0, 27 February 2018
22
+
23
+ - Automatically chooses a valid MatchType when searching for companies by name
24
+
25
+ ## v0.4.0, 3 April 2017
26
+
27
+ - Adds support for including a postal code when searching for German companies by name
28
+ (@manojapr)
29
+
30
+ ## v0.3.2, 27 February 2017
31
+
32
+ - Adds support for using Creditsafe's test environment, specified when instantiating the
33
+ client, as well as customising the log level used by the Savon SOAP client
34
+ - Adds support for finding companies in Germany by name, as well as company number
35
+
36
+ ## v0.3.1, 6 January 2017
37
+
38
+ - Suppress password when inspecting client
39
+
40
+ ## v0.3.0, 4 August 2016
41
+
42
+ - Add instrumentation to SOAP requests
43
+
44
+ ## v0.2.0, 16 March 2016
45
+
46
+ - Subclass `ApiError` to distinguish between different Creditsafe error types
47
+ (patch by [greysteil](https://github.com/greysteil))
48
+
49
+
50
+ ## v0.1.1, 15 February 2016
51
+
52
+ - Allow `city` parameter in `find_company` for German company lookups
53
+ (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.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
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ creditsafe (0.6.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.2.2)
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.3)
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.14)
33
+ rubocop (>= 0.57, < 0.62)
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.2)
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.3.0)
52
+ ast (~> 2.4.0)
53
+ powerpack (0.1.2)
54
+ pry (0.12.2)
55
+ coderay (~> 1.1.0)
56
+ method_source (~> 0.9.0)
57
+ public_suffix (3.0.3)
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.60.0)
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.4.0)
86
+ rubocop-rspec (1.30.1)
87
+ rubocop (>= 0.60.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.1)
104
+ wasabi (3.5.0)
105
+ httpi (~> 2.0)
106
+ nokogiri (>= 1.4.2)
107
+ webmock (3.5.1)
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