defra_ruby_validators 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/config/locales/defra_ruby_validators/companies_house_number/en.yml +14 -0
- data/lib/defra_ruby_validators/version.rb +1 -1
- data/spec/examples.txt +27 -15
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e2b90f695b85e87e772c0ff9706b022a889ddfc
|
4
|
+
data.tar.gz: d0fda70ca250ed7cedc5cb0243f9704858f5a3a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ce3932e23c36d6d657759fcfeb35976bf82d123469d702b18c681c0dc3fb32027309ec6070903d642a26bb1ce47712641dd7843266c85e3a50aca8cb5947f47
|
7
|
+
data.tar.gz: 1784ad53fb92e0d93550bb583109c84ccff475ed50dc43120467ed2db5f0a86ef1d3304f8b939b7a8c7d3b1f4e10c97bda1a176838261070eb87dbd9aebb6d46
|
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
[![Build Status](https://travis-ci.com/DEFRA/defra-ruby-validators.svg?branch=master)](https://travis-ci.com/DEFRA/defra-ruby-validators)
|
4
4
|
[![Maintainability](https://api.codeclimate.com/v1/badges/a0f8611f1a879786f642/maintainability)](https://codeclimate.com/github/DEFRA/defra-ruby-validators/maintainability)
|
5
5
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/a0f8611f1a879786f642/test_coverage)](https://codeclimate.com/github/DEFRA/defra-ruby-validators/test_coverage)
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/defra_ruby_validators.svg)](https://badge.fury.io/rb/defra_ruby_validators)
|
6
7
|
[![Licence](https://img.shields.io/badge/Licence-OGLv3-blue.svg)](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3)
|
7
8
|
|
8
9
|
Package of validations commonly used in Defra Rails based digital services.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
en:
|
2
|
+
defra_ruby_validators:
|
3
|
+
companies_house_number:
|
4
|
+
hint: An 8 digit number, or 2 letters followed by a 6 digit number, or 2 letters followed by 5 digits and another letter
|
5
|
+
help:
|
6
|
+
heading: What's a registration number?
|
7
|
+
limitedCompany: This is issued when the company is registered, and can be found on your Certificate of Incorporation and any paperwork from Companies House.
|
8
|
+
limitedLiabilityPartnership: This is issued when the limited liability partnership is registered, and can be found on your Certificate of Incorporation and any paperwork from Companies House.
|
9
|
+
errors:
|
10
|
+
blank: Enter a company registration number
|
11
|
+
invalid: "Enter a valid number - it should have 8 digits, or 2 letters followed by 6 digits, or 2 letters followed by 5 digits and another letter. If your number has only 7 digits, enter it with a zero at the start."
|
12
|
+
not_found: Companies House couldn't find a company with this number
|
13
|
+
inactive: Your company must be registered as an active company
|
14
|
+
error: There was an error connecting with Companies House. Hopefully this is a one off and will work if you try again.
|
data/spec/examples.txt
CHANGED
@@ -1,15 +1,27 @@
|
|
1
|
-
example_id | status | run_time
|
2
|
-
------------------------------------------------------------------------------ | ------ |
|
3
|
-
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:1:1] | passed | 0.
|
4
|
-
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:2:1] | passed | 0.
|
5
|
-
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:3:1] | passed | 0.
|
6
|
-
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:4:1] | passed | 0.
|
7
|
-
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:1:1] | passed | 0.
|
8
|
-
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:1:2] | passed |
|
9
|
-
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:
|
10
|
-
./spec/defra_ruby_validators/
|
11
|
-
./spec/defra_ruby_validators/
|
12
|
-
./spec/defra_ruby_validators/
|
13
|
-
./spec/defra_ruby_validators/
|
14
|
-
./spec/defra_ruby_validators/
|
15
|
-
./spec/defra_ruby_validators/
|
1
|
+
example_id | status | run_time |
|
2
|
+
------------------------------------------------------------------------------ | ------ | --------------- |
|
3
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:1:1] | passed | 0.01413 seconds |
|
4
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:2:1] | passed | 0.0008 seconds |
|
5
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:3:1] | passed | 0.00053 seconds |
|
6
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:4:1] | passed | 0.00051 seconds |
|
7
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:1:1] | passed | 0.00043 seconds |
|
8
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:1:2] | passed | 0.00134 seconds |
|
9
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:1:3] | passed | 0.00047 seconds |
|
10
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:2:1] | passed | 0.00035 seconds |
|
11
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:2:2] | passed | 0.00025 seconds |
|
12
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:2:3] | passed | 0.00024 seconds |
|
13
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:3:1] | passed | 0.00077 seconds |
|
14
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:3:2] | passed | 0.00077 seconds |
|
15
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:3:3] | passed | 0.00076 seconds |
|
16
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:4:1] | passed | 0.00064 seconds |
|
17
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:4:2] | passed | 0.00056 seconds |
|
18
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:4:3] | passed | 0.00058 seconds |
|
19
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:3:1] | passed | 0.00064 seconds |
|
20
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:3:2] | passed | 0.00057 seconds |
|
21
|
+
./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:3:3] | passed | 0.00066 seconds |
|
22
|
+
./spec/defra_ruby_validators/companies_house_service_spec.rb[1:1:1] | passed | 0.04998 seconds |
|
23
|
+
./spec/defra_ruby_validators/companies_house_service_spec.rb[1:2:1] | passed | 0.02093 seconds |
|
24
|
+
./spec/defra_ruby_validators/companies_house_service_spec.rb[1:3:1] | passed | 0.02306 seconds |
|
25
|
+
./spec/defra_ruby_validators/companies_house_service_spec.rb[1:4:1] | passed | 0.02332 seconds |
|
26
|
+
./spec/defra_ruby_validators/companies_house_service_spec.rb[1:5:1] | passed | 0.01492 seconds |
|
27
|
+
./spec/defra_ruby_validators/version_spec.rb[1:1] | passed | 0.00312 seconds |
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: defra_ruby_validators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Defra
|
@@ -204,6 +204,7 @@ files:
|
|
204
204
|
- Rakefile
|
205
205
|
- bin/console
|
206
206
|
- bin/setup
|
207
|
+
- config/locales/defra_ruby_validators/companies_house_number/en.yml
|
207
208
|
- lib/defra_ruby_validators.rb
|
208
209
|
- lib/defra_ruby_validators/companies_house_number_validator.rb
|
209
210
|
- lib/defra_ruby_validators/companies_house_service.rb
|