redu-sandbox-sdk 0.1.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 +7 -0
- data/LICENSE +202 -0
- data/README.md +82 -0
- data/docs/reference.md +865 -0
- data/lib/redu_sandbox/audit.rb +525 -0
- data/lib/redu_sandbox/client.rb +59 -0
- data/lib/redu_sandbox/errors.rb +230 -0
- data/lib/redu_sandbox/http.rb +326 -0
- data/lib/redu_sandbox/sandboxes.rb +1947 -0
- data/lib/redu_sandbox/types.rb +1154 -0
- data/lib/redu_sandbox/version.rb +5 -0
- data/lib/redu_sandbox.rb +23 -0
- data/redu-sandbox-sdk.gemspec +27 -0
- metadata +63 -0
data/lib/redu_sandbox.rb
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# A Ruby client for the redu.cloud API: sandboxes, isolated machines started from a template, for running commands.
|
|
4
|
+
#
|
|
5
|
+
# require "redu_sandbox"
|
|
6
|
+
# redu = ReduSandbox::Client.new # the API key from REDU_API_KEY
|
|
7
|
+
# sandbox = redu.sandboxes.create("ubuntu-node")
|
|
8
|
+
# puts redu.sandboxes.exec(sandbox.id, "node -v").stdout
|
|
9
|
+
# redu.sandboxes.delete(sandbox.id)
|
|
10
|
+
module ReduSandbox
|
|
11
|
+
# A client: ReduSandbox.new(...) is ReduSandbox::Client.new(...).
|
|
12
|
+
def self.new(**options)
|
|
13
|
+
Client.new(**options)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
require_relative "redu_sandbox/version"
|
|
18
|
+
require_relative "redu_sandbox/errors"
|
|
19
|
+
require_relative "redu_sandbox/types"
|
|
20
|
+
require_relative "redu_sandbox/audit"
|
|
21
|
+
require_relative "redu_sandbox/http"
|
|
22
|
+
require_relative "redu_sandbox/sandboxes"
|
|
23
|
+
require_relative "redu_sandbox/client"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/redu_sandbox/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "redu-sandbox-sdk"
|
|
7
|
+
spec.version = ReduSandbox::VERSION
|
|
8
|
+
spec.summary = "A Ruby client for the redu.cloud API: sandboxes."
|
|
9
|
+
spec.description = "Create sandboxes on redu.cloud, run commands in them, read and write their files, follow " \
|
|
10
|
+
"background commands, give them public names, snapshot, fork and resize them, limit and read " \
|
|
11
|
+
"their outbound connections, and read and check their audit log, with the same retry rules as " \
|
|
12
|
+
"redu's Python, TypeScript and Go SDKs. Standard library only."
|
|
13
|
+
spec.authors = ["redu.cloud"]
|
|
14
|
+
spec.homepage = "https://redu.cloud"
|
|
15
|
+
spec.license = "Apache-2.0"
|
|
16
|
+
spec.required_ruby_version = ">= 3.2"
|
|
17
|
+
|
|
18
|
+
spec.files = Dir.chdir(__dir__) { Dir["lib/**/*.rb"].sort + %w[LICENSE README.md docs/reference.md redu-sandbox-sdk.gemspec] }
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
|
|
21
|
+
spec.metadata["homepage_uri"] = "https://redu.cloud"
|
|
22
|
+
spec.metadata["source_code_uri"] = "https://github.com/redu-cloud/redu-sandbox-sdk-ruby"
|
|
23
|
+
spec.metadata["documentation_uri"] = "https://docs.redu.cloud/Services/sandboxes"
|
|
24
|
+
# gem push sends it to RubyGems only, and only from an account with multi-factor authentication
|
|
25
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
26
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
|
27
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: redu-sandbox-sdk
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- redu.cloud
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-12-06 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Create sandboxes on redu.cloud, run commands in them, read and write
|
|
14
|
+
their files, follow background commands, give them public names, snapshot, fork
|
|
15
|
+
and resize them, limit and read their outbound connections, and read and check their
|
|
16
|
+
audit log, with the same retry rules as redu's Python, TypeScript and Go SDKs. Standard
|
|
17
|
+
library only.
|
|
18
|
+
email:
|
|
19
|
+
executables: []
|
|
20
|
+
extensions: []
|
|
21
|
+
extra_rdoc_files: []
|
|
22
|
+
files:
|
|
23
|
+
- LICENSE
|
|
24
|
+
- README.md
|
|
25
|
+
- docs/reference.md
|
|
26
|
+
- lib/redu_sandbox.rb
|
|
27
|
+
- lib/redu_sandbox/audit.rb
|
|
28
|
+
- lib/redu_sandbox/client.rb
|
|
29
|
+
- lib/redu_sandbox/errors.rb
|
|
30
|
+
- lib/redu_sandbox/http.rb
|
|
31
|
+
- lib/redu_sandbox/sandboxes.rb
|
|
32
|
+
- lib/redu_sandbox/types.rb
|
|
33
|
+
- lib/redu_sandbox/version.rb
|
|
34
|
+
- redu-sandbox-sdk.gemspec
|
|
35
|
+
homepage: https://redu.cloud
|
|
36
|
+
licenses:
|
|
37
|
+
- Apache-2.0
|
|
38
|
+
metadata:
|
|
39
|
+
homepage_uri: https://redu.cloud
|
|
40
|
+
source_code_uri: https://github.com/redu-cloud/redu-sandbox-sdk-ruby
|
|
41
|
+
documentation_uri: https://docs.redu.cloud/Services/sandboxes
|
|
42
|
+
allowed_push_host: https://rubygems.org
|
|
43
|
+
rubygems_mfa_required: 'true'
|
|
44
|
+
post_install_message:
|
|
45
|
+
rdoc_options: []
|
|
46
|
+
require_paths:
|
|
47
|
+
- lib
|
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - ">="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '3.2'
|
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
|
+
requirements:
|
|
55
|
+
- - ">="
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: '0'
|
|
58
|
+
requirements: []
|
|
59
|
+
rubygems_version: 3.4.20
|
|
60
|
+
signing_key:
|
|
61
|
+
specification_version: 4
|
|
62
|
+
summary: 'A Ruby client for the redu.cloud API: sandboxes.'
|
|
63
|
+
test_files: []
|