vaccination-characteristics 1.0.0 → 1.1.1

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: c38f62b61bcd209e389453c7835926eace661af1e2a6ec97c50761bfb8391297
4
- data.tar.gz: bba32f9610de849d410311718572ebbbc2c2423e5a30390b1e7cf057b4ff605f
3
+ metadata.gz: dc749136cf31028d6cd64677724c126612fdec3b4f00c15e267cd164ee7e9a62
4
+ data.tar.gz: 522f8d90b2495b59a1032d67e379c1dbbff119008e91ac4d27683e5f84abe82a
5
5
  SHA512:
6
- metadata.gz: b959888a5f91356ccba2a76359a259da3183c99d9889a823f8342bd8ee6fcad0c79ade3554ae6de0300e9cd33c4b12416b21988501d65ab73a6d72c31d691ba4
7
- data.tar.gz: ef7322478000fec287cfe18d14a38a828400de431d5b070d705816e2b3441ee1934d2dbadad67dde580fd596d07a6e0e93d58cb630522fb6c6b8e30eaad263ec
6
+ metadata.gz: 85b57860c77fc1ee6128e7a2381459ce96d00a42c17586477bdc6f8786b4b1c785578c3da3c9ed55b95db4de779e08dad5d17aad0476260bc2fec27354fd6156
7
+ data.tar.gz: bf40604565c9cbf94eb71d4c8516460d645bcdf550fa720231378676ae4e22a5d7557a1f63a2f91f77fd5b280ac9918f652d8931b18ea549f160b8f2179a38e7
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VaccinationCharacteristics
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.1"
5
5
  end
@@ -13,11 +13,9 @@ module VaccinationCharacteristics
13
13
  attr_reader :queries
14
14
 
15
15
  def initialize(db)
16
- @db = db
17
-
18
- @repositories = OpenStruct.new
19
- @repositories.conditions =
20
- Repositories::ConditionRepository.new db.conditions
16
+ @db = db
17
+ @repositories = OpenStruct.new
18
+ @repositories.conditions = Repositories::ConditionRepository.new(db.conditions)
21
19
  @repositories.freeze
22
20
  end
23
21
 
@@ -36,13 +34,14 @@ module VaccinationCharacteristics
36
34
  class << self
37
35
  DEFAULT_CDN_URI = URI("https://vrc.cdn.mesvaccins.net")
38
36
 
39
- def load(cdn_uri: DEFAULT_CDN_URI, lang: "en", hash: nil)
37
+ def load(cdn_uri: DEFAULT_CDN_URI, langs:, hash: nil)
40
38
  init_http(cdn_uri) do |http|
41
- # Fetch version manifest if necessary
42
39
  hash ||= fetch_latest_version_hash(http:)
43
40
 
44
- response = http.get("/dumps/#{hash}_#{lang}.db")
45
- Database.new(::VaccinationCharacteristics::VaccinationCharacteristicsDatabase.decode(response.body))
41
+ langs.each_with_object({}) do |lang, obj|
42
+ response = http.get("/dumps/#{hash}_#{lang}.db")
43
+ obj[lang.to_sym] = Database.new(VaccinationCharacteristicsDatabase.decode(response.body))
44
+ end
46
45
  end
47
46
  end
48
47
 
@@ -58,7 +57,7 @@ module VaccinationCharacteristics
58
57
  end
59
58
 
60
59
  def load_from_file(path)
61
- Database.new(::VaccinationCharacteristics::VaccinationCharacteristicsDatabase.decode(File.read(path)))
60
+ Database.new(VaccinationCharacteristicsDatabase.decode(File.read(path)))
62
61
  end
63
62
 
64
63
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vaccination-characteristics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Syadem
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-18 00:00:00.000000000 Z
11
+ date: 2026-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf