postio 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75a21e6757601175aa0ef69e931e9fc6011b7ac42e641f63f08d8b65d07f8142
4
- data.tar.gz: 0d2272d121b4066ed2d203b9293972d7b83aa5f731bce205e7e0504ce612aee5
3
+ metadata.gz: 41300707dab2745d0a8a84e53ec508775af91729671c2e59c4469f6e16a1c75c
4
+ data.tar.gz: 749b0014ab03dea3edff07e35a51ae714b2f76c3076ec0d45c71efbe738b85e0
5
5
  SHA512:
6
- metadata.gz: cffd29bddf693763cc7723473737997aa09761f7937d1f965d4c3a2067042e97742f09ba5d989b3b519150cae62170ab5446ed9a1720ca020e3dea1a2af216b9
7
- data.tar.gz: 13c21757dab0bc3a53060f5254b3f1793e867cb651d698e506ab4a97a96ddd21bbe049612b11983b8ff515bae3e914aeb13d5fac4f73652ade1daed2521c6b63
6
+ metadata.gz: e6963d95626b108a75dc8e3f9913a1ded082ae2fd917d0aa1860ed8c2596cd82ceb0a922c0e79d2b1b6987b7f48b89adf51d04f1ec13a5ed76c88c08c81f19f1
7
+ data.tar.gz: a5da0053ef0c55b0638a39b6d01b5369144dbe20ab678594a1e90830e203e254901a0ab0a1f46b7dd26703ebfc38cba87cdb4d99fca6d985265c1d91172c67e6
data/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ follows [SemVer](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.2] — 2026-08-12
10
+
11
+ ### Removed
12
+
13
+ - `county` from the address model. It came from ONS administrative geography
14
+ rather than Royal Mail data, resolved for only part of the country, and is
15
+ not part of a correct UK postal address — Royal Mail removed postal counties
16
+ from PAF in December 2000. `district` and `ward` remain, and are ONS
17
+ administrative geography rather than postal fields.
18
+
9
19
  ## [0.1.1] — 2026-05-02
10
20
 
11
21
  ### Changed
data/README.md CHANGED
@@ -4,9 +4,11 @@
4
4
  [![Ruby](https://img.shields.io/badge/ruby-%3E%3D%203.1-red)](https://rubygems.org/gems/postio)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
 
7
- Ruby SDK for the [Postio API](https://postio.co.uk) — UK address, email, and
8
- phone validation. Backed by Royal Mail PAF and Ordnance Survey. Stdlib
9
- `net/http` only, zero runtime dependencies.
7
+ Ruby SDK for [Postio](https://postio.co.uk) — the UK validation API for
8
+ addresses, emails and phone numbers. Stdlib `net/http` only, zero runtime
9
+ dependencies. Backed by Royal Mail PAF and Ordnance Survey.
10
+
11
+ > **First time?** [Sign up free](https://postio.co.uk) — first 100 lookups on us, no card needed.
10
12
 
11
13
  ## Install
12
14
 
@@ -27,7 +29,7 @@ Requires Ruby 3.1+.
27
29
  ```ruby
28
30
  require "postio"
29
31
 
30
- client = Postio::Client.new(api_key: "pk_live_...") # or set POSTIO_API_KEY
32
+ client = Postio::Client.new(api_key: "pk_...") # or set POSTIO_API_KEY
31
33
 
32
34
  result = client.address.search("downing street")
33
35
  result.results.each do |hit|
@@ -84,7 +86,7 @@ the raw `envelope`.
84
86
 
85
87
  ```ruby
86
88
  client = Postio::Client.new(
87
- api_key: "pk_live_...",
89
+ api_key: "pk_...",
88
90
  base_url: "https://api.postio.co.uk/v1", # default
89
91
  timeout: 10, # seconds
90
92
  retries: 2, # 0 to disable
data/lib/postio/client.rb CHANGED
@@ -13,7 +13,7 @@ module Postio
13
13
  #
14
14
  # Example:
15
15
  #
16
- # client = Postio::Client.new(api_key: "pk_live_...")
16
+ # client = Postio::Client.new(api_key: "pk_...")
17
17
  # r = client.address.search("downing street")
18
18
  # r.results.each { |hit| puts "#{hit.udprn}: #{hit.suggestion}" }
19
19
  #
data/lib/postio/models.rb CHANGED
@@ -44,7 +44,7 @@ module Postio
44
44
  :organisation_name, :department_name, :building_name, :building_number,
45
45
  :sub_building_name, :po_box, :thoroughfare, :dependent_thoroughfare,
46
46
  :dependent_locality, :double_dependent_locality, :delivery_point_suffix,
47
- :country, :county, :district, :ward,
47
+ :country, :district, :ward,
48
48
  :latitude, :longitude, :eastings, :northings
49
49
  ) do
50
50
  def self.from_hash(h)
@@ -70,7 +70,6 @@ module Postio
70
70
  double_dependent_locality: h["double_dependent_locality"],
71
71
  delivery_point_suffix: h["delivery_point_suffix"],
72
72
  country: h["country"],
73
- county: h["county"],
74
73
  district: h["district"],
75
74
  ward: h["ward"],
76
75
  latitude: h["latitude"]&.to_f,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Postio
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
data/lib/postio.rb CHANGED
@@ -7,7 +7,7 @@ require_relative "postio/client"
7
7
 
8
8
  # Top-level Postio module. Use Postio::Client to construct the API client.
9
9
  #
10
- # client = Postio::Client.new(api_key: "pk_live_...")
10
+ # client = Postio::Client.new(api_key: "pk_...")
11
11
  # client.address.search("downing street")
12
12
  module Postio
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-02 00:00:00.000000000 Z
11
+ date: 2026-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec