scraper_utils 0.7.1 → 0.7.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: 4293294d99565b0ee4adc097e9d31619868477e6efa8255f3cd5ec02dc8b275b
4
- data.tar.gz: e78a08bced34a1f55b8d6e869158887da33f1d6b9803493c7d836402d64aa4ef
3
+ metadata.gz: ba66a28129ee09ab76cb0937d195ff68aa5058d1c73805235de4898384fe495d
4
+ data.tar.gz: 76c20b7ce9bd581e59fda41b8801bca8a26909d58ddcc74c46e7755e6038970a
5
5
  SHA512:
6
- metadata.gz: ea00598b58e69cf5d911b62148d5d38e13ef017dd5a22159839f3b4437bf28c7c2b17c4832e3869688970037048f69fb543f9645922d6b92888a5fc68d88fc33
7
- data.tar.gz: 57500daacbec8602c9288bf27bd7ac5f2ff407f621f9ac2c9e114a85fbbb0c555ebebfdc62782b814616b9b46dad65bd5a665b24bb1c9e6774625469bb290485
6
+ metadata.gz: 5ae13c2c5e4b8bb1c30c2c8a10dd30b42b349dfc7c416fc65bec504e27d7b5c9dad84b6ef195c52788412f238a6740e4fb8fc400e315a42aeb7ee57f8ada9a25
7
+ data.tar.gz: bf3d40831ee8667f663b442f92e76943db04eaa995095e09f4c3736e80919d26c924aa17d733a533ec32b278496c2aedd8c368eb40988e1fd9619c5febfb1567
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.2 - 2025-04-15
4
+
5
+ * Accept postcode before state as well as after
6
+
3
7
  ## 0.7.1 - 2025-04-15
4
8
 
5
9
  * Accept mixed case suburb names after a comma as well as uppercase suburb names as geocachable
@@ -11,10 +11,10 @@ module ScraperUtils
11
11
  /\bB(oulevard|lvd)\b/i,
12
12
  /\b(Circuit|Cct)\b/i,
13
13
  /\bCl(ose)?\b/i,
14
- /\bC(our|r)t\b/i,
14
+ /\bC(our|r)?t\b/i,
15
15
  /\bCircle\b/i,
16
16
  /\bChase\b/i,
17
- /\bCr(escent)?\b/i,
17
+ /\bCr(es(cent)?)?\b/i,
18
18
  /\bDr((ive)?|v)\b/i,
19
19
  /\bEnt(rance)?\b/i,
20
20
  /\bGr(ove)?\b/i,
@@ -33,7 +33,6 @@ module ScraperUtils
33
33
  /\bWay\b/i
34
34
  ].freeze
35
35
 
36
-
37
36
  AUSTRALIAN_POSTCODES = /\b\d{4}\b/.freeze
38
37
 
39
38
  # Check if an address is likely to be geocodable by analyzing its format.
@@ -53,7 +52,7 @@ module ScraperUtils
53
52
 
54
53
  has_unit_or_lot = address.match?(/\b(Unit|Lot:?)\s+\d+/i)
55
54
 
56
- has_suburb_stats = check_address.match?(/(\b[A-Z]{2,}(\s+[A-Z]+)*,?|,\s+[A-Z][A-Za-z ]+)\s+(#{AUSTRALIAN_STATES.join('|')})\b/)
55
+ has_suburb_stats = check_address.match?(/(\b[A-Z]{2,}(\s+[A-Z]+)*,?|,\s+[A-Z][A-Za-z ]+)(\s+\d{4})?\s+(#{AUSTRALIAN_STATES.join('|')})\b/)
57
56
 
58
57
  if ENV["DEBUG"]
59
58
  missing = []
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ScraperUtils
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scraper_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Heggie
@@ -118,7 +118,7 @@ metadata:
118
118
  allowed_push_host: https://rubygems.org
119
119
  homepage_uri: https://github.com/ianheggie-oaf/scraper_utils
120
120
  source_code_uri: https://github.com/ianheggie-oaf/scraper_utils
121
- documentation_uri: https://rubydoc.info/gems/scraper_utils/0.7.1
121
+ documentation_uri: https://rubydoc.info/gems/scraper_utils/0.7.2
122
122
  changelog_uri: https://github.com/ianheggie-oaf/scraper_utils/blob/main/CHANGELOG.md
123
123
  rubygems_mfa_required: 'true'
124
124
  post_install_message: