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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 423deb6f44961525a9612a533db996555e296701
4
- data.tar.gz: 3b0e8e06f17f4e5fb7999ab5e684f76453fe792d
3
+ metadata.gz: 3e2b90f695b85e87e772c0ff9706b022a889ddfc
4
+ data.tar.gz: d0fda70ca250ed7cedc5cb0243f9704858f5a3a3
5
5
  SHA512:
6
- metadata.gz: 86868cd7dd7b19ea0b7112599c90c534151f02491fafc1af0e3fdeb816c3ff9e90f4299b196f323da3e4791431146a1c7d8acf58295b9bc7ed7d2caffa099bdf
7
- data.tar.gz: b39a209754d3676202d5b2c95d7af7d11a2228b3befd60c68d3084b60b0de6a9bfbdca304354864a669555bcbbcf32c9e97780f140569e1f697c1780652dc2e8
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DefraRubyValidators
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -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.02962 seconds |
4
- ./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:2:1] | passed | 0.00043 seconds |
5
- ./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:3:1] | passed | 0.00026 seconds |
6
- ./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:1:4:1] | passed | 0.00026 seconds |
7
- ./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:1:1] | passed | 0.01795 seconds |
8
- ./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:1:2] | passed | 1 minute 29.46 seconds |
9
- ./spec/defra_ruby_validators/companies_house_number_validator_spec.rb[1:2:2:1] | failed | 0.02416 seconds |
10
- ./spec/defra_ruby_validators/companies_house_service_spec.rb[1:1:1] | passed | 0.0289 seconds |
11
- ./spec/defra_ruby_validators/companies_house_service_spec.rb[1:2:1] | passed | 0.01738 seconds |
12
- ./spec/defra_ruby_validators/companies_house_service_spec.rb[1:3:1] | passed | 0.01767 seconds |
13
- ./spec/defra_ruby_validators/companies_house_service_spec.rb[1:4:1] | passed | 0.01833 seconds |
14
- ./spec/defra_ruby_validators/companies_house_service_spec.rb[1:5:1] | passed | 0.01512 seconds |
15
- ./spec/defra_ruby_validators/version_spec.rb[1:1] | passed | 0.00209 seconds |
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.0
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