e2b 0.4.0 → 0.4.1

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: de314846f6be2ed8ccdf8580b37039dddd366c55eaa2e1034a998008386d1ca5
4
- data.tar.gz: 723097c4475eaae0782b5a18b6728fe0ca97abf12db42a452de5479f9da315a6
3
+ metadata.gz: aed6247bb2a2574a54bf122fc012b545544d09480603f95ce82955aa01f8af4f
4
+ data.tar.gz: ad883cd0f0f95653ec413971ce49ccb291f5d1e8f91227166bf3cbf5fdbe4624
5
5
  SHA512:
6
- metadata.gz: 2bd3e91e6045b60a328f01a8c4ff3463eb9fec6595c75d02f5b20f062aae9d41a83e3427195f43618420efcb588eb012b2ae4d86c22241572a3fae6d110cfeaf
7
- data.tar.gz: 03201a52726872f3db485fa601d14a31b43f5ac85599a06c8403ddfd653e7d63a7ba080aef4cd0df3ca2efecfca6b46ffedd433105764e8023ab49d99bbe4293
6
+ metadata.gz: fec67dfcd0f0e416dfe836c5a98d19be3049766a122522df8aeb9709fa036b7ca8d5aae466250553c32aacea227e976f63a3535a22475dee716316caac4bacc8
7
+ data.tar.gz: 7c07977b43ce98bfac3267b1f4e25a2627b2caa2d1c632f43f115837b80c51c1d09e3f21d4ea747131e87e88be9433b19cb720aed3c093103e2f0d398479c9c7
data/lib/e2b/template.rb CHANGED
@@ -273,7 +273,15 @@ module E2B
273
273
  def upload_file(template, file_name:, url:, resolve_symlinks:, source_location: nil)
274
274
  tarball = build_tar_archive(template, file_name, resolve_symlinks: resolve_symlinks)
275
275
  response = Faraday.put(url) do |req|
276
- req.headers["Content-Type"] = "application/octet-stream"
276
+ # E2B returns a GCS V2 signed URL whose StringToSign carries
277
+ # an *empty* Content-Type. The signed value must match the
278
+ # value we send, so we set it explicitly to "" — neither
279
+ # "application/octet-stream" (signature mismatch on the
280
+ # signed Content-Type line) nor omitting the header (Faraday
281
+ # then defaults to "application/x-www-form-urlencoded",
282
+ # same mismatch). GCS returns 403 SignatureDoesNotMatch in
283
+ # both other cases.
284
+ req.headers["Content-Type"] = ""
277
285
  req.body = tarball
278
286
  end
279
287
 
data/lib/e2b/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module E2B
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e2b
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tao Luo
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-05-10 00:00:00.000000000 Z
10
+ date: 2026-05-29 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64