oursprivacy-ingest 0.1.0 → 0.2.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: 41ef36fd58f410f233795cceb4b6cd9ebfd7a18585b59656a4d1ff4d7c753e30
4
- data.tar.gz: c3e1e66977cdc2e732f223b3f1f7fe85e87bf6e4f9f90e102bc17176fec01e40
3
+ metadata.gz: e29d953b7f51d8c1d0b15f99c03827a17ab5bb671fc8b637d63d598c916fdd02
4
+ data.tar.gz: 5fefefc85727ce3285123c89a616a504b21d748e545349cf34f51ea93f79ac9d
5
5
  SHA512:
6
- metadata.gz: c3221a7422a9fd146115026f934cc952e3f343f342ba124bd5552698d57c262af1b91238c552380584948f64e30f26a65e46585e053e8f4bd0f7a68667c1eea0
7
- data.tar.gz: f56fcfae01fb65dd3449a859ff9b008856c770818e268db9b4eb623b59af50f2a3660dafaae3afc455be55b3e9bb281b96498ca9bd306cd604e6ff3b41b1163b
6
+ metadata.gz: 94d807d33f1e40b63ecd0b9a030efd975347c217bf77946b688e704253805768afc40dd1856a6a14b22f6c7c89b396671c5808dbc68b5b8d000d3bf6236bd39a
7
+ data.tar.gz: a99ce17810aedc5983a837495944551c8552ecb377a172f6a50e0659968ebd6011035a9a3d49030c1a1b2cffa9255ab81f1be0f1afd7a3c617b7fd917139ccdf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 (2025-11-19)
4
+
5
+ Full Changelog: [v0.1.1...v0.2.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v0.1.1...v0.2.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([bb46f5a](https://github.com/with-ours/ingest-sdk-ruby/commit/bb46f5a6c89dfa233f3957d6f90726d1e2419346))
10
+
11
+ ## 0.1.1 (2025-11-05)
12
+
13
+ Full Changelog: [v0.1.0...v0.1.1](https://github.com/with-ours/ingest-sdk-ruby/compare/v0.1.0...v0.1.1)
14
+
15
+ ### Bug Fixes
16
+
17
+ * better thread safety via early initializing SSL store during HTTP client creation ([79ddf73](https://github.com/with-ours/ingest-sdk-ruby/commit/79ddf73cd5777c353993c04da8e12db82dc182c2))
18
+
3
19
  ## 0.1.0 (2025-11-04)
4
20
 
5
21
  Full Changelog: [v0.0.1...v0.1.0](https://github.com/with-ours/ingest-sdk-ruby/compare/v0.0.1...v0.1.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "oursprivacy-ingest", "~> 0.1.0"
20
+ gem "oursprivacy-ingest", "~> 0.2.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -16,10 +16,11 @@ module OursprivacyIngest
16
16
  class << self
17
17
  # @api private
18
18
  #
19
+ # @param cert_store [OpenSSL::X509::Store]
19
20
  # @param url [URI::Generic]
20
21
  #
21
22
  # @return [Net::HTTP]
22
- def connect(url)
23
+ def connect(cert_store:, url:)
23
24
  port =
24
25
  case [url.port, url.scheme]
25
26
  in [Integer, _]
@@ -33,6 +34,8 @@ module OursprivacyIngest
33
34
  Net::HTTP.new(url.host, port).tap do
34
35
  _1.use_ssl = %w[https wss].include?(url.scheme)
35
36
  _1.max_retries = 0
37
+
38
+ (_1.cert_store = cert_store) if _1.use_ssl?
36
39
  end
37
40
  end
38
41
 
@@ -102,7 +105,7 @@ module OursprivacyIngest
102
105
  pool =
103
106
  @mutex.synchronize do
104
107
  @pools[origin] ||= ConnectionPool.new(size: @size) do
105
- self.class.connect(url)
108
+ self.class.connect(cert_store: @cert_store, url: url)
106
109
  end
107
110
  end
108
111
 
@@ -192,6 +195,7 @@ module OursprivacyIngest
192
195
  def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS)
193
196
  @mutex = Mutex.new
194
197
  @size = size
198
+ @cert_store = OpenSSL::X509::Store.new.tap(&:set_default_paths)
195
199
  @pools = {}
196
200
  end
197
201
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OursprivacyIngest
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -9,6 +9,7 @@ require "erb"
9
9
  require "etc"
10
10
  require "json"
11
11
  require "net/http"
12
+ require "openssl"
12
13
  require "pathname"
13
14
  require "rbconfig"
14
15
  require "securerandom"
data/manifest.yaml CHANGED
@@ -6,6 +6,7 @@ dependencies:
6
6
  - etc
7
7
  - json
8
8
  - net/http
9
+ - openssl
9
10
  - pathname
10
11
  - rbconfig
11
12
  - securerandom
@@ -26,8 +26,12 @@ module OursprivacyIngest
26
26
 
27
27
  class << self
28
28
  # @api private
29
- sig { params(url: URI::Generic).returns(Net::HTTP) }
30
- def connect(url)
29
+ sig do
30
+ params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns(
31
+ Net::HTTP
32
+ )
33
+ end
34
+ def connect(cert_store:, url:)
31
35
  end
32
36
 
33
37
  # @api private
@@ -17,7 +17,10 @@ module OursprivacyIngest
17
17
 
18
18
  DEFAULT_MAX_CONNECTIONS: Integer
19
19
 
20
- def self.connect: (URI::Generic url) -> top
20
+ def self.connect: (
21
+ cert_store: OpenSSL::X509::Store,
22
+ url: URI::Generic
23
+ ) -> top
21
24
 
22
25
  def self.calibrate_socket_timeout: (top conn, Float deadline) -> void
23
26
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oursprivacy-ingest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ours Privacy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-04 00:00:00.000000000 Z
11
+ date: 2025-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool