medcon 0.2.1 → 1.0.0

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: c89c66ad2c4d25dfcc82041490bc2af5d43e06ccfcb2f6f4110d129bbd0c0e72
4
- data.tar.gz: 5309f4438737d95c51b9c4136128baf9720c3eed86c5d4f458dfbf330558ee3a
3
+ metadata.gz: 369f6bd3b08b5f7ef1998342d95eafcb7d2f752084c42412dd6e2e4756d69591
4
+ data.tar.gz: eb18e0f29e9840219e987e5dfda633eaf6d7a14146a65eb03b5e89c7c7480816
5
5
  SHA512:
6
- metadata.gz: 4cff5781fe5d2a8435ba23f130ac446b9c727ecec95e441333d1041715649dae83138e4a7ad885bd42447a9914850c4f4291a3142454f8165e496d201ebcd670
7
- data.tar.gz: c2e823e97f51620bc0500d12db1e14fe7adc9d010796473a9acdf7945583bb63644254c71c3c0582b60cd61729caab23ae50bc0fe83fb3116d08a11e31931e4e
6
+ metadata.gz: 34600c6c88b539c9634ef14f340fb2a3f8e0c0e4dbb6b14c3cefd815ae279b56ccd063f3338c690f9e4463d1b542348c262524995f5a7e620ddb6fe7e6ac3382
7
+ data.tar.gz: ad30f9ab748fa0bc415a916cbe0494d6ccf90f1aec9eb9115be4beba3f1a459d02c680253cd6c0923fd9425f778a499e234ac2be756c6f2361153c323659c5fd
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Medcon
4
- VERSION = "0.2.1"
4
+ VERSION = "1.0.0"
5
5
  end
data/lib/medcon.rb CHANGED
@@ -34,26 +34,26 @@ module Medcon
34
34
  end
35
35
 
36
36
  class << self
37
- DEFAULT_CDN_URI = URI("https://nuva.svc.edge.scw.cloud")
37
+ DEFAULT_CDN_URI = URI("https://vrc.cdn.mesvaccins.net")
38
38
 
39
39
  def load(cdn_uri: DEFAULT_CDN_URI, lang: "en", hash: nil)
40
40
  init_http(cdn_uri) do |http|
41
41
  # Fetch version manifest if necessary
42
42
  hash ||= fetch_latest_version_hash(http:)
43
43
 
44
- response = http.get("/conditions/#{hash}_#{lang}.db")
44
+ response = http.get("/dumps/#{hash}_#{lang}.db")
45
45
  Medcon.new(::Medcon::VaccinationProfileDatabase.decode(response.body))
46
46
  end
47
47
  end
48
48
 
49
49
  def fetch_latest_version_hash(cdn_uri: DEFAULT_CDN_URI, http: nil)
50
- if http.nil?
51
- http = init_http(cdn_uri)
52
- passed_http = false
53
- end
54
- response = http.get("/versions/last.json")
55
- hash = JSON.parse(response.body)["dump_hash"]
50
+ passed_http = !http.nil?
51
+ http = init_http(cdn_uri) if http.nil?
52
+ response = http.get("/versions/latest.json")
53
+ hash = JSON.parse(response.body)["hash"]
54
+
56
55
  http.finish unless passed_http
56
+
57
57
  hash
58
58
  end
59
59
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: medcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Syadem
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-29 00:00:00.000000000 Z
11
+ date: 2026-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf