defra_ruby_validators 2.2.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +22 -5
- data/Rakefile +2 -2
- data/bin/console +3 -7
- data/config/locales/defra_ruby/validators/past_date_validator/en.yml +6 -0
- data/lib/defra_ruby/validators/base_validator.rb +6 -0
- data/lib/defra_ruby/validators/companies_house_number_validator.rb +12 -9
- data/lib/defra_ruby/validators/companies_house_service.rb +26 -12
- 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 +27 -0
- 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/lib/defra_ruby/validators.rb +1 -0
- data/spec/defra_ruby/validators/companies_house_number_validator_spec.rb +16 -0
- data/spec/defra_ruby/validators/companies_house_service_spec.rb +54 -14
- data/spec/defra_ruby/validators/past_date_validator_spec.rb +35 -0
- data/spec/examples.txt +189 -81
- data/spec/support/i18n.rb +1 -1
- metadata +9 -28
- 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/support/vcr.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8964c61f339abf2c0d3a469cad34c7234caf819e1844f3968e04d85147cc67c4
|
4
|
+
data.tar.gz: bf2ad073d11e02f698039b03286c1519ff01126d384119b8f3c0785b2c1cf6cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f24569969b429ffd1c1d7db53c94420f47aa0b32538c0584403458ee4fdf45cb72a911341ef993c959a298a8256b94b3511867a54cb9fa098d04e4573547ee6a
|
7
|
+
data.tar.gz: 4b40e37219533ce6c295b33b00c267c45550855790832f37f363db07f63d83c8d2a04cbfd4a8bf6f1762f52639f56888b614d741b13712614ed02fe0113cbad0
|
data/README.md
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
|
1
|
+
# Defra Ruby Validators
|
2
2
|
|
3
|
-
|
4
|
-
[![Maintainability](https://
|
5
|
-
[![
|
6
|
-
[![security](https://hakiri.io/github/DEFRA/defra-ruby-validators/master.svg)](https://hakiri.io/github/DEFRA/defra-ruby-validators/master)
|
3
|
+
![Build Status](https://github.com/DEFRA/defra-ruby-validators/workflows/CI/badge.svg?branch=main)
|
4
|
+
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_defra-ruby-validators&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=DEFRA_defra-ruby-validators)
|
5
|
+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=DEFRA_defra-ruby-validators&metric=coverage)](https://sonarcloud.io/dashboard?id=DEFRA_defra-ruby-validators)
|
7
6
|
[![Gem Version](https://badge.fury.io/rb/defra_ruby_validators.svg)](https://badge.fury.io/rb/defra_ruby_validators)
|
8
7
|
[![Licence](https://img.shields.io/badge/Licence-OGLv3-blue.svg)](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3)
|
9
8
|
|
@@ -74,6 +73,14 @@ Add it to your model or form object using
|
|
74
73
|
validates :company_no, "defra_ruby/validators/companies_house_number": true
|
75
74
|
```
|
76
75
|
|
76
|
+
The company number also accepts a `company_type` option. This checks the `type` attribute in the API response. To validate that the company number is for a Limited Company, for example:
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
validates :company_no, "defra_ruby/validators/companies_house_number": { company_type: "ltd" }
|
80
|
+
```
|
81
|
+
|
82
|
+
Note: to mock the Companies House service with the `company_type` option, you will need to be running at least v2.2.0 of [defra-ruby-mocks](https://github.com/DEFRA/defra-ruby-mocks#companies-house).
|
83
|
+
|
77
84
|
### Email
|
78
85
|
|
79
86
|
This validator checks the value is present and in a format that meets [RFC 2822](https://tools.ietf.org/html/rfc2822) and [RFC 3696](https://tools.ietf.org/html/rfc3696) (we use [validates_email_format_of](https://github.com/validates-email-format-of/validates_email_format_of) to check the format).
|
@@ -117,6 +124,16 @@ If you want to include `overseas` in the accepted locations, you can enable this
|
|
117
124
|
validates :location, "defra_ruby/validators/location": { allow_overseas: true }
|
118
125
|
```
|
119
126
|
|
127
|
+
### Past date
|
128
|
+
|
129
|
+
This validator checks the value provided is present and not a date in the future (`<= Date.today`).
|
130
|
+
|
131
|
+
Add it to your model or form object using
|
132
|
+
|
133
|
+
```ruby
|
134
|
+
validates :date_received, "defra_ruby/validators/past_date_validator": true
|
135
|
+
```
|
136
|
+
|
120
137
|
### Phone number
|
121
138
|
|
122
139
|
This validator checks the value is present, is not too long (15 is th maximum length for any phone number), and is in the correct format as per [E.164](https://en.wikipedia.org/wiki/E.164) (we use [phonelib](https://github.com/daddyz/phonelib) to check the format).
|
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/HandleExceptions
|
15
14
|
begin
|
16
15
|
require "rspec/core/rake_task"
|
17
16
|
|
@@ -26,8 +25,9 @@ begin
|
|
26
25
|
require "github_changelog_generator/task"
|
27
26
|
|
28
27
|
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
28
|
+
config.user = "defra"
|
29
|
+
config.project = "defra-ruby-validators"
|
29
30
|
end
|
30
31
|
rescue LoadError
|
31
32
|
# no changelog available
|
32
33
|
end
|
33
|
-
# rubocop:enable Lint/HandleExceptions
|
data/bin/console
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require "bundler/setup"
|
4
|
-
require "
|
4
|
+
require "defra_ruby/validators"
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
9
|
+
require "pry"
|
10
|
+
Pry.start
|
@@ -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]
|
@@ -17,7 +17,8 @@ module DefraRuby
|
|
17
17
|
return false unless value_is_present?(record, attribute, value)
|
18
18
|
return false unless format_is_valid?(record, attribute, value)
|
19
19
|
|
20
|
-
|
20
|
+
company_type = options[:company_type]
|
21
|
+
validate_with_companies_house(record, attribute, value, company_type)
|
21
22
|
end
|
22
23
|
|
23
24
|
private
|
@@ -25,30 +26,32 @@ module DefraRuby
|
|
25
26
|
def value_is_present?(record, attribute, value)
|
26
27
|
return true if value.present?
|
27
28
|
|
28
|
-
record
|
29
|
+
add_validation_error(record, attribute, :blank)
|
29
30
|
false
|
30
31
|
end
|
31
32
|
|
32
33
|
def format_is_valid?(record, attribute, value)
|
33
34
|
return true if value.match?(VALID_COMPANIES_HOUSE_REGISTRATION_NUMBER_REGEX)
|
34
35
|
|
35
|
-
record
|
36
|
+
add_validation_error(record, attribute, :invalid_format)
|
36
37
|
false
|
37
38
|
end
|
38
39
|
|
39
|
-
def validate_with_companies_house(record, attribute, value)
|
40
|
-
case CompaniesHouseService.new(value).status
|
40
|
+
def validate_with_companies_house(record, attribute, value, company_type)
|
41
|
+
case CompaniesHouseService.new(value, company_type).status
|
41
42
|
when :active
|
42
43
|
true
|
43
44
|
when :inactive
|
44
|
-
record
|
45
|
+
add_validation_error(record, attribute, :inactive)
|
45
46
|
when :not_found
|
46
|
-
record
|
47
|
+
add_validation_error(record, attribute, :not_found)
|
48
|
+
else
|
49
|
+
# Sonarcloud suggested that not having an `else` is a code smell
|
50
|
+
add_validation_error(record, attribute, :error)
|
47
51
|
end
|
48
52
|
rescue StandardError
|
49
|
-
record
|
53
|
+
add_validation_error(record, attribute, :error)
|
50
54
|
end
|
51
|
-
|
52
55
|
end
|
53
56
|
end
|
54
57
|
end
|
@@ -5,31 +5,45 @@ require "rest-client"
|
|
5
5
|
module DefraRuby
|
6
6
|
module Validators
|
7
7
|
class CompaniesHouseService
|
8
|
-
def initialize(company_no)
|
8
|
+
def initialize(company_no, company_type = nil)
|
9
9
|
@company_no = company_no
|
10
10
|
@url = "#{DefraRuby::Validators.configuration.companies_house_host}#{@company_no}"
|
11
11
|
@api_key = DefraRuby::Validators.configuration.companies_house_api_key
|
12
|
+
@company_type = company_type
|
12
13
|
end
|
13
14
|
|
14
15
|
def status
|
15
|
-
|
16
|
-
method: :get,
|
17
|
-
url: @url,
|
18
|
-
user: @api_key,
|
19
|
-
password: ""
|
20
|
-
)
|
16
|
+
return :not_found unless company_type_is_allowed?(json_response)
|
21
17
|
|
22
|
-
|
23
|
-
|
24
|
-
status_is_allowed?(json["company_status"]) ? :active : :inactive
|
18
|
+
status_is_allowed?(json_response) ? :active : :inactive
|
25
19
|
rescue RestClient::ResourceNotFound
|
26
20
|
:not_found
|
27
21
|
end
|
28
22
|
|
23
|
+
def json_response
|
24
|
+
@_json_response ||=
|
25
|
+
JSON.parse(
|
26
|
+
RestClient::Request.execute(
|
27
|
+
method: :get,
|
28
|
+
url: @url,
|
29
|
+
user: @api_key,
|
30
|
+
password: ""
|
31
|
+
)
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
29
35
|
private
|
30
36
|
|
31
|
-
def status_is_allowed?(
|
32
|
-
%w[active voluntary-arrangement].include?(
|
37
|
+
def status_is_allowed?(json_response)
|
38
|
+
%w[active voluntary-arrangement].include?(json_response["company_status"])
|
39
|
+
end
|
40
|
+
|
41
|
+
def company_type_is_allowed?(json_response)
|
42
|
+
# if a company_type has not been defined in the validator,
|
43
|
+
# we skip this check
|
44
|
+
return true if @company_type.blank?
|
45
|
+
|
46
|
+
@company_type.to_s == json_response["type"]
|
33
47
|
end
|
34
48
|
end
|
35
49
|
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
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DefraRuby
|
4
|
+
module Validators
|
5
|
+
class PastDateValidator < BaseValidator
|
6
|
+
def validate_each(record, attribute, value)
|
7
|
+
return false if value.blank?
|
8
|
+
|
9
|
+
date = value.to_date
|
10
|
+
|
11
|
+
if date > Date.today
|
12
|
+
add_validation_error(record, attribute, :past_date)
|
13
|
+
|
14
|
+
return false
|
15
|
+
end
|
16
|
+
|
17
|
+
if date.year < 1900
|
18
|
+
add_validation_error(record, attribute, :invalid_date)
|
19
|
+
|
20
|
+
return false
|
21
|
+
end
|
22
|
+
|
23
|
+
true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -21,6 +21,7 @@ require_relative "validators/phone_number_validator"
|
|
21
21
|
require_relative "validators/position_validator"
|
22
22
|
require_relative "validators/token_validator"
|
23
23
|
require_relative "validators/true_false_validator"
|
24
|
+
require_relative "validators/past_date_validator"
|
24
25
|
|
25
26
|
module DefraRuby
|
26
27
|
module Validators
|
@@ -8,6 +8,12 @@ module Test
|
|
8
8
|
|
9
9
|
validates :company_no, "defra_ruby/validators/companies_house_number": true
|
10
10
|
end
|
11
|
+
|
12
|
+
CompaniesHouseCompanyTypeAndNumberValidatable = Struct.new(:company_no) do
|
13
|
+
include ActiveModel::Validations
|
14
|
+
|
15
|
+
validates :company_no, "defra_ruby/validators/companies_house_number": { company_type: "ltd" }
|
16
|
+
end
|
11
17
|
end
|
12
18
|
|
13
19
|
module DefraRuby
|
@@ -86,6 +92,16 @@ module DefraRuby
|
|
86
92
|
error: :inactive,
|
87
93
|
error_message: error_message
|
88
94
|
end
|
95
|
+
|
96
|
+
context "with a company_type option" do
|
97
|
+
let(:company_no) { valid_numbers.first }
|
98
|
+
|
99
|
+
it "calls the companies house service with the `ltd` param" do
|
100
|
+
expect(CompaniesHouseService).to receive(:new).with(company_no, "ltd")
|
101
|
+
|
102
|
+
Test::CompaniesHouseCompanyTypeAndNumberValidatable.new(company_no).valid?
|
103
|
+
end
|
104
|
+
end
|
89
105
|
end
|
90
106
|
|
91
107
|
context "when there is an error connecting with companies house" do
|
@@ -1,13 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "webmock/rspec"
|
4
|
+
|
3
5
|
RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
4
|
-
let(:subject) { described_class.new("09360070") }
|
5
6
|
let(:host) { "https://api.companieshouse.gov.uk/" }
|
6
7
|
|
7
8
|
describe "#status" do
|
9
|
+
let(:subject) { described_class.new("09360070") }
|
10
|
+
|
8
11
|
context "when the company_no is for an active company" do
|
9
|
-
before
|
10
|
-
|
12
|
+
before do
|
13
|
+
expected_body = { "company_status": "active", "type": "ltd" }
|
14
|
+
|
15
|
+
stub_request(:any, /.*#{host}.*/).to_return(
|
16
|
+
status: 200,
|
17
|
+
body: expected_body.to_json
|
18
|
+
)
|
19
|
+
end
|
11
20
|
|
12
21
|
it "returns :active" do
|
13
22
|
expect(subject.status).to eq(:active)
|
@@ -15,9 +24,11 @@ RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
|
15
24
|
end
|
16
25
|
|
17
26
|
context "when the company_no is not found" do
|
18
|
-
|
19
|
-
|
20
|
-
|
27
|
+
before do
|
28
|
+
stub_request(:any, /.*#{host}.*/).to_return(
|
29
|
+
status: 404
|
30
|
+
)
|
31
|
+
end
|
21
32
|
|
22
33
|
it "returns :not_found" do
|
23
34
|
expect(subject.status).to eq(:not_found)
|
@@ -25,21 +36,50 @@ RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
|
25
36
|
end
|
26
37
|
|
27
38
|
context "when the company_no is inactive" do
|
28
|
-
|
29
|
-
|
30
|
-
|
39
|
+
before do
|
40
|
+
expected_body = { "company_status": "dissolved", "type": "ltd" }
|
41
|
+
|
42
|
+
stub_request(:any, /.*#{host}.*/).to_return(
|
43
|
+
status: 200,
|
44
|
+
body: expected_body.to_json
|
45
|
+
)
|
46
|
+
end
|
31
47
|
|
32
48
|
it "returns :inactive" do
|
33
49
|
expect(subject.status).to eq(:inactive)
|
34
50
|
end
|
35
51
|
end
|
36
52
|
|
37
|
-
context "
|
38
|
-
|
39
|
-
|
53
|
+
context "checking the company_type" do
|
54
|
+
let(:subject) { described_class.new("09360070", "llp") }
|
55
|
+
|
56
|
+
context "when the company_no is for a LLP" do
|
57
|
+
before do
|
58
|
+
stub_request(:any, /.*#{host}.*/).to_return(
|
59
|
+
status: 200,
|
60
|
+
body: expected_body.to_json
|
61
|
+
)
|
62
|
+
end
|
40
63
|
|
64
|
+
let(:expected_body) { { "company_status": "active", "type": "llp" } }
|
65
|
+
|
66
|
+
it "returns :active" do
|
67
|
+
expect(subject.status).to eq(:active)
|
68
|
+
end
|
69
|
+
|
70
|
+
context "but a ltd company is found" do
|
71
|
+
let(:expected_body) { { "company_status": "active", "type": "ltd" } }
|
72
|
+
|
73
|
+
it "returns :not_found" do
|
74
|
+
expect(subject.status).to eq(:not_found)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
context "when there is a problem with the Companies House API" do
|
41
81
|
context "and the request times out" do
|
42
|
-
before
|
82
|
+
before { stub_request(:any, /.*#{host}.*/).to_timeout }
|
43
83
|
|
44
84
|
it "raises an exception" do
|
45
85
|
expect { subject.status }.to raise_error(StandardError)
|
@@ -47,7 +87,7 @@ RSpec.describe DefraRuby::Validators::CompaniesHouseService do
|
|
47
87
|
end
|
48
88
|
|
49
89
|
context "and request returns an error" do
|
50
|
-
before
|
90
|
+
before { stub_request(:any, /.*#{host}.*/).to_raise(SocketError) }
|
51
91
|
|
52
92
|
it "raises an exception" do
|
53
93
|
expect { subject.status }.to raise_error(StandardError)
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
module Test
|
6
|
+
PastDateValidatable = Struct.new(:date) do
|
7
|
+
include ActiveModel::Validations
|
8
|
+
|
9
|
+
validates :date, "defra_ruby/validators/past_date": true
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module DefraRuby
|
14
|
+
module Validators
|
15
|
+
RSpec.describe PastDateValidator, type: :model do
|
16
|
+
|
17
|
+
valid_date = Date.today
|
18
|
+
future_date = Date.today + 1
|
19
|
+
invalid_date = Date.new(20, 2, 2)
|
20
|
+
|
21
|
+
it_behaves_like "a valid record", Test::PastDateValidatable.new(valid_date)
|
22
|
+
it_behaves_like "an invalid record",
|
23
|
+
validatable: Test::PastDateValidatable.new(future_date),
|
24
|
+
attribute: :date,
|
25
|
+
error: :past_date,
|
26
|
+
error_message: Helpers::Translator.error_message(PastDateValidator, :past_date)
|
27
|
+
|
28
|
+
it_behaves_like "an invalid record",
|
29
|
+
validatable: Test::PastDateValidatable.new(invalid_date),
|
30
|
+
attribute: :date,
|
31
|
+
error: :invalid_date,
|
32
|
+
error_message: Helpers::Translator.error_message(PastDateValidator, :invalid_date)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/spec/examples.txt
CHANGED
@@ -1,81 +1,189 @@
|
|
1
|
-
example_id
|
2
|
-
|
3
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:1:1]
|
4
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:1]
|
5
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:1]
|
6
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:2]
|
7
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:1]
|
8
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:2]
|
9
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:3]
|
10
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:
|
11
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:
|
12
|
-
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:
|
13
|
-
./spec/defra_ruby/validators/
|
14
|
-
./spec/defra_ruby/validators/
|
15
|
-
./spec/defra_ruby/validators/
|
16
|
-
./spec/defra_ruby/validators/
|
17
|
-
./spec/defra_ruby/validators/
|
18
|
-
./spec/defra_ruby/validators/
|
19
|
-
./spec/defra_ruby/validators/
|
20
|
-
./spec/defra_ruby/validators/
|
21
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:
|
22
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
23
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
24
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1
|
25
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
26
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
27
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
28
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
29
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
30
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:
|
31
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:
|
32
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:
|
33
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1
|
34
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
35
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
36
|
-
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:
|
37
|
-
./spec/defra_ruby/validators/
|
38
|
-
./spec/defra_ruby/validators/
|
39
|
-
./spec/defra_ruby/validators/
|
40
|
-
./spec/defra_ruby/validators/
|
41
|
-
./spec/defra_ruby/validators/
|
42
|
-
./spec/defra_ruby/validators/
|
43
|
-
./spec/defra_ruby/validators/
|
44
|
-
./spec/defra_ruby/validators/
|
45
|
-
./spec/defra_ruby/validators/
|
46
|
-
./spec/defra_ruby/validators/
|
47
|
-
./spec/defra_ruby/validators/
|
48
|
-
./spec/defra_ruby/validators/
|
49
|
-
./spec/defra_ruby/validators/
|
50
|
-
./spec/defra_ruby/validators/
|
51
|
-
./spec/defra_ruby/validators/
|
52
|
-
./spec/defra_ruby/validators/
|
53
|
-
./spec/defra_ruby/validators/
|
54
|
-
./spec/defra_ruby/validators/
|
55
|
-
./spec/defra_ruby/validators/
|
56
|
-
./spec/defra_ruby/validators/
|
57
|
-
./spec/defra_ruby/validators/
|
58
|
-
./spec/defra_ruby/validators/
|
59
|
-
./spec/defra_ruby/validators/
|
60
|
-
./spec/defra_ruby/validators/
|
61
|
-
./spec/defra_ruby/validators/
|
62
|
-
./spec/defra_ruby/validators/
|
63
|
-
./spec/defra_ruby/validators/
|
64
|
-
./spec/defra_ruby/validators/
|
65
|
-
./spec/defra_ruby/validators/
|
66
|
-
./spec/defra_ruby/validators/
|
67
|
-
./spec/defra_ruby/validators/
|
68
|
-
./spec/defra_ruby/validators/
|
69
|
-
./spec/defra_ruby/validators/
|
70
|
-
./spec/defra_ruby/validators/
|
71
|
-
./spec/defra_ruby/validators/
|
72
|
-
./spec/defra_ruby/validators/
|
73
|
-
./spec/defra_ruby/validators/
|
74
|
-
./spec/defra_ruby/validators/
|
75
|
-
./spec/defra_ruby/validators/
|
76
|
-
./spec/defra_ruby/validators/
|
77
|
-
./spec/defra_ruby/validators/
|
78
|
-
./spec/defra_ruby/validators/
|
79
|
-
./spec/defra_ruby/validators/
|
80
|
-
./spec/defra_ruby/validators/
|
81
|
-
./spec/defra_ruby/
|
1
|
+
example_id | status | run_time |
|
2
|
+
------------------------------------------------------------------------------------ | ------ | --------------- |
|
3
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:1:1] | passed | 0.00011 seconds |
|
4
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:1] | passed | 0.00014 seconds |
|
5
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00024 seconds |
|
6
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00013 seconds |
|
7
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00021 seconds |
|
8
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00087 seconds |
|
9
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.0005 seconds |
|
10
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00122 seconds |
|
11
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00019 seconds |
|
12
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00051 seconds |
|
13
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00052 seconds |
|
14
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00106 seconds |
|
15
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:1:1:1] | passed | 0.00063 seconds |
|
16
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:1:1:2] | passed | 0.00058 seconds |
|
17
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:1] | passed | 0.0007 seconds |
|
18
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:2] | passed | 0.00096 seconds |
|
19
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:3] | passed | 0.00099 seconds |
|
20
|
+
./spec/defra_ruby/validators/business_type_validator_spec.rb[1:3:2:1:4:1] | passed | 0.00122 seconds |
|
21
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:1:1] | passed | 0.00021 seconds |
|
22
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:1] | passed | 0.00067 seconds |
|
23
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:1:1:2] | passed | 0.00049 seconds |
|
24
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:1] | passed | 0.00049 seconds |
|
25
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:2:1:2] | passed | 0.00064 seconds |
|
26
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:1] | passed | 0.00087 seconds |
|
27
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:3:1:2] | passed | 0.00128 seconds |
|
28
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:1] | passed | 0.00052 seconds |
|
29
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:1:4:1:2] | passed | 0.00057 seconds |
|
30
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00024 seconds |
|
31
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.0008 seconds |
|
32
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:3] | passed | 0.0007 seconds |
|
33
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:1:1:4:1] | passed | 0.00137 seconds |
|
34
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:1] | passed | 0.00018 seconds |
|
35
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:2] | passed | 0.00059 seconds |
|
36
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:3] | passed | 0.00055 seconds |
|
37
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:2:1:4:1] | passed | 0.00098 seconds |
|
38
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:1] | passed | 0.00058 seconds |
|
39
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:2] | passed | 0.00105 seconds |
|
40
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:3] | passed | 0.00084 seconds |
|
41
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:3:1:4:1] | passed | 0.00137 seconds |
|
42
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:1] | passed | 0.00051 seconds |
|
43
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:2] | passed | 0.00084 seconds |
|
44
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:3] | passed | 0.00085 seconds |
|
45
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:4:1:4:1] | passed | 0.0013 seconds |
|
46
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:2:5:1] | passed | 0.00061 seconds |
|
47
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:1] | passed | 0.00054 seconds |
|
48
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:2] | passed | 0.00135 seconds |
|
49
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:3] | passed | 0.00083 seconds |
|
50
|
+
./spec/defra_ruby/validators/companies_house_number_validator_spec.rb[1:2:3:1:4:1] | passed | 0.00139 seconds |
|
51
|
+
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:1:1] | passed | 0.0211 seconds |
|
52
|
+
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:2:1] | passed | 0.01246 seconds |
|
53
|
+
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:3:1] | passed | 0.01366 seconds |
|
54
|
+
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.01198 seconds |
|
55
|
+
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:4:1:2:1] | passed | 0.01318 seconds |
|
56
|
+
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:5:1:1] | passed | 0.01765 seconds |
|
57
|
+
./spec/defra_ruby/validators/companies_house_service_spec.rb[1:1:5:2:1] | passed | 0.01388 seconds |
|
58
|
+
./spec/defra_ruby/validators/configuration_spec.rb[1:1:1] | passed | 0.00396 seconds |
|
59
|
+
./spec/defra_ruby/validators/configuration_spec.rb[1:2] | passed | 0.0001 seconds |
|
60
|
+
./spec/defra_ruby/validators/configuration_spec.rb[1:3:1:1] | passed | 0.00015 seconds |
|
61
|
+
./spec/defra_ruby/validators/configuration_spec.rb[1:3:2:1] | passed | 0.00016 seconds |
|
62
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:1:1] | passed | 0.0031 seconds |
|
63
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:1] | passed | 0.00012 seconds |
|
64
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00017 seconds |
|
65
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00024 seconds |
|
66
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00024 seconds |
|
67
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00047 seconds |
|
68
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00052 seconds |
|
69
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00123 seconds |
|
70
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:1] | passed | 0.01345 seconds |
|
71
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00176 seconds |
|
72
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00061 seconds |
|
73
|
+
./spec/defra_ruby/validators/email_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.01457 seconds |
|
74
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:1:1] | passed | 0.00011 seconds |
|
75
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:1] | passed | 0.00021 seconds |
|
76
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00032 seconds |
|
77
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00027 seconds |
|
78
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00046 seconds |
|
79
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.0011 seconds |
|
80
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00069 seconds |
|
81
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00132 seconds |
|
82
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00025 seconds |
|
83
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00064 seconds |
|
84
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:3] | passed | 0.00057 seconds |
|
85
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.0013 seconds |
|
86
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:1] | passed | 0.00035 seconds |
|
87
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:2] | passed | 0.00069 seconds |
|
88
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:3] | passed | 0.00118 seconds |
|
89
|
+
./spec/defra_ruby/validators/grid_reference_validator_spec.rb[1:3:1:2:1:4:1] | passed | 0.00139 seconds |
|
90
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:1:1] | passed | 0.00023 seconds |
|
91
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:1] | passed | 0.00014 seconds |
|
92
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00016 seconds |
|
93
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00019 seconds |
|
94
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00023 seconds |
|
95
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.0005 seconds |
|
96
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00055 seconds |
|
97
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00118 seconds |
|
98
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.00032 seconds |
|
99
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00051 seconds |
|
100
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00053 seconds |
|
101
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00386 seconds |
|
102
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:1:1:1] | passed | 0.00117 seconds |
|
103
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:1:1:2] | passed | 0.00076 seconds |
|
104
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:1] | passed | 0.0008 seconds |
|
105
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:2] | passed | 0.0014 seconds |
|
106
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:3] | passed | 0.00096 seconds |
|
107
|
+
./spec/defra_ruby/validators/location_validator_spec.rb[1:3:2:1:4:1] | passed | 0.00132 seconds |
|
108
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:1:1] | passed | 0.00014 seconds |
|
109
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:1:2] | passed | 0.00012 seconds |
|
110
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:2:1] | passed | 0.00016 seconds |
|
111
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:2:2] | passed | 0.00052 seconds |
|
112
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:2:3] | passed | 0.0005 seconds |
|
113
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:2:4:1] | passed | 0.00098 seconds |
|
114
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:3:1] | passed | 0.00033 seconds |
|
115
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:3:2] | passed | 0.00051 seconds |
|
116
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:3:3] | passed | 0.00116 seconds |
|
117
|
+
./spec/defra_ruby/validators/past_date_validator_spec.rb[1:3:4:1] | passed | 0.00112 seconds |
|
118
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:1:1] | passed | 0.00018 seconds |
|
119
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:1] | passed | 0.00022 seconds |
|
120
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00428 seconds |
|
121
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:1:1:2] | passed | 0.02456 seconds |
|
122
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00023 seconds |
|
123
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.0006 seconds |
|
124
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00367 seconds |
|
125
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00122 seconds |
|
126
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:1] | passed | 0.00011 seconds |
|
127
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00187 seconds |
|
128
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00177 seconds |
|
129
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00021 seconds |
|
130
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00048 seconds |
|
131
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00056 seconds |
|
132
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00103 seconds |
|
133
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00052 seconds |
|
134
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00088 seconds |
|
135
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:3] | passed | 0.01128 seconds |
|
136
|
+
./spec/defra_ruby/validators/phone_number_validator_spec.rb[1:4:1:1:1:4:1] | passed | 0.00177 seconds |
|
137
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:1:1] | passed | 0.00011 seconds |
|
138
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:1] | passed | 0.00014 seconds |
|
139
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00018 seconds |
|
140
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00016 seconds |
|
141
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00022 seconds |
|
142
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00093 seconds |
|
143
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00057 seconds |
|
144
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00133 seconds |
|
145
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:1] | passed | 0.00011 seconds |
|
146
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00016 seconds |
|
147
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00015 seconds |
|
148
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00021 seconds |
|
149
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00053 seconds |
|
150
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00072 seconds |
|
151
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00166 seconds |
|
152
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:1] | passed | 0.00014 seconds |
|
153
|
+
./spec/defra_ruby/validators/position_validator_spec.rb[1:4:1:1:1:2] | passed | 0.00016 seconds |
|
154
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:1:1] | passed | 0.00015 seconds |
|
155
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:1] | passed | 0.00018 seconds |
|
156
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00019 seconds |
|
157
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00013 seconds |
|
158
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00034 seconds |
|
159
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00045 seconds |
|
160
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.0009 seconds |
|
161
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00141 seconds |
|
162
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:1] | passed | 0.00032 seconds |
|
163
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:2] | passed | 0.00058 seconds |
|
164
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:3] | passed | 0.0009 seconds |
|
165
|
+
./spec/defra_ruby/validators/token_validator_spec.rb[1:3:1:1:1:4:1] | passed | 0.00128 seconds |
|
166
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:1:1] | passed | 0.00013 seconds |
|
167
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:1] | passed | 0.00011 seconds |
|
168
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:1] | passed | 0.00014 seconds |
|
169
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:1:1:2] | passed | 0.00014 seconds |
|
170
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:1] | passed | 0.00024 seconds |
|
171
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:2] | passed | 0.00058 seconds |
|
172
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:3] | passed | 0.00054 seconds |
|
173
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:1:1:4:1] | passed | 0.00129 seconds |
|
174
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:1] | passed | 0.0004 seconds |
|
175
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:2] | passed | 0.00102 seconds |
|
176
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:3] | passed | 0.00107 seconds |
|
177
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:2:2:2:2:1:4:1] | passed | 0.00153 seconds |
|
178
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:1] | passed | 0.00015 seconds |
|
179
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:1:1:1] | passed | 0.00015 seconds |
|
180
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:1:1:2] | passed | 0.00022 seconds |
|
181
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:1:1:1] | passed | 0.00018 seconds |
|
182
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:1:1:2] | passed | 0.00044 seconds |
|
183
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:1:1:3] | passed | 0.00056 seconds |
|
184
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:1:1:4:1] | passed | 0.00114 seconds |
|
185
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:2:1:1] | passed | 0.00021 seconds |
|
186
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:2:1:2] | passed | 0.0014 seconds |
|
187
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:2:1:3] | passed | 0.00064 seconds |
|
188
|
+
./spec/defra_ruby/validators/true_false_validator_spec.rb[1:3:2:2:2:1:4:1] | passed | 0.0013 seconds |
|
189
|
+
./spec/defra_ruby/validators_spec.rb[1:1:1] | passed | 0.00414 seconds |
|
data/spec/support/i18n.rb
CHANGED
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Defra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -180,32 +180,18 @@ dependencies:
|
|
180
180
|
version: '3.0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: simplecov
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - ">="
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - ">="
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: vcr
|
197
183
|
requirement: !ruby/object:Gem::Requirement
|
198
184
|
requirements:
|
199
185
|
- - "~>"
|
200
186
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
187
|
+
version: 0.17.1
|
202
188
|
type: :development
|
203
189
|
prerelease: false
|
204
190
|
version_requirements: !ruby/object:Gem::Requirement
|
205
191
|
requirements:
|
206
192
|
- - "~>"
|
207
193
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
194
|
+
version: 0.17.1
|
209
195
|
- !ruby/object:Gem::Dependency
|
210
196
|
name: webmock
|
211
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -237,6 +223,7 @@ files:
|
|
237
223
|
- config/locales/defra_ruby/validators/email_validator/en.yml
|
238
224
|
- config/locales/defra_ruby/validators/grid_reference_validator/en.yml
|
239
225
|
- config/locales/defra_ruby/validators/location_validator/en.yml
|
226
|
+
- config/locales/defra_ruby/validators/past_date_validator/en.yml
|
240
227
|
- config/locales/defra_ruby/validators/phone_number_validator/en.yml
|
241
228
|
- config/locales/defra_ruby/validators/position_validator/en.yml
|
242
229
|
- config/locales/defra_ruby/validators/token_validator/en.yml
|
@@ -255,15 +242,13 @@ files:
|
|
255
242
|
- lib/defra_ruby/validators/engine.rb
|
256
243
|
- lib/defra_ruby/validators/grid_reference_validator.rb
|
257
244
|
- lib/defra_ruby/validators/location_validator.rb
|
245
|
+
- lib/defra_ruby/validators/past_date_validator.rb
|
258
246
|
- lib/defra_ruby/validators/phone_number_validator.rb
|
259
247
|
- lib/defra_ruby/validators/position_validator.rb
|
260
248
|
- lib/defra_ruby/validators/token_validator.rb
|
261
249
|
- lib/defra_ruby/validators/true_false_validator.rb
|
262
250
|
- lib/defra_ruby/validators/version.rb
|
263
251
|
- lib/defra_ruby_validators.rb
|
264
|
-
- spec/cassettes/company_no_inactive.yml
|
265
|
-
- spec/cassettes/company_no_not_found.yml
|
266
|
-
- spec/cassettes/company_no_valid.yml
|
267
252
|
- spec/defra_ruby/validators/business_type_validator_spec.rb
|
268
253
|
- spec/defra_ruby/validators/companies_house_number_validator_spec.rb
|
269
254
|
- spec/defra_ruby/validators/companies_house_service_spec.rb
|
@@ -271,6 +256,7 @@ files:
|
|
271
256
|
- spec/defra_ruby/validators/email_validator_spec.rb
|
272
257
|
- spec/defra_ruby/validators/grid_reference_validator_spec.rb
|
273
258
|
- spec/defra_ruby/validators/location_validator_spec.rb
|
259
|
+
- spec/defra_ruby/validators/past_date_validator_spec.rb
|
274
260
|
- spec/defra_ruby/validators/phone_number_validator_spec.rb
|
275
261
|
- spec/defra_ruby/validators/position_validator_spec.rb
|
276
262
|
- spec/defra_ruby/validators/token_validator_spec.rb
|
@@ -291,7 +277,6 @@ files:
|
|
291
277
|
- spec/support/shared_examples/validators/valid_record.rb
|
292
278
|
- spec/support/shared_examples/validators/validator.rb
|
293
279
|
- spec/support/simplecov.rb
|
294
|
-
- spec/support/vcr.rb
|
295
280
|
homepage: https://github.com/DEFRA/defra-ruby-validators
|
296
281
|
licenses:
|
297
282
|
- The Open Government Licence (OGL) Version 3
|
@@ -312,14 +297,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
297
|
- !ruby/object:Gem::Version
|
313
298
|
version: '0'
|
314
299
|
requirements: []
|
315
|
-
|
316
|
-
rubygems_version: 2.6.13
|
300
|
+
rubygems_version: 3.1.2
|
317
301
|
signing_key:
|
318
302
|
specification_version: 4
|
319
303
|
summary: Defra ruby on rails validations
|
320
304
|
test_files:
|
321
305
|
- spec/spec_helper.rb
|
322
306
|
- spec/defra_ruby/validators_spec.rb
|
307
|
+
- spec/defra_ruby/validators/past_date_validator_spec.rb
|
323
308
|
- spec/defra_ruby/validators/companies_house_service_spec.rb
|
324
309
|
- spec/defra_ruby/validators/configuration_spec.rb
|
325
310
|
- spec/defra_ruby/validators/phone_number_validator_spec.rb
|
@@ -332,12 +317,8 @@ test_files:
|
|
332
317
|
- spec/defra_ruby/validators/location_validator_spec.rb
|
333
318
|
- spec/defra_ruby/validators/email_validator_spec.rb
|
334
319
|
- spec/examples.txt
|
335
|
-
- spec/cassettes/company_no_not_found.yml
|
336
|
-
- spec/cassettes/company_no_valid.yml
|
337
|
-
- spec/cassettes/company_no_inactive.yml
|
338
320
|
- spec/support/simplecov.rb
|
339
321
|
- spec/support/i18n.rb
|
340
|
-
- spec/support/vcr.rb
|
341
322
|
- spec/support/pry.rb
|
342
323
|
- spec/support/defra_ruby_validators.rb
|
343
324
|
- 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 (linux-gnu 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
|
-
- Mon, 30 Sep 2019 13:21:55 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
|
-
- '597'
|
53
|
-
X-Ratelimit-Reset:
|
54
|
-
- '1569850005'
|
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: Mon, 30 Sep 2019 13:21:54 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 (linux-gnu 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
|
-
- Mon, 30 Sep 2019 13:21:55 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
|
-
- '598'
|
53
|
-
X-Ratelimit-Reset:
|
54
|
-
- '1569850005'
|
55
|
-
X-Ratelimit-Window:
|
56
|
-
- 5m
|
57
|
-
Server:
|
58
|
-
- CompaniesHouse
|
59
|
-
body:
|
60
|
-
encoding: UTF-8
|
61
|
-
string: '{"errors":[{"error":"company-profile-not-found","type":"ch:service"}]}'
|
62
|
-
http_version:
|
63
|
-
recorded_at: Mon, 30 Sep 2019 13:21:54 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 (linux-gnu 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
|
-
- Mon, 30 Sep 2019 13:21:56 GMT
|
27
|
-
Content-Type:
|
28
|
-
- application/json
|
29
|
-
Content-Length:
|
30
|
-
- '1178'
|
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
|
-
- '596'
|
53
|
-
X-Ratelimit-Reset:
|
54
|
-
- '1569850005'
|
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":{"accounting_reference_date":{"month":"12","day":"31"},"last_accounts":{"made_up_to":"2018-12-31","period_start_on":"2018-01-01","period_end_on":"2018-12-31"},"next_due":"2020-09-30","next_accounts":{"period_start_on":"2019-01-01","period_end_on":"2019-12-31","due_on":"2020-09-30","overdue":false},"next_made_up_to":"2019-12-31","overdue":false},"undeliverable_registered_office_address":false,"etag":"b2cacfcd5399fb7065ce1c074df1567771c68f9d","company_number":"09360070","registered_office_address":{"locality":"Sutton","postal_code":"SM3
|
62
|
-
9ND","region":"Surrey","address_line_1":"21 Haslam Avenue"},"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":"2020-02-06","overdue":false,"next_made_up_to":"2020-01-23","last_made_up_to":"2019-01-23"},"links":{"self":"/company/09360070","filing_history":"/company/09360070/filing-history","officers":"/company/09360070/officers"},"registered_office_is_in_dispute":false,"can_file":true}'
|
63
|
-
http_version:
|
64
|
-
recorded_at: Mon, 30 Sep 2019 13:21:54 GMT
|
65
|
-
recorded_with: VCR 4.0.0
|
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
|