scraper_utils 0.8.0 → 0.8.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/scraper_utils/db_utils.rb +2 -2
- data/lib/scraper_utils/log_utils.rb +0 -1
- data/lib/scraper_utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5103f6e00bdb69c631084a1c6bc939bb7380b0dcd342e21c61eb4b4756482aa9
|
4
|
+
data.tar.gz: '068e221220371c3e27379ccccd7f784db108985e02273da92eca9d1d94b90620'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6b04d20acfe5944f24b1c3a86816d817088d85c2bb208699eee0d88da1f9927d645d84ed3170483843cb8d34f09d06db18982f660b31392853b696a4c3239ed
|
7
|
+
data.tar.gz: 0ab144cb6f9b9da5df3476f441b3701e254ddf18b264a181394da7e535a53ec234cfb6f75d2b50a0b0557fdb435b663427356178adee8505c5e2633f341d8676
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.8.2 - 2025-05-07
|
4
|
+
|
5
|
+
* Ignore blank dates supplied when validating rather than complain they are not valid
|
6
|
+
|
7
|
+
## 0.8.1 - 2025-05-06
|
8
|
+
|
9
|
+
* Removed debugging output accidentally left in
|
10
|
+
|
3
11
|
## 0.8.0 - 2025-05-06
|
4
12
|
|
5
13
|
* Added ScraperUtils::LogUtils.project_backtrace_line to provide the first project related backtrace line
|
@@ -21,10 +21,10 @@ module ScraperUtils
|
|
21
21
|
|
22
22
|
# Validate date formats
|
23
23
|
%w[date_scraped date_received on_notice_from on_notice_to].each do |date_field|
|
24
|
-
Date.parse(record[date_field])
|
24
|
+
Date.parse(record[date_field]) unless record[date_field].to_s.empty?
|
25
25
|
rescue ArgumentError
|
26
26
|
raise ScraperUtils::UnprocessableRecord,
|
27
|
-
"Invalid date format for #{date_field}: #{record[date_field]}"
|
27
|
+
"Invalid date format for #{date_field}: #{record[date_field].inspect}"
|
28
28
|
end
|
29
29
|
|
30
30
|
# Determine primary key based on presence of authority_label
|
@@ -150,7 +150,6 @@ module ScraperUtils
|
|
150
150
|
expect_bad_prefix = expect_bad.include?(authority) ? "[EXPECT BAD] " : ""
|
151
151
|
exception_msg = if exceptions[authority]
|
152
152
|
location = self.project_backtrace_line(exceptions[authority].backtrace, format: true)
|
153
|
-
puts "LOCATION: #{location.inspect}"
|
154
153
|
"#{exceptions[authority].class} - #{exceptions[authority]}#{location}"
|
155
154
|
else
|
156
155
|
"-"
|
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.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Heggie
|
@@ -119,7 +119,7 @@ metadata:
|
|
119
119
|
allowed_push_host: https://rubygems.org
|
120
120
|
homepage_uri: https://github.com/ianheggie-oaf/scraper_utils
|
121
121
|
source_code_uri: https://github.com/ianheggie-oaf/scraper_utils
|
122
|
-
documentation_uri: https://rubydoc.info/gems/scraper_utils/0.8.
|
122
|
+
documentation_uri: https://rubydoc.info/gems/scraper_utils/0.8.2
|
123
123
|
changelog_uri: https://github.com/ianheggie-oaf/scraper_utils/blob/main/CHANGELOG.md
|
124
124
|
rubygems_mfa_required: 'true'
|
125
125
|
post_install_message:
|