dataleon 0.1.0.pre.alpha.20 → 0.1.0.pre.alpha.22

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: 81141097eab4dfaa95c9c9085154e3bdd91d4a5a432588537391127039119c87
4
- data.tar.gz: be2a5dd97b09c3b646fbcf804d4ee4c2b1207ae21e2f9d19aee2d7635e489e94
3
+ metadata.gz: d7a8afdfec4e2878c3f8d216cda288572bf90ba201fd64dd49e76c58663f809e
4
+ data.tar.gz: a5c2ea59dc0d6bed2bf1ccd0747977a40592c5c6d0d0333b114274cc444cd90f
5
5
  SHA512:
6
- metadata.gz: ca0e5a3bb386f9862de046afe0202fafaaffdd812fd69458cd31d4acce22e26be049a5f35fd2324d41ab1a8ab0b7f50a80da1ca0e556c99da007c38354a7b706
7
- data.tar.gz: 02e182a8cf70914daf01788651a9ff0add8d0fe9e545c4d3a2eff44f8b7034d45dddc9f0d60dd2bd2dc95f9c10f5a95cdd8917b3b9bc47dc5e929a38c4d61929
6
+ metadata.gz: e476aafce035d46aeb5b318ef6c9f183635e9bbdf0ad7e9b08a110c93db0b506cab649375ea6ee4ddb63eebc05b59aa6f289eb70a39bb1b6a23c4b1ed5b4d6ff
7
+ data.tar.gz: 24d15db191c33197096dd54560d7ad4ffdf01cb6b6975fa9a9852693c436c1e7b0db13e2ee092cae66497e5051de8cc7f3f798fbb36d9b0db964604267a036cf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.22 (2026-04-28)
4
+
5
+ Full Changelog: [v0.1.0-alpha.21...v0.1.0-alpha.22](https://github.com/dataleonlabs/dataleon-ruby/compare/v0.1.0-alpha.21...v0.1.0-alpha.22)
6
+
7
+ ### Features
8
+
9
+ * support setting headers via env ([bf273be](https://github.com/dataleonlabs/dataleon-ruby/commit/bf273beb46fe4edee544de865c22311dbdfadf99))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** more robust bootstrap script ([4538fac](https://github.com/dataleonlabs/dataleon-ruby/commit/4538fac681a449b367bb2234fdba97abf671e62d))
15
+
16
+ ## 0.1.0-alpha.21 (2026-04-09)
17
+
18
+ Full Changelog: [v0.1.0-alpha.20...v0.1.0-alpha.21](https://github.com/dataleonlabs/dataleon-ruby/compare/v0.1.0-alpha.20...v0.1.0-alpha.21)
19
+
20
+ ### Bug Fixes
21
+
22
+ * multipart encoding for file arrays ([f892fea](https://github.com/dataleonlabs/dataleon-ruby/commit/f892fea3ac349b35c3b094395afbda1889c758a4))
23
+
3
24
  ## 0.1.0-alpha.20 (2026-04-01)
4
25
 
5
26
  Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/dataleonlabs/dataleon-ruby/compare/v0.1.0-alpha.19...v0.1.0-alpha.20)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "dataleon", "~> 0.1.0.pre.alpha.20"
29
+ gem "dataleon", "~> 0.1.0.pre.alpha.22"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -63,6 +63,19 @@ module Dataleon
63
63
  raise ArgumentError.new("api_key is required, and can be set via environ: \"DATALEON_API_KEY\"")
64
64
  end
65
65
 
66
+ headers = {}
67
+ custom_headers_env = ENV["DATALEON_CUSTOM_HEADERS"]
68
+ unless custom_headers_env.nil?
69
+ parsed = {}
70
+ custom_headers_env.split("\n").each do |line|
71
+ colon = line.index(":")
72
+ unless colon.nil?
73
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
74
+ end
75
+ end
76
+ headers = parsed.merge(headers)
77
+ end
78
+
66
79
  @api_key = api_key.to_s
67
80
 
68
81
  super(
@@ -70,7 +83,8 @@ module Dataleon
70
83
  timeout: timeout,
71
84
  max_retries: max_retries,
72
85
  initial_retry_delay: initial_retry_delay,
73
- max_retry_delay: max_retry_delay
86
+ max_retry_delay: max_retry_delay,
87
+ headers: headers
74
88
  )
75
89
 
76
90
  @individuals = Dataleon::Resources::Individuals.new(client: self)
@@ -610,6 +610,7 @@ module Dataleon
610
610
  #
611
611
  # @return [Array(String, Enumerable<String>)]
612
612
  private def encode_multipart_streaming(body)
613
+ # rubocop:disable Style/CaseEquality
613
614
  # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
614
615
  boundary = SecureRandom.urlsafe_base64(46)
615
616
 
@@ -619,7 +620,7 @@ module Dataleon
619
620
  in Hash
620
621
  body.each do |key, val|
621
622
  case val
622
- in Array if val.all? { primitive?(_1) }
623
+ in Array if val.all? { primitive?(_1) || Dataleon::Internal::Type::FileInput === _1 }
623
624
  val.each do |v|
624
625
  write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
625
626
  end
@@ -635,6 +636,7 @@ module Dataleon
635
636
 
636
637
  fused_io = fused_enum(strio) { closing.each(&:call) }
637
638
  [boundary, fused_io]
639
+ # rubocop:enable Style/CaseEquality
638
640
  end
639
641
 
640
642
  # @api private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dataleon
4
- VERSION = "0.1.0.pre.alpha.20"
4
+ VERSION = "0.1.0.pre.alpha.22"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dataleon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.20
4
+ version: 0.1.0.pre.alpha.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dataleon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-01 00:00:00.000000000 Z
11
+ date: 2026-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi