postman_paf 0.3.0 → 0.4.0
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 -1
- data/lib/postman_paf/version.rb +1 -1
- data/lib/postman_paf.rb +21 -3
- data/postman_paf.gemspec +9 -18
- metadata +12 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ada41fa8df5879ed93ec3f087cadd6ad5366f17d4454500c69251aac208a18f
|
4
|
+
data.tar.gz: 247ff8b4e797883415ca63345543074cdf82380453317bb5eb47dfc42708c96d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77ed4809072adf72999c5260c08c0549e73db0efb80dc909545751400c6ede7a942d036b21e00a09804a84b18f4db1c404e458b88c575d1b1f2815688c7a1fe5
|
7
|
+
data.tar.gz: 9e5d453fe856805bbe3ad15efc31970a0fab223c5e3cbe21f1f5ce177a51471ba8f6492b0af1d20c7f692b7863ae8045c61969ff40ae806564ea0497f86f34b9
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# PostmanPAF
|
2
2
|
|
3
|
-
|
3
|
+
Converts Royal Mail PAF (Postcode Address File) addresses to a printable format for an envelope or address label.
|
4
4
|
|
5
5
|
This is an unofficial gem to apply Royal Mail Rules & Exceptions when converting PAF addresses.
|
6
6
|
Based on the [Royal Mail Programmers' Guide](https://www.poweredbypaf.com/wp-content/uploads/2017/07/Latest-Programmers_guide_Edition-7-Version-6.pdf), 'Formatting a PAF address for printing' (page 27).
|
data/lib/postman_paf/version.rb
CHANGED
data/lib/postman_paf.rb
CHANGED
@@ -4,9 +4,27 @@ require 'json'
|
|
4
4
|
require 'logger'
|
5
5
|
require 'simple_symbolize'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
require_relative 'postman_paf/exceptions/exceptions'
|
8
|
+
require_relative 'postman_paf/exceptions/last_part_exceptions'
|
9
|
+
require_relative 'postman_paf/exceptions/rule_3_exceptions'
|
10
|
+
require_relative 'postman_paf/exceptions/rule_5_and_7_exceptions'
|
11
|
+
require_relative 'postman_paf/exceptions/rule_6_exceptions'
|
12
|
+
require_relative 'postman_paf/exceptions/which_exception'
|
13
|
+
require_relative 'postman_paf/rules/address_builder'
|
14
|
+
require_relative 'postman_paf/rules/building_number'
|
15
|
+
require_relative 'postman_paf/rules/rule_1'
|
16
|
+
require_relative 'postman_paf/rules/rule_2'
|
17
|
+
require_relative 'postman_paf/rules/rule_3'
|
18
|
+
require_relative 'postman_paf/rules/rule_4'
|
19
|
+
require_relative 'postman_paf/rules/rule_5'
|
20
|
+
require_relative 'postman_paf/rules/rule_6'
|
21
|
+
require_relative 'postman_paf/rules/rule_7'
|
22
|
+
require_relative 'postman_paf/rules/rules'
|
23
|
+
require_relative 'postman_paf/rules/which_rule'
|
24
|
+
require_relative 'postman_paf/converter'
|
25
|
+
require_relative 'postman_paf/printable_address'
|
26
|
+
require_relative 'postman_paf/validator'
|
27
|
+
require_relative 'postman_paf/version'
|
10
28
|
|
11
29
|
module PostmanPAF
|
12
30
|
# Initialise Logger output.
|
data/postman_paf.gemspec
CHANGED
@@ -8,26 +8,22 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['Driver and Vehicle Licensing Agency (DVLA)', 'Mark Isaac']
|
9
9
|
spec.email = ['mark.isaac@dvla.gov.uk']
|
10
10
|
|
11
|
-
spec.summary = '
|
11
|
+
spec.summary = 'Converts Royal Mail PAF (Postcode Address File) addresses to a printable format.'
|
12
12
|
|
13
13
|
spec.description = <<-DESCRIPTION
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
Converts Royal Mail PAF (Postcode Address File) addresses to a printable format for an envelope or address label.
|
15
|
+
|
16
|
+
This is an unofficial gem to apply Royal Mail Rules & Exceptions when converting PAF addresses.
|
17
|
+
|
18
|
+
Based on the Royal Mail Programmers' Guide: https://www.poweredbypaf.com/wp-content/uploads/2017/07/Latest-Programmers_guide_Edition-7-Version-6.pdf, 'Formatting a PAF address for printing' (page 27).
|
19
|
+
|
20
|
+
Conversions aim to resemble addresses returned by Royal Mail Find a PostCode as accurately as possible: https://www.royalmail.com/find-a-postcode.
|
17
21
|
DESCRIPTION
|
18
22
|
|
19
|
-
|
23
|
+
spec.homepage = 'https://github.com/dvla/postman-paf'
|
20
24
|
spec.license = 'MIT'
|
21
25
|
spec.required_ruby_version = '>= 3.0'
|
22
26
|
|
23
|
-
# spec.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
|
24
|
-
|
25
|
-
# spec.metadata['homepage_uri'] = spec.homepage
|
26
|
-
# spec.metadata['source_code_uri'] = "TODO: Put your gem's public repo URL here."
|
27
|
-
# spec.metadata['changelog_uri'] = "TODO: Put your gem's CHANGELOG.md URL here."
|
28
|
-
|
29
|
-
# Specify which files should be added to the gem when it is released.
|
30
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31
27
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
32
28
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
33
29
|
end
|
@@ -35,11 +31,6 @@ Gem::Specification.new do |spec|
|
|
35
31
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
36
32
|
spec.require_paths = ['lib']
|
37
33
|
|
38
|
-
# Uncomment to register a new dependency of your gem
|
39
|
-
# spec.add_dependency "example-gem", "~> 1.0"
|
40
|
-
|
41
|
-
# For more information and examples about making a new gem, checkout our
|
42
|
-
# guide at: https://bundler.io/guides/creating_gem.html
|
43
34
|
spec.add_development_dependency 'bundler-audit', '~> 0.9'
|
44
35
|
spec.add_development_dependency 'hash_miner', '~> 1.1'
|
45
36
|
spec.add_development_dependency 'pry', '~> 0.14'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postman_paf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Driver and Vehicle Licensing Agency (DVLA)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-02-
|
12
|
+
date: 2024-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler-audit
|
@@ -138,9 +138,13 @@ dependencies:
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '4.0'
|
140
140
|
description: |2
|
141
|
-
|
142
|
-
|
143
|
-
|
141
|
+
Converts Royal Mail PAF (Postcode Address File) addresses to a printable format for an envelope or address label.
|
142
|
+
|
143
|
+
This is an unofficial gem to apply Royal Mail Rules & Exceptions when converting PAF addresses.
|
144
|
+
|
145
|
+
Based on the Royal Mail Programmers' Guide: https://www.poweredbypaf.com/wp-content/uploads/2017/07/Latest-Programmers_guide_Edition-7-Version-6.pdf, 'Formatting a PAF address for printing' (page 27).
|
146
|
+
|
147
|
+
Conversions aim to resemble addresses returned by Royal Mail Find a PostCode as accurately as possible: https://www.royalmail.com/find-a-postcode.
|
144
148
|
email:
|
145
149
|
- mark.isaac@dvla.gov.uk
|
146
150
|
executables: []
|
@@ -183,7 +187,7 @@ files:
|
|
183
187
|
- lib/postman_paf/validator.rb
|
184
188
|
- lib/postman_paf/version.rb
|
185
189
|
- postman_paf.gemspec
|
186
|
-
homepage:
|
190
|
+
homepage: https://github.com/dvla/postman-paf
|
187
191
|
licenses:
|
188
192
|
- MIT
|
189
193
|
metadata: {}
|
@@ -205,6 +209,6 @@ requirements: []
|
|
205
209
|
rubygems_version: 3.3.7
|
206
210
|
signing_key:
|
207
211
|
specification_version: 4
|
208
|
-
summary:
|
209
|
-
|
212
|
+
summary: Converts Royal Mail PAF (Postcode Address File) addresses to a printable
|
213
|
+
format.
|
210
214
|
test_files: []
|