defra_ruby_validators 2.3.1 → 2.4.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.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/Rakefile +0 -2
- data/lib/defra_ruby/validators/base_validator.rb +6 -0
- data/lib/defra_ruby/validators/companies_house_number_validator.rb +5 -5
- data/lib/defra_ruby/validators/concerns/can_validate_characters.rb +1 -1
- data/lib/defra_ruby/validators/concerns/can_validate_length.rb +1 -1
- data/lib/defra_ruby/validators/concerns/can_validate_presence.rb +1 -1
- data/lib/defra_ruby/validators/concerns/can_validate_selection.rb +1 -1
- data/lib/defra_ruby/validators/email_validator.rb +1 -1
- data/lib/defra_ruby/validators/grid_reference_validator.rb +2 -2
- data/lib/defra_ruby/validators/past_date_validator.rb +2 -2
- data/lib/defra_ruby/validators/phone_number_validator.rb +1 -1
- data/lib/defra_ruby/validators/token_validator.rb +1 -1
- data/lib/defra_ruby/validators/version.rb +1 -1
- data/spec/defra_ruby/validators/companies_house_service_spec.rb +25 -13
- metadata +2 -26
- data/spec/cassettes/company_no_inactive.yml +0 -67
- data/spec/cassettes/company_no_not_found.yml +0 -64
- data/spec/cassettes/company_no_valid.yml +0 -65
- data/spec/examples.txt +0 -176
- data/spec/support/vcr.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21bdd325a2591dc6b3240957791d511239cadf35
|
4
|
+
data.tar.gz: dbf3657df6f3c814a3f2081a4c576f3319c5c713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22c834aeb4feacd105d153c38a0db5ba1ea3951e8f4e78fb8bb8f48fb1a797ba64973b98565ea4c51904ca623a40934f1e9d6f57b7bb7319197762480cf17938
|
7
|
+
data.tar.gz: 3553f860583d638a6fcd86038240c507dd3fc4f89ad16e1fd87ec68bbf5386a27d36f46ecb7536717f2f060804ae5f8d9fdaa1ef784cbc05194df1beedf63b44
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Defra Ruby Validators
|
2
2
|
|
3
|
-
[](https://travis-ci.com/DEFRA/defra-ruby-validators)
|
4
|
+
[](https://sonarcloud.io/dashboard?id=DEFRA_defra-ruby-validators)
|
5
|
+
[](https://sonarcloud.io/dashboard?id=DEFRA_defra-ruby-validators)
|
6
|
+
[](https://hakiri.io/github/DEFRA/defra-ruby-validators/main)
|
7
7
|
[](https://badge.fury.io/rb/defra_ruby_validators)
|
8
8
|
[](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3)
|
9
9
|
|
data/Rakefile
CHANGED
@@ -11,7 +11,6 @@ Bundler::GemHelper.install_tasks
|
|
11
11
|
# This is wrapped to prevent an error when rake is called in environments where
|
12
12
|
# rspec may not be available, e.g. production. As such we don't need to handle
|
13
13
|
# the error.
|
14
|
-
# rubocop:disable Lint/SuppressedException
|
15
14
|
begin
|
16
15
|
require "rspec/core/rake_task"
|
17
16
|
|
@@ -32,4 +31,3 @@ begin
|
|
32
31
|
rescue LoadError
|
33
32
|
# no changelog available
|
34
33
|
end
|
35
|
-
# rubocop:enable Lint/SuppressedException
|
@@ -6,6 +6,12 @@ module DefraRuby
|
|
6
6
|
|
7
7
|
protected
|
8
8
|
|
9
|
+
def add_validation_error(record, attribute, error)
|
10
|
+
record.errors.add(attribute,
|
11
|
+
error,
|
12
|
+
message: error_message(error))
|
13
|
+
end
|
14
|
+
|
9
15
|
def error_message(error)
|
10
16
|
if options[:messages] && options[:messages][error]
|
11
17
|
options[:messages][error]
|
@@ -25,14 +25,14 @@ module DefraRuby
|
|
25
25
|
def value_is_present?(record, attribute, value)
|
26
26
|
return true if value.present?
|
27
27
|
|
28
|
-
record
|
28
|
+
add_validation_error(record, attribute, :blank)
|
29
29
|
false
|
30
30
|
end
|
31
31
|
|
32
32
|
def format_is_valid?(record, attribute, value)
|
33
33
|
return true if value.match?(VALID_COMPANIES_HOUSE_REGISTRATION_NUMBER_REGEX)
|
34
34
|
|
35
|
-
record
|
35
|
+
add_validation_error(record, attribute, :invalid_format)
|
36
36
|
false
|
37
37
|
end
|
38
38
|
|
@@ -41,12 +41,12 @@ module DefraRuby
|
|
41
41
|
when :active
|
42
42
|
true
|
43
43
|
when :inactive
|
44
|
-
record
|
44
|
+
add_validation_error(record, attribute, :inactive)
|
45
45
|
when :not_found
|
46
|
-
record
|
46
|
+
add_validation_error(record, attribute, :not_found)
|
47
47
|
end
|
48
48
|
rescue StandardError
|
49
|
-
record
|
49
|
+
add_validation_error(record, attribute, :error)
|
50
50
|
end
|
51
51
|
|
52
52
|
end
|
@@ -10,7 +10,7 @@ module DefraRuby
|
|
10
10
|
# Name fields must contain only letters, spaces, commas, full stops, hyphens and apostrophes
|
11
11
|
return true if value.match?(/\A[-a-z\s,.']+\z/i)
|
12
12
|
|
13
|
-
record
|
13
|
+
add_validation_error(record, attribute, :invalid_format)
|
14
14
|
false
|
15
15
|
end
|
16
16
|
|
@@ -10,7 +10,7 @@ module DefraRuby
|
|
10
10
|
# In this case, we do want `false.present?` to return `true` https://github.com/rails/rails/issues/10804
|
11
11
|
return true if (value == false || value.present?) && valid_options.include?(value)
|
12
12
|
|
13
|
-
record
|
13
|
+
add_validation_error(record, attribute, :inclusion)
|
14
14
|
false
|
15
15
|
end
|
16
16
|
|
@@ -19,7 +19,7 @@ module DefraRuby
|
|
19
19
|
# validate_email_format returns nil if the validation passes
|
20
20
|
return true unless ValidatesEmailFormatOf.validate_email_format(value)
|
21
21
|
|
22
|
-
record
|
22
|
+
add_validation_error(record, attribute, :invalid_format)
|
23
23
|
false
|
24
24
|
end
|
25
25
|
|
@@ -22,7 +22,7 @@ module DefraRuby
|
|
22
22
|
def valid_format?(record, attribute, value)
|
23
23
|
return true if value.match?(/\A#{grid_reference_pattern}\z/)
|
24
24
|
|
25
|
-
record
|
25
|
+
add_validation_error(record, attribute, :invalid_format)
|
26
26
|
false
|
27
27
|
end
|
28
28
|
|
@@ -30,7 +30,7 @@ module DefraRuby
|
|
30
30
|
OsMapRef::Location.for(value).easting
|
31
31
|
true
|
32
32
|
rescue OsMapRef::Error
|
33
|
-
record
|
33
|
+
add_validation_error(record, attribute, :invalid)
|
34
34
|
false
|
35
35
|
end
|
36
36
|
|
@@ -9,13 +9,13 @@ module DefraRuby
|
|
9
9
|
date = value.to_date
|
10
10
|
|
11
11
|
if date > Date.today
|
12
|
-
record
|
12
|
+
add_validation_error(record, attribute, :past_date)
|
13
13
|
|
14
14
|
return false
|
15
15
|
end
|
16
16
|
|
17
17
|
if date.year < 1900
|
18
|
-
record
|
18
|
+
add_validation_error(record, attribute, :invalid_date)
|
19
19
|
|
20
20
|
return false
|
21
21
|
end
|
@@ -1,13 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "webmock/rspec"
|
4
|
+
|
3
5
|
RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
4
6
|
let(:subject) { described_class.new("09360070") }
|
5
7
|
let(:host) { "https://api.companieshouse.gov.uk/" }
|
6
8
|
|
7
9
|
describe "#status" do
|
8
10
|
context "when the company_no is for an active company" do
|
9
|
-
before
|
10
|
-
|
11
|
+
before do
|
12
|
+
expected_body = { "company_status": "active" }
|
13
|
+
|
14
|
+
stub_request(:any, /.*#{host}.*/).to_return(
|
15
|
+
status: 200,
|
16
|
+
body: expected_body.to_json
|
17
|
+
)
|
18
|
+
end
|
11
19
|
|
12
20
|
it "returns :active" do
|
13
21
|
expect(subject.status).to eq(:active)
|
@@ -15,9 +23,11 @@ RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
|
15
23
|
end
|
16
24
|
|
17
25
|
context "when the company_no is not found" do
|
18
|
-
|
19
|
-
|
20
|
-
|
26
|
+
before do
|
27
|
+
stub_request(:any, /.*#{host}.*/).to_return(
|
28
|
+
status: 404
|
29
|
+
)
|
30
|
+
end
|
21
31
|
|
22
32
|
it "returns :not_found" do
|
23
33
|
expect(subject.status).to eq(:not_found)
|
@@ -25,9 +35,14 @@ RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
|
25
35
|
end
|
26
36
|
|
27
37
|
context "when the company_no is inactive" do
|
28
|
-
|
29
|
-
|
30
|
-
|
38
|
+
before do
|
39
|
+
expected_body = { "company_status": "dissolved" }
|
40
|
+
|
41
|
+
stub_request(:any, /.*#{host}.*/).to_return(
|
42
|
+
status: 200,
|
43
|
+
body: expected_body.to_json
|
44
|
+
)
|
45
|
+
end
|
31
46
|
|
32
47
|
it "returns :inactive" do
|
33
48
|
expect(subject.status).to eq(:inactive)
|
@@ -35,11 +50,8 @@ RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
|
35
50
|
end
|
36
51
|
|
37
52
|
context "when there is a problem with the Companies House API" do
|
38
|
-
before(:each) { VCR.turn_off! }
|
39
|
-
after(:each) { VCR.turn_on! }
|
40
|
-
|
41
53
|
context "and the request times out" do
|
42
|
-
before
|
54
|
+
before { stub_request(:any, /.*#{host}.*/).to_timeout }
|
43
55
|
|
44
56
|
it "raises an exception" do
|
45
57
|
expect { subject.status }.to raise_error(StandardError)
|
@@ -47,7 +59,7 @@ RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
|
47
59
|
end
|
48
60
|
|
49
61
|
context "and request returns an error" do
|
50
|
-
before
|
62
|
+
before { stub_request(:any, /.*#{host}.*/).to_raise(SocketError) }
|
51
63
|
|
52
64
|
it "raises an exception" do
|
53
65
|
expect { subject.status }.to raise_error(StandardError)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: defra_ruby_validators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Defra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -192,20 +192,6 @@ dependencies:
|
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: 0.17.1
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: vcr
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - "~>"
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '4.0'
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - "~>"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '4.0'
|
209
195
|
- !ruby/object:Gem::Dependency
|
210
196
|
name: webmock
|
211
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -263,9 +249,6 @@ files:
|
|
263
249
|
- lib/defra_ruby/validators/true_false_validator.rb
|
264
250
|
- lib/defra_ruby/validators/version.rb
|
265
251
|
- lib/defra_ruby_validators.rb
|
266
|
-
- spec/cassettes/company_no_inactive.yml
|
267
|
-
- spec/cassettes/company_no_not_found.yml
|
268
|
-
- spec/cassettes/company_no_valid.yml
|
269
252
|
- spec/defra_ruby/validators/business_type_validator_spec.rb
|
270
253
|
- spec/defra_ruby/validators/companies_house_number_validator_spec.rb
|
271
254
|
- spec/defra_ruby/validators/companies_house_service_spec.rb
|
@@ -279,7 +262,6 @@ files:
|
|
279
262
|
- spec/defra_ruby/validators/token_validator_spec.rb
|
280
263
|
- spec/defra_ruby/validators/true_false_validator_spec.rb
|
281
264
|
- spec/defra_ruby/validators_spec.rb
|
282
|
-
- spec/examples.txt
|
283
265
|
- spec/spec_helper.rb
|
284
266
|
- spec/support/defra_ruby_validators.rb
|
285
267
|
- spec/support/helpers/text_generator.rb
|
@@ -294,7 +276,6 @@ files:
|
|
294
276
|
- spec/support/shared_examples/validators/valid_record.rb
|
295
277
|
- spec/support/shared_examples/validators/validator.rb
|
296
278
|
- spec/support/simplecov.rb
|
297
|
-
- spec/support/vcr.rb
|
298
279
|
homepage: https://github.com/DEFRA/defra-ruby-validators
|
299
280
|
licenses:
|
300
281
|
- The Open Government Licence (OGL) Version 3
|
@@ -335,13 +316,8 @@ test_files:
|
|
335
316
|
- spec/defra_ruby/validators/true_false_validator_spec.rb
|
336
317
|
- spec/defra_ruby/validators/location_validator_spec.rb
|
337
318
|
- spec/defra_ruby/validators/email_validator_spec.rb
|
338
|
-
- spec/examples.txt
|
339
|
-
- spec/cassettes/company_no_not_found.yml
|
340
|
-
- spec/cassettes/company_no_valid.yml
|
341
|
-
- spec/cassettes/company_no_inactive.yml
|
342
319
|
- spec/support/simplecov.rb
|
343
320
|
- spec/support/i18n.rb
|
344
|
-
- spec/support/vcr.rb
|
345
321
|
- spec/support/pry.rb
|
346
322
|
- spec/support/defra_ruby_validators.rb
|
347
323
|
- spec/support/helpers/translator.rb
|
@@ -1,67 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.companieshouse.gov.uk/company/07281919
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- "*/*"
|
12
|
-
User-Agent:
|
13
|
-
- rest-client/2.1.0 (darwin19.0.0 x86_64) ruby/2.4.2p198
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Host:
|
17
|
-
- api.companieshouse.gov.uk
|
18
|
-
Authorization:
|
19
|
-
- Basic MnZodWowb1dhYk13N2h6TnpBVWlTT2ctNktpVVRCcFhCRF83Zktibzo=
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 200
|
23
|
-
message: OK
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Tue, 18 Feb 2020 14:22:20 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '979'
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Access-Control-Allow-Credentials:
|
34
|
-
- 'true'
|
35
|
-
Access-Control-Allow-Headers:
|
36
|
-
- X-RateLimit-Query, origin, content-type, content-length, user-agent, host,
|
37
|
-
accept, authorization
|
38
|
-
Access-Control-Expose-Headers:
|
39
|
-
- Location,www-authenticate,cache-control,pragma,content-type,expires,last-modified
|
40
|
-
- X-RateLimit-Window, X-RateLimit-Limit, X-RateLimit-Remain, X-RateLimit-Reset,
|
41
|
-
Location, www-authenticate, cache-control, pragma, content-type, expires,
|
42
|
-
last-modified
|
43
|
-
Access-Control-Max-Age:
|
44
|
-
- '3600'
|
45
|
-
Cache-Control:
|
46
|
-
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
47
|
-
Pragma:
|
48
|
-
- no-cache
|
49
|
-
X-Ratelimit-Limit:
|
50
|
-
- '600'
|
51
|
-
X-Ratelimit-Remain:
|
52
|
-
- '593'
|
53
|
-
X-Ratelimit-Reset:
|
54
|
-
- '1582035975'
|
55
|
-
X-Ratelimit-Window:
|
56
|
-
- 5m
|
57
|
-
Server:
|
58
|
-
- CompaniesHouse
|
59
|
-
body:
|
60
|
-
encoding: UTF-8
|
61
|
-
string: '{"sic_codes":["82990"],"company_number":"07281919","has_been_liquidated":false,"accounts":{"last_accounts":{"made_up_to":"2013-06-30","type":"total-exemption-small"},"accounting_reference_date":{"day":"30","month":"06"}},"last_full_members_list_date":"2014-06-11","status":"active","type":"ltd","date_of_creation":"2010-06-11","registered_office_address":{"postal_code":"HA8
|
62
|
-
7EJ","locality":"Edgware","region":"Middlesex","address_line_1":"8th Floor
|
63
|
-
Elizabeth House","address_line_2":"54-58 High Street"},"undeliverable_registered_office_address":false,"company_name":"DIRECT
|
64
|
-
SKIPS UK LTD","annual_return":{"last_made_up_to":"2014-06-11"},"jurisdiction":"england-wales","etag":"1cdef5bc2a020b3e9003b086033b64b78bcb28f6","company_status":"dissolved","has_insolvency_history":false,"has_charges":false,"links":{"self":"/company/07281919","filing_history":"/company/07281919/filing-history","officers":"/company/07281919/officers"},"date_of_cessation":"2016-01-05","can_file":false}'
|
65
|
-
http_version:
|
66
|
-
recorded_at: Tue, 18 Feb 2020 14:22:20 GMT
|
67
|
-
recorded_with: VCR 4.0.0
|
@@ -1,64 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.companieshouse.gov.uk/company/99999999
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- "*/*"
|
12
|
-
User-Agent:
|
13
|
-
- rest-client/2.1.0 (darwin19.0.0 x86_64) ruby/2.4.2p198
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Host:
|
17
|
-
- api.companieshouse.gov.uk
|
18
|
-
Authorization:
|
19
|
-
- Basic MnZodWowb1dhYk13N2h6TnpBVWlTT2ctNktpVVRCcFhCRF83Zktibzo=
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 404
|
23
|
-
message: Not Found
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Tue, 18 Feb 2020 14:22:19 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '70'
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Access-Control-Allow-Credentials:
|
34
|
-
- 'true'
|
35
|
-
Access-Control-Allow-Headers:
|
36
|
-
- X-RateLimit-Query, origin, content-type, content-length, user-agent, host,
|
37
|
-
accept, authorization
|
38
|
-
Access-Control-Expose-Headers:
|
39
|
-
- Location,www-authenticate,cache-control,pragma,content-type,expires,last-modified
|
40
|
-
- X-RateLimit-Window, X-RateLimit-Limit, X-RateLimit-Remain, X-RateLimit-Reset,
|
41
|
-
Location, www-authenticate, cache-control, pragma, content-type, expires,
|
42
|
-
last-modified
|
43
|
-
Access-Control-Max-Age:
|
44
|
-
- '3600'
|
45
|
-
Cache-Control:
|
46
|
-
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
47
|
-
Pragma:
|
48
|
-
- no-cache
|
49
|
-
X-Ratelimit-Limit:
|
50
|
-
- '600'
|
51
|
-
X-Ratelimit-Remain:
|
52
|
-
- '594'
|
53
|
-
X-Ratelimit-Reset:
|
54
|
-
- '1582035975'
|
55
|
-
X-Ratelimit-Window:
|
56
|
-
- 5m
|
57
|
-
Server:
|
58
|
-
- CompaniesHouse
|
59
|
-
body:
|
60
|
-
encoding: UTF-8
|
61
|
-
string: '{"errors":[{"type":"ch:service","error":"company-profile-not-found"}]}'
|
62
|
-
http_version:
|
63
|
-
recorded_at: Tue, 18 Feb 2020 14:22:19 GMT
|
64
|
-
recorded_with: VCR 4.0.0
|
@@ -1,65 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: https://api.companieshouse.gov.uk/company/09360070
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
Accept:
|
11
|
-
- "*/*"
|
12
|
-
User-Agent:
|
13
|
-
- rest-client/2.1.0 (darwin19.0.0 x86_64) ruby/2.4.2p198
|
14
|
-
Accept-Encoding:
|
15
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
-
Host:
|
17
|
-
- api.companieshouse.gov.uk
|
18
|
-
Authorization:
|
19
|
-
- Basic MnZodWowb1dhYk13N2h6TnpBVWlTT2ctNktpVVRCcFhCRF83Zktibzo=
|
20
|
-
response:
|
21
|
-
status:
|
22
|
-
code: 200
|
23
|
-
message: OK
|
24
|
-
headers:
|
25
|
-
Date:
|
26
|
-
- Tue, 18 Feb 2020 14:22:19 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '1266'
|
31
|
-
Connection:
|
32
|
-
- keep-alive
|
33
|
-
Access-Control-Allow-Credentials:
|
34
|
-
- 'true'
|
35
|
-
Access-Control-Allow-Headers:
|
36
|
-
- X-RateLimit-Query, origin, content-type, content-length, user-agent, host,
|
37
|
-
accept, authorization
|
38
|
-
Access-Control-Expose-Headers:
|
39
|
-
- Location,www-authenticate,cache-control,pragma,content-type,expires,last-modified
|
40
|
-
- X-RateLimit-Window, X-RateLimit-Limit, X-RateLimit-Remain, X-RateLimit-Reset,
|
41
|
-
Location, www-authenticate, cache-control, pragma, content-type, expires,
|
42
|
-
last-modified
|
43
|
-
Access-Control-Max-Age:
|
44
|
-
- '3600'
|
45
|
-
Cache-Control:
|
46
|
-
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
47
|
-
Pragma:
|
48
|
-
- no-cache
|
49
|
-
X-Ratelimit-Limit:
|
50
|
-
- '600'
|
51
|
-
X-Ratelimit-Remain:
|
52
|
-
- '595'
|
53
|
-
X-Ratelimit-Reset:
|
54
|
-
- '1582035975'
|
55
|
-
X-Ratelimit-Window:
|
56
|
-
- 5m
|
57
|
-
Server:
|
58
|
-
- CompaniesHouse
|
59
|
-
body:
|
60
|
-
encoding: UTF-8
|
61
|
-
string: '{"type":"ltd","company_name":"0800 WASTE LTD.","has_insolvency_history":false,"accounts":{"next_made_up_to":"2019-12-31","next_due":"2020-09-30","last_accounts":{"made_up_to":"2018-12-31","period_start_on":"2018-01-01","period_end_on":"2018-12-31"},"next_accounts":{"due_on":"2020-09-30","period_start_on":"2019-01-01","period_end_on":"2019-12-31","overdue":false},"overdue":false,"accounting_reference_date":{"month":"12","day":"31"}},"undeliverable_registered_office_address":false,"etag":"73621f5f3d59c8eb519bcbaac46f850c92018216","company_number":"09360070","registered_office_address":{"postal_code":"SM3
|
62
|
-
9ND","locality":"Sutton","address_line_1":"21 Haslam Avenue","region":"Surrey"},"jurisdiction":"england-wales","date_of_creation":"2014-12-18","company_status":"active","has_charges":false,"sic_codes":["38110"],"last_full_members_list_date":"2015-12-18","confirmation_statement":{"next_due":"2021-02-03","next_made_up_to":"2021-01-20","overdue":false,"last_made_up_to":"2020-01-20"},"links":{"self":"/company/09360070","filing_history":"/company/09360070/filing-history","officers":"/company/09360070/officers","persons_with_significant_control":"/company/09360070/persons-with-significant-control"},"registered_office_is_in_dispute":false,"can_file":true}'
|
63
|
-
http_version:
|
64
|
-
recorded_at: Tue, 18 Feb 2020 14:22:19 GMT
|
65
|
-
recorded_with: VCR 4.0.0
|
data/spec/examples.txt
DELETED
@@ -1,176 +0,0 @@
|
|
1
|
-
example_id | status | run_time |
|
2
|
-
------------------------------------------------------------------------------------ | ------ | --------------- |
|
3
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:1:1] | passed | 0.0001 seconds |
|
4
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:1] | passed | 0.00013 seconds |
|
5
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00013 seconds |
|
6
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:2] | passed | 0.0002 seconds |
|
7
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00089 seconds |
|
8
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.0003 seconds |
|
9
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00026 seconds |
|
10
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.0015 seconds |
|
11
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00016 seconds |
|
12
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00016 seconds |
|
13
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00026 seconds |
|
14
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00108 seconds |
|
15
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:1:1:1] | passed | 0.00089 seconds |
|
16
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:1:1:2] | passed | 0.00077 seconds |
|
17
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:1] | passed | 0.00093 seconds |
|
18
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:2] | passed | 0.00074 seconds |
|
19
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:3] | passed | 0.00082 seconds |
|
20
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:4:1] | passed | 0.00089 seconds |
|
21
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:1:1] | passed | 0.00013 seconds |
|
22
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:1] | passed | 0.00038 seconds |
|
23
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:2] | passed | 0.00043 seconds |
|
24
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:1] | passed | 0.00079 seconds |
|
25
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:2] | passed | 0.00069 seconds |
|
26
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:1] | passed | 0.00041 seconds |
|
27
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:2] | passed | 0.00039 seconds |
|
28
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:1] | passed | 0.00047 seconds |
|
29
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:2] | passed | 0.00043 seconds |
|
30
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00015 seconds |
|
31
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00013 seconds |
|
32
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:3] | passed | 0.00023 seconds |
|
33
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:4:1] | passed | 0.00064 seconds |
|
34
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:1] | passed | 0.00021 seconds |
|
35
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:2] | passed | 0.00023 seconds |
|
36
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:3] | passed | 0.00033 seconds |
|
37
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:4:1] | passed | 0.00075 seconds |
|
38
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:1] | passed | 0.0005 seconds |
|
39
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:2] | passed | 0.00046 seconds |
|
40
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:3] | passed | 0.00048 seconds |
|
41
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:4:1] | passed | 0.00078 seconds |
|
42
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:1] | passed | 0.00054 seconds |
|
43
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:2] | passed | 0.0004 seconds |
|
44
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:3] | passed | 0.00044 seconds |
|
45
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:4:1] | passed | 0.00074 seconds |
|
46
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:1] | passed | 0.00059 seconds |
|
47
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:2] | passed | 0.00043 seconds |
|
48
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:3] | passed | 0.00075 seconds |
|
49
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:4:1] | passed | 0.00118 seconds |
|
50
|
-
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:1:1] | passed | 0.28869 seconds |
|
51
|
-
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:2:1] | passed | 0.10622 seconds |
|
52
|
-
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:3:1] | passed | 0.11826 seconds |
|
53
|
-
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.0201 seconds |
|
54
|
-
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:2:1] | passed | 0.01928 seconds |
|
55
|
-
./spec/defra_ruby/validators/configuration_spec.rb[1:1:1] | passed | 0.00452 seconds |
|
56
|
-
./spec/defra_ruby/validators/configuration_spec.rb[1:2] | passed | 0.00389 seconds |
|
57
|
-
./spec/defra_ruby/validators/configuration_spec.rb[1:3:1:1] | passed | 0.0054 seconds |
|
58
|
-
./spec/defra_ruby/validators/configuration_spec.rb[1:3:2:1] | passed | 0.00017 seconds |
|
59
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:1:1] | passed | 0.0002 seconds |
|
60
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:1] | passed | 0.00014 seconds |
|
61
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00031 seconds |
|
62
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00028 seconds |
|
63
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00024 seconds |
|
64
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00049 seconds |
|
65
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00055 seconds |
|
66
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00081 seconds |
|
67
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00051 seconds |
|
68
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:2] | passed | 0.0002 seconds |
|
69
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00036 seconds |
|
70
|
-
./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00127 seconds |
|
71
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:1:1] | passed | 0.00012 seconds |
|
72
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:1] | passed | 0.00031 seconds |
|
73
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:1] | passed | 0.0002 seconds |
|
74
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00025 seconds |
|
75
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00017 seconds |
|
76
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00014 seconds |
|
77
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00055 seconds |
|
78
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00096 seconds |
|
79
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00018 seconds |
|
80
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00049 seconds |
|
81
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00019 seconds |
|
82
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00133 seconds |
|
83
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:1] | passed | 0.0006 seconds |
|
84
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:2] | passed | 0.00046 seconds |
|
85
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:3] | passed | 0.00028 seconds |
|
86
|
-
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:4:1] | passed | 0.00116 seconds |
|
87
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:1:1] | passed | 0.00012 seconds |
|
88
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
|
89
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00028 seconds |
|
90
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00019 seconds |
|
91
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00032 seconds |
|
92
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00028 seconds |
|
93
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00068 seconds |
|
94
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00326 seconds |
|
95
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00022 seconds |
|
96
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00026 seconds |
|
97
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00016 seconds |
|
98
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00074 seconds |
|
99
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:1:1:1] | passed | 0.00062 seconds |
|
100
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:1:1:2] | passed | 0.00049 seconds |
|
101
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:1] | passed | 0.0011 seconds |
|
102
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:2] | passed | 0.00082 seconds |
|
103
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:3] | passed | 0.00077 seconds |
|
104
|
-
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:4:1] | passed | 0.00899 seconds |
|
105
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:1:1] | passed | 0.00014 seconds |
|
106
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
|
107
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00299 seconds |
|
108
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00288 seconds |
|
109
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00043 seconds |
|
110
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00026 seconds |
|
111
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00085 seconds |
|
112
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.0015 seconds |
|
113
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:1] | passed | 0.00016 seconds |
|
114
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:1] | passed | 0.0034 seconds |
|
115
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:2] | passed | 0.05423 seconds |
|
116
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.0003 seconds |
|
117
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00025 seconds |
|
118
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00033 seconds |
|
119
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00086 seconds |
|
120
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00027 seconds |
|
121
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00035 seconds |
|
122
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:3] | passed | 0.0002 seconds |
|
123
|
-
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:4:1] | passed | 0.00105 seconds |
|
124
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:1:1] | passed | 0.00009 seconds |
|
125
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:1] | passed | 0.00032 seconds |
|
126
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00015 seconds |
|
127
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00027 seconds |
|
128
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00019 seconds |
|
129
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00023 seconds |
|
130
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00048 seconds |
|
131
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00105 seconds |
|
132
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:1] | passed | 0.00017 seconds |
|
133
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00011 seconds |
|
134
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00035 seconds |
|
135
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00047 seconds |
|
136
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00036 seconds |
|
137
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00022 seconds |
|
138
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00124 seconds |
|
139
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00028 seconds |
|
140
|
-
./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00011 seconds |
|
141
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:1:1] | passed | 0.00016 seconds |
|
142
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:1] | passed | 0.00013 seconds |
|
143
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00014 seconds |
|
144
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00024 seconds |
|
145
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00018 seconds |
|
146
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00024 seconds |
|
147
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00019 seconds |
|
148
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00091 seconds |
|
149
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00044 seconds |
|
150
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00031 seconds |
|
151
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00058 seconds |
|
152
|
-
./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00099 seconds |
|
153
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:1:1] | passed | 0.00012 seconds |
|
154
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:1] | passed | 0.0001 seconds |
|
155
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00025 seconds |
|
156
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00022 seconds |
|
157
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00021 seconds |
|
158
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00019 seconds |
|
159
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00021 seconds |
|
160
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00116 seconds |
|
161
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00018 seconds |
|
162
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00021 seconds |
|
163
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00017 seconds |
|
164
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00068 seconds |
|
165
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:1] | passed | 0.00477 seconds |
|
166
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00018 seconds |
|
167
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00015 seconds |
|
168
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00306 seconds |
|
169
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.0158 seconds |
|
170
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00021 seconds |
|
171
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.02551 seconds |
|
172
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:2:1:1] | passed | 0.00023 seconds |
|
173
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:2:1:2] | passed | 0.00039 seconds |
|
174
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:2:1:3] | passed | 0.0002 seconds |
|
175
|
-
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:2:1:4:1] | passed | 0.00076 seconds |
|
176
|
-
./spec/defra_ruby/validators_spec.rb[1:1:1] | passed | 0.0064 seconds |
|
data/spec/support/vcr.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Stubbing HTTP requests
|
4
|
-
require "webmock/rspec"
|
5
|
-
# Auto generate fake responses for web-requests
|
6
|
-
require "vcr"
|
7
|
-
|
8
|
-
VCR.configure do |c|
|
9
|
-
c.cassette_library_dir = "spec/cassettes"
|
10
|
-
c.hook_into :webmock
|
11
|
-
|
12
|
-
c.ignore_hosts "127.0.0.1", "codeclimate.com"
|
13
|
-
|
14
|
-
SECONDS_IN_DAY = 24 * 60 * 60
|
15
|
-
|
16
|
-
c.default_cassette_options = { re_record_interval: (14 * SECONDS_IN_DAY) }
|
17
|
-
|
18
|
-
# Strip out authorization info
|
19
|
-
c.filter_sensitive_data("Basic <API_KEY>") do |interaction|
|
20
|
-
auth = interaction.request.headers["Authorization"]
|
21
|
-
auth.first if auth.nil? || auth.empty?
|
22
|
-
end
|
23
|
-
end
|