nuva 0.5.2 → 0.5.3

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: fe91383d7e0c81898cb75be27f6fe7f1ea9f02a5b69b3d7f298798a2066a788d
4
+ data.tar.gz: beddb4ec017c5626e1c98e11a1ad91303d35341b34bb714b690bdbf3c487a672
5
5
  SHA512:
6
- metadata.gz: 2591d93c4dec3b775eb61c5f19197520cda3a503d894c56adfc2dcffb8135c92b0cbd5e5c3b057cbabb83a984d3ae455000fe6c71398afab6269262fad105cc6
7
- data.tar.gz: ecce6537ef36080c174e31983c8bee7f56157beaf3366ceb5ab629a345cdabd0bb93c41dbd4b88f750a706db715efa3317816c2226631cae339d7b2540f6a1fc
6
+ metadata.gz: d9ccc1e539c24c42900e7be069a50f3f2e6a2c8c5c34b7e34f764643172a6364ad302581b2c77421c9af8ba1b192c45b3b07c7b90f2365d0f9b5284054b0cc7d
7
+ data.tar.gz: 8e49e409a0347ab9b0023d8decd8ceb95b7b64f77dfff17f9c0ba4a119eefd4da9270856fed1e34e6be6e4b306c951b51c05ded9f6c4af0c60933e114a40a37f
data/Changelog.md CHANGED
@@ -5,6 +5,12 @@ 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.5.3] - 2026-02-23
9
+
10
+ ### Changed
11
+
12
+ - Handle proxy params
13
+
8
14
  ## [0.5.2] - 2025-03-12
9
15
 
10
16
  ### Fixed
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.5.3"
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
  )
metadata CHANGED
@@ -1,14 +1,14 @@
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.5.3
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-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf