oddb2xml 3.0.1 → 3.0.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/Gemfile.lock +1 -1
- data/History.txt +5 -0
- data/README.md +1 -0
- data/lib/oddb2xml/util.rb +14 -6
- data/lib/oddb2xml/version.rb +1 -1
- data/oddb2xml.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 55725f8e11fa91216b5f7189f9339a6bacf6fd69af78c633421abc8c573a2326
|
|
4
|
+
data.tar.gz: acd34c442ef756f43aeac9e2551df614fff4bad81894a87add521e4c7efab8cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 273f80bb691ae1d0e86db41d9215456c48822f4a764163c3675d87ca6f975f11cd8d2dce89f4bf71abd9b8e320b61babd45c73d0683faafbeb25adf56f2d12b6
|
|
7
|
+
data.tar.gz: c0014b66c15ebddcff17cf1435d24faab68ab856faa5d198208f94d9d6925540d4939ce4ff82f4f4d38c1fc319156dbaecf49415f56e8fce1d676d3e06b179fc
|
data/Gemfile.lock
CHANGED
data/History.txt
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
=== 3.0.2 / 09.03.2026
|
|
2
|
+
* Use raw.githubusercontent.com URL for ATC CSV to avoid 429 Too Many Requests errors
|
|
3
|
+
* Add retry logic with exponential backoff for HTTP 429 errors in uri_open
|
|
4
|
+
* Remove obsolete Ruby version check in uri_open (Ruby >= 2.5 already required)
|
|
5
|
+
|
|
1
6
|
=== 2.7.9 / 19.09.22
|
|
2
7
|
* Remove newly generated DSCRI when not running --artikelstamm and
|
|
3
8
|
generate always (as before 2.7.8) a DSCRF fiele
|
data/README.md
CHANGED
|
@@ -284,6 +284,7 @@ We use the following files:
|
|
|
284
284
|
* http://download.swissmedicinfo.ch/ (AipsDownload)
|
|
285
285
|
* https://raw.githubusercontent.com/zdavatz/oddb2xml_files/master/LPPV.txt
|
|
286
286
|
* https://raw.githubusercontent.com/epha/robot/master/data/manual/swissmedic/atc.csv
|
|
287
|
+
* https://raw.githubusercontent.com/zdavatz/cpp2sqlite/master/input/atc_codes_multi_lingual.txt
|
|
287
288
|
|
|
288
289
|
## Rules for matching GTIN (aka EAN13), product number and IKSNR
|
|
289
290
|
|
data/lib/oddb2xml/util.rb
CHANGED
|
@@ -7,12 +7,20 @@ module Oddb2xml
|
|
|
7
7
|
sprintf("%05d", iksnr) + sprintf("%02d", seqnr)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
def self.uri_open(url)
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
def self.uri_open(url, max_retries: 3)
|
|
11
|
+
retries = 0
|
|
12
|
+
begin
|
|
13
13
|
URI.parse(url).open
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
rescue OpenURI::HTTPError => e
|
|
15
|
+
if e.message.start_with?("429") && retries < max_retries
|
|
16
|
+
retries += 1
|
|
17
|
+
delay = 2**retries
|
|
18
|
+
$stderr.puts "429 Too Many Requests for #{url}, retrying in #{delay}s (attempt #{retries}/#{max_retries})"
|
|
19
|
+
sleep delay
|
|
20
|
+
retry
|
|
21
|
+
else
|
|
22
|
+
raise
|
|
23
|
+
end
|
|
16
24
|
end
|
|
17
25
|
end
|
|
18
26
|
|
|
@@ -32,7 +40,7 @@ module Oddb2xml
|
|
|
32
40
|
DOWNLOADS = "#{Dir.pwd}/downloads"
|
|
33
41
|
end
|
|
34
42
|
@options = {}
|
|
35
|
-
@atc_csv_origin = "https://
|
|
43
|
+
@atc_csv_origin = "https://raw.githubusercontent.com/zdavatz/cpp2sqlite/master/input/atc_codes_multi_lingual.txt"
|
|
36
44
|
@atc_csv_content = {}
|
|
37
45
|
|
|
38
46
|
def self.html_decode(string)
|
data/lib/oddb2xml/version.rb
CHANGED
data/oddb2xml.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.description = "oddb2xml creates xml files using swissINDEX, BAG-XML and Swissmedic."
|
|
11
11
|
spec.summary = "oddb2xml creates xml files."
|
|
12
12
|
spec.homepage = "https://github.com/zdavatz/oddb2xml"
|
|
13
|
-
spec.license = "GPL-3.0"
|
|
13
|
+
spec.license = "GPL-3.0-only"
|
|
14
14
|
spec.files = `git ls-files -z`.split("\x0")
|
|
15
15
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: oddb2xml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yasuhiro Asaka, Zeno R.R. Davatz, Niklaus Giger
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubyzip
|
|
@@ -550,7 +550,7 @@ files:
|
|
|
550
550
|
- tools/win_fetch_cacerts.rb
|
|
551
551
|
homepage: https://github.com/zdavatz/oddb2xml
|
|
552
552
|
licenses:
|
|
553
|
-
- GPL-3.0
|
|
553
|
+
- GPL-3.0-only
|
|
554
554
|
metadata: {}
|
|
555
555
|
post_install_message:
|
|
556
556
|
rdoc_options: []
|