e2b 0.3.2 → 0.3.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: ae958d79e7fb00debc2a5ea2690aeb1678e0d5ae5dad95d5db7b38a469da943c
4
- data.tar.gz: d749554ef9cab965bd0711b010df41690c568e9992d22ae4bee0ac7377f8b95e
3
+ metadata.gz: 0fa9c1779eddd80d88939182c59ed84697bbcd75af38bacc61ea2272dee24b45
4
+ data.tar.gz: 547824e29330fb45199e9cd4b3ccb4ebc388edb92a39ebabd32a229a4db49300
5
5
  SHA512:
6
- metadata.gz: ac6c3ec8f071cf7abadaf0750daa7900c7909edda3932b755523e82ad9d06e7dba7afb3f211b0f64ad928d52f3f7e7cacaf21244b32c52d3fb05c64683d7d4ef
7
- data.tar.gz: a38f523b38adc6799fcca5bdeaf51efa4f29dc31ba0e3a56a2a9d817f727f974dc93ba417d6fa89129a5819f5377b6943b72d1a16c948b1ece1375dcc4aa035a
6
+ metadata.gz: f05cba4db6cf6273d4ae2caf5e9f47755adea8059af6617cdb87b316d7b0a29fef87c8cfc32db9ed04d657f16d3876e6c4da274a26f05026fcb4187d5cd4632c
7
+ data.tar.gz: 2f010ab757dec6053bf033e472f817b3fddfa5e22f2fc6e8180e2bca6eb70241f2a22dc520662e947c941d3634c76b3dc893f20caa6f58d9f36a6e8aa54fccf0
data/lib/e2b/template.rb CHANGED
@@ -134,7 +134,8 @@ module E2B
134
134
  end
135
135
  end
136
136
 
137
- def build(template, name: nil, alias_name: nil, tags: nil, cpu_count: 2, memory_mb: 1024, skip_cache: false,
137
+ def build(template, name: nil, alias_name: nil, tags: nil, cpu_count: 2, memory_mb: 1024,
138
+ disk_size_mb: nil, skip_cache: false,
138
139
  on_build_logs: nil, api_key: nil, access_token: nil, domain: nil, **opts)
139
140
  on_build_logs&.call(Models::TemplateLogEntryStart.new(timestamp: Time.now, message: "Build started"))
140
141
 
@@ -145,6 +146,7 @@ module E2B
145
146
  tags: tags,
146
147
  cpu_count: cpu_count,
147
148
  memory_mb: memory_mb,
149
+ disk_size_mb: disk_size_mb,
148
150
  skip_cache: skip_cache,
149
151
  on_build_logs: on_build_logs,
150
152
  api_key: api_key,
@@ -168,7 +170,8 @@ module E2B
168
170
  end
169
171
 
170
172
  def build_in_background(template, name: nil, alias_name: nil, tags: nil, cpu_count: 2, memory_mb: 1024,
171
- skip_cache: false, on_build_logs: nil, api_key: nil, access_token: nil, domain: nil, **opts)
173
+ disk_size_mb: nil, skip_cache: false, on_build_logs: nil,
174
+ api_key: nil, access_token: nil, domain: nil, **opts)
172
175
  alias_name ||= opts[:alias] || opts["alias"]
173
176
  resolved_name = normalize_build_name(name: name, alias_name: alias_name)
174
177
  template.send(:force_build!) if skip_cache
@@ -179,12 +182,14 @@ module E2B
179
182
  tags_message = Array(tags).any? ? " with tags #{Array(tags).join(', ')}" : ""
180
183
  on_build_logs&.call(log_entry("Requesting build for template: #{resolved_name}#{tags_message}"))
181
184
 
182
- create_response = http_client.post("/v3/templates", body: {
185
+ body = {
183
186
  name: resolved_name,
184
187
  tags: tags,
185
188
  cpuCount: cpu_count,
186
189
  memoryMB: memory_mb
187
- })
190
+ }
191
+ body[:diskSizeMB] = disk_size_mb if disk_size_mb
192
+ create_response = http_client.post("/v3/templates", body: body)
188
193
 
189
194
  build_info = Models::BuildInfo.new(
190
195
  alias_name: resolved_name,
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.3.2"
4
+ VERSION = "0.3.3"
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.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tao Luo
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-04-30 00:00:00.000000000 Z
10
+ date: 2026-05-05 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: faraday