-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
38 lines (31 loc) · 767 Bytes
/
Rakefile
File metadata and controls
38 lines (31 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# frozen_string_literal: true
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "rubocop/rake_task"
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new
task default: %i[spec rubocop]
desc "Run examples (requires E2B_API_KEY)"
task :examples do
Dir["examples/*.rb"].each do |example|
puts "\n" + ("=" * 60)
puts "Running: #{example}"
puts "=" * 60
system("ruby #{example}")
end
end
desc "Start an interactive console with E2B loaded"
task :console do
require "irb"
require_relative "lib/e2b"
if ENV["E2B_API_KEY"]
E2B.configure do |config|
config.api_key = ENV["E2B_API_KEY"]
end
puts "E2B configured with API key"
else
puts "Warning: E2B_API_KEY not set"
end
ARGV.clear
IRB.start
end