nuva 0.5.2 → 0.6.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: 82acd70c0a5b198a39012c92d1094224e71dfb637dceaf9fbaaf45cc25e6ef8c
4
- data.tar.gz: c1e69015254f080bf35e83aa2ec962b1131b47d926d0b846ae598b28a184f384
3
+ metadata.gz: 846eaef2fa2804ed5d1c9c7b234494f7e6b37dc78cc68dc3bfc5ee01cb7e0d67
4
+ data.tar.gz: 9a9772957a0462993338f036cf31ea2378494036aceefc979d3d365baaff8a94
5
5
  SHA512:
6
- metadata.gz: 2591d93c4dec3b775eb61c5f19197520cda3a503d894c56adfc2dcffb8135c92b0cbd5e5c3b057cbabb83a984d3ae455000fe6c71398afab6269262fad105cc6
7
- data.tar.gz: ecce6537ef36080c174e31983c8bee7f56157beaf3366ceb5ab629a345cdabd0bb93c41dbd4b88f750a706db715efa3317816c2226631cae339d7b2540f6a1fc
6
+ metadata.gz: 2471fca1ef4c1a22d50ec7e81311aa013637939bd8686e0f4b7d9b0a260797ffe6dceda7423cb57fdb3611bcdaba14cffa7ec0cc32c181a896ea987e3ce212cb
7
+ data.tar.gz: 9522fdeaf93c794d429599c50ad5135a55527e204fb2cd789cb64a58bd0c774552747a0253df9d7fa3f8080ce30889a3ae288723d75736dd277fa9bcc419f721
data/Changelog.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.6.0] - 2026-09-18
9
+
10
+ ### Changed
11
+
12
+ - Require `google-protobuf` version 4.35.1 or newer, while remaining below version 5.
13
+
14
+ ## [0.5.3] - 2026-02-23
15
+
16
+ ### Changed
17
+
18
+ - Handle proxy params
19
+
8
20
  ## [0.5.2] - 2025-03-12
9
21
 
10
22
  ### Fixed
data/lib/nuva/Code_pb.rb CHANGED
@@ -1,16 +1,14 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: Code.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("Code.proto", :syntax => :proto3) do
8
- add_message "nuva.Code" do
9
- optional :nomenclature, :string, 1
10
- optional :value, :string, 2
11
- end
12
- end
13
- end
7
+
8
+ descriptor_data = "\n\nCode.proto\x12\x04nuva\"+\n\x04\x43ode\x12\x14\n\x0cnomenclature\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3"
9
+
10
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
+ pool.add_serialized_file(descriptor_data)
14
12
 
15
13
  module Nuva
16
14
  Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nuva.Code").msgclass
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: Disease.proto
3
4
 
@@ -6,21 +7,11 @@ require 'google/protobuf'
6
7
  require 'google/protobuf/timestamp_pb'
7
8
  require_relative 'Code_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("Disease.proto", :syntax => :proto3) do
11
- add_message "nuva.Disease" do
12
- optional :id, :string, 1
13
- optional :name, :string, 2
14
- optional :code, :uint32, 3
15
- repeated :codes, :message, 4, "nuva.Code"
16
- optional :vaccinable, :bool, 5
17
- optional :screenable, :bool, 6
18
- repeated :valence_ids, :string, 7
19
- optional :created_at, :message, 16, "google.protobuf.Timestamp"
20
- optional :updated_at, :message, 17, "google.protobuf.Timestamp"
21
- end
22
- end
23
- end
10
+
11
+ descriptor_data = "\n\rDisease.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\nCode.proto\"\xe9\x01\n\x07\x44isease\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\r\x12\x19\n\x05\x63odes\x18\x04 \x03(\x0b\x32\n.nuva.Code\x12\x12\n\nvaccinable\x18\x05 \x01(\x08\x12\x12\n\nscreenable\x18\x06 \x01(\x08\x12\x13\n\x0bvalence_ids\x18\x07 \x03(\t\x12.\n\ncreated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3"
12
+
13
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
14
+ pool.add_serialized_file(descriptor_data)
24
15
 
25
16
  module Nuva
26
17
  Disease = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nuva.Disease").msgclass
@@ -1,20 +1,14 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: InjectionMethod.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("InjectionMethod.proto", :syntax => :proto3) do
8
- add_enum "nuva.InjectionMethod" do
9
- value :UnspecifiedInjectionMethod, 0
10
- value :Intramuscular, 1
11
- value :Subcutaneous, 2
12
- value :Oral, 3
13
- value :Intranasal, 4
14
- value :Intradermal, 5
15
- end
16
- end
17
- end
7
+
8
+ descriptor_data = "\n\x15InjectionMethod.proto\x12\x04nuva*\x81\x01\n\x0fInjectionMethod\x12\x1e\n\x1aUnspecifiedInjectionMethod\x10\x00\x12\x11\n\rIntramuscular\x10\x01\x12\x10\n\x0cSubcutaneous\x10\x02\x12\x08\n\x04Oral\x10\x03\x12\x0e\n\nIntranasal\x10\x04\x12\x0f\n\x0bIntradermal\x10\x05\x42!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3"
9
+
10
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
+ pool.add_serialized_file(descriptor_data)
18
12
 
19
13
  module Nuva
20
14
  InjectionMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nuva.InjectionMethod").enummodule
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: NuvaDatabase.proto
3
4
 
@@ -9,18 +10,11 @@ require_relative 'Vaccine_pb'
9
10
  require_relative 'Disease_pb'
10
11
  require_relative 'Valence_pb'
11
12
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("NuvaDatabase.proto", :syntax => :proto3) do
14
- add_message "nuva.NuvaDatabase" do
15
- optional :version, :message, 1, "nuva.VersionInfo"
16
- optional :generated_at, :message, 2, "google.protobuf.Timestamp"
17
- optional :locale, :string, 3
18
- repeated :vaccines, :message, 4, "nuva.Vaccine"
19
- repeated :diseases, :message, 5, "nuva.Disease"
20
- repeated :valences, :message, 6, "nuva.Valence"
21
- end
22
- end
23
- end
13
+
14
+ descriptor_data = "\n\x12NuvaDatabase.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x11VersionInfo.proto\x1a\rVaccine.proto\x1a\rDisease.proto\x1a\rValence.proto\"\xd7\x01\n\x0cNuvaDatabase\x12\"\n\x07version\x18\x01 \x01(\x0b\x32\x11.nuva.VersionInfo\x12\x30\n\x0cgenerated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06locale\x18\x03 \x01(\t\x12\x1f\n\x08vaccines\x18\x04 \x03(\x0b\x32\r.nuva.Vaccine\x12\x1f\n\x08\x64iseases\x18\x05 \x03(\x0b\x32\r.nuva.Disease\x12\x1f\n\x08valences\x18\x06 \x03(\x0b\x32\r.nuva.ValenceB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3"
15
+
16
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
17
+ pool.add_serialized_file(descriptor_data)
24
18
 
25
19
  module Nuva
26
20
  NuvaDatabase = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nuva.NuvaDatabase").msgclass
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: Vaccine.proto
3
4
 
@@ -7,25 +8,11 @@ require 'google/protobuf/timestamp_pb'
7
8
  require_relative 'InjectionMethod_pb'
8
9
  require_relative 'Code_pb'
9
10
 
10
- Google::Protobuf::DescriptorPool.generated_pool.build do
11
- add_file("Vaccine.proto", :syntax => :proto3) do
12
- add_message "nuva.Vaccine" do
13
- optional :id, :string, 1
14
- optional :name, :string, 2
15
- optional :short_description, :string, 3
16
- optional :description, :string, 4
17
- repeated :injection_methods, :enum, 5, "nuva.InjectionMethod"
18
- optional :code, :uint32, 6
19
- repeated :codes, :message, 7, "nuva.Code"
20
- repeated :valence_ids, :string, 8
21
- repeated :other_names, :string, 9
22
- optional :generic, :bool, 10
23
- optional :replaced_by_id, :string, 11
24
- optional :created_at, :message, 16, "google.protobuf.Timestamp"
25
- optional :updated_at, :message, 17, "google.protobuf.Timestamp"
26
- end
27
- end
28
- end
11
+
12
+ descriptor_data = "\n\rVaccine.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15InjectionMethod.proto\x1a\nCode.proto\"\xe1\x02\n\x07Vaccine\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x19\n\x11short_description\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x30\n\x11injection_methods\x18\x05 \x03(\x0e\x32\x15.nuva.InjectionMethod\x12\x0c\n\x04\x63ode\x18\x06 \x01(\r\x12\x19\n\x05\x63odes\x18\x07 \x03(\x0b\x32\n.nuva.Code\x12\x13\n\x0bvalence_ids\x18\x08 \x03(\t\x12\x13\n\x0bother_names\x18\t \x03(\t\x12\x0f\n\x07generic\x18\n \x01(\x08\x12\x16\n\x0ereplaced_by_id\x18\x0b \x01(\t\x12.\n\ncreated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3"
13
+
14
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
15
+ pool.add_serialized_file(descriptor_data)
29
16
 
30
17
  module Nuva
31
18
  Vaccine = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nuva.Vaccine").msgclass
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: Valence.proto
3
4
 
@@ -5,23 +6,11 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/protobuf/timestamp_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("Valence.proto", :syntax => :proto3) do
10
- add_message "nuva.Valence" do
11
- optional :id, :string, 1
12
- optional :parent_id, :string, 2
13
- optional :code, :uint32, 3
14
- optional :name, :string, 4
15
- optional :abbreviation, :string, 5
16
- optional :translated_abbreviation, :string, 6
17
- repeated :disease_ids, :string, 7
18
- repeated :vaccine_ids, :string, 8
19
- optional :antigene_type, :string, 9
20
- optional :created_at, :message, 16, "google.protobuf.Timestamp"
21
- optional :updated_at, :message, 17, "google.protobuf.Timestamp"
22
- end
23
- end
24
- end
9
+
10
+ descriptor_data = "\n\rValence.proto\x12\x04nuva\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x02\n\x07Valence\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tparent_id\x18\x02 \x01(\t\x12\x0c\n\x04\x63ode\x18\x03 \x01(\r\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x14\n\x0c\x61\x62\x62reviation\x18\x05 \x01(\t\x12\x1f\n\x17translated_abbreviation\x18\x06 \x01(\t\x12\x13\n\x0b\x64isease_ids\x18\x07 \x03(\t\x12\x13\n\x0bvaccine_ids\x18\x08 \x03(\t\x12\x15\n\rantigene_type\x18\t \x01(\t\x12.\n\ncreated_at\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3"
11
+
12
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
13
+ pool.add_serialized_file(descriptor_data)
25
14
 
26
15
  module Nuva
27
16
  Valence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nuva.Valence").msgclass
@@ -1,17 +1,14 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: VersionInfo.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("VersionInfo.proto", :syntax => :proto3) do
8
- add_message "nuva.VersionInfo" do
9
- optional :major, :uint32, 1
10
- optional :minor, :uint32, 2
11
- optional :patch, :uint32, 3
12
- end
13
- end
14
- end
7
+
8
+ descriptor_data = "\n\x11VersionInfo.proto\x12\x04nuva\":\n\x0bVersionInfo\x12\r\n\x05major\x18\x01 \x01(\r\x12\r\n\x05minor\x18\x02 \x01(\r\x12\r\n\x05patch\x18\x03 \x01(\rB!\n\x0f\x63om.syadem.nuvaP\x01\xaa\x02\x0bSyadem.Nuvab\x06proto3"
9
+
10
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
+ pool.add_serialized_file(descriptor_data)
15
12
 
16
13
  module Nuva
17
14
  VersionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nuva.VersionInfo").msgclass
data/lib/nuva/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nuva
4
- VERSION = "0.5.2"
4
+ VERSION = "0.6.0"
5
5
  end
data/lib/nuva.rb CHANGED
@@ -62,19 +62,19 @@ module Nuva
62
62
  class << self
63
63
  DEFAULT_CDN_URI = URI("https://nuva.svc.edge.scw.cloud")
64
64
 
65
- def load(cdn_uri: DEFAULT_CDN_URI, lang: "en", hash: nil)
66
- init_http(cdn_uri) do |http|
65
+ def load(cdn_uri: DEFAULT_CDN_URI, lang: "en", hash: nil, proxy_addr: nil, proxy_port: nil)
66
+ init_http(cdn_uri, proxy_addr, proxy_port) do |http|
67
67
  # Fetch version manifest if necessary
68
- hash ||= fetch_latest_version_hash(http:)
68
+ hash ||= fetch_latest_version_hash(http:, proxy_addr:, proxy_port:)
69
69
 
70
70
  response = http.get("/proto/#{hash}_#{lang}.db")
71
71
  ::Nuva::Nuva.new(::Nuva::NuvaDatabase.decode(response.body))
72
72
  end
73
73
  end
74
74
 
75
- def fetch_latest_version_hash(cdn_uri: DEFAULT_CDN_URI, http: nil)
75
+ def fetch_latest_version_hash(cdn_uri: DEFAULT_CDN_URI, proxy_addr: nil, proxy_port: nil, http: nil)
76
76
  if http.nil?
77
- http = init_http(cdn_uri)
77
+ http = init_http(cdn_uri, proxy_addr, proxy_port)
78
78
  passed_http = false
79
79
  end
80
80
  response = http.get("/versions/last.json")
@@ -89,10 +89,12 @@ module Nuva
89
89
 
90
90
  private
91
91
 
92
- def init_http(cdn_uri, &block)
92
+ def init_http(cdn_uri, proxy_addr, proxy_port, &block)
93
93
  Net::HTTP.start(
94
94
  cdn_uri.host,
95
95
  cdn_uri.port,
96
+ proxy_addr,
97
+ proxy_port&.to_i,
96
98
  use_ssl: cdn_uri.scheme == "https",
97
99
  &block
98
100
  )
data/nuva.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_dependency 'google-protobuf', '~> 3.25', '>= 3.25.5'
32
+ spec.add_dependency 'google-protobuf', '>= 4.35.1', '< 5'
33
33
  spec.add_dependency 'fuzzy_match', '~> 2.1'
34
34
 
35
35
  # For more information and examples about making a new gem, check out our
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nuva
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Syadem
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-12 00:00:00.000000000 Z
11
+ date: 2026-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '3.25'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
- version: 3.25.5
19
+ version: 4.35.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '3.25'
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
- version: 3.25.5
29
+ version: 4.35.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: fuzzy_match
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  - !ruby/object:Gem::Version
94
94
  version: '0'
95
95
  requirements: []
96
- rubygems_version: 3.5.3
96
+ rubygems_version: 3.3.7
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: NUVA