dagger_ruby 0.7.0 → 0.10.0

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: b40c8d40fe3d5a0e8ee5aa6c8ca2b5e48f564117b03f9d11d482cd9fd47452ab
4
- data.tar.gz: 020ed088da44bb8f8ca16316491d15b32de2d654ddc6cf67941d482b9a0c72e6
3
+ metadata.gz: 4a4bcab9db019b25e782aab84ab1e3b154bda15f64cb7d1ffdd522d14cbfb729
4
+ data.tar.gz: 41e902336fe58545784c21e85a17cc55961a9aab6ad2c6370547ffb4d4779eb5
5
5
  SHA512:
6
- metadata.gz: 855d15fd372059950028407385935085961a9f0488e1f38d8162253a1143caae51e0c2ac97a8ee913f7e2e38ad89dcdd49f6c766413c20741922117cc4c8c24d
7
- data.tar.gz: b14cb681341a1b2db7c8c045658a16f1928c93049bb532afd393bc707e50c08a2f58e796d8a9636cb8741c55f3ecc4b51b262d21244067d9bc8be7565c164521
6
+ metadata.gz: 897cdcb244f34e704a70f2bb47fdeadeb946c2c29e0fff763cf0b487122657a11d2bee3d664593c0b268baf45eba0cbf9b8da1e889eb601e1f4ad6ed7056e1b2
7
+ data.tar.gz: c52a3cfff5a10a1ef6c8bc1e522c56bf423642dbfbc57bcc76c03e84a61e31e8f346a8157bffb53e112d2a77cdfd044b6d4c562784f9afa785f0460d02f98864
data/CHANGELOG.md CHANGED
@@ -1,126 +1,87 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ All notable changes are recorded here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and versions follow
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
6
 
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+ ## [Unreleased]
7
8
 
8
- ## [0.7.0] - 2025-01-27
9
+ ## [0.10.0] - 2026-08-25
9
10
 
10
- ### Fixed
11
+ ### Added
11
12
 
12
- - **Code Quality**: Refactored `DaggerRuby.connection` method to reduce cyclomatic complexity from 13 to under 12 and perceived complexity from 15 to under 12
13
- - **Code Quality**: Simplified `Config#initialize` method by replacing 6 individual keyword parameters with a single hash parameter
14
- - **Tests**: Fixed test assertion in `test_with_directory_mounts_directory` to align with Dagger API - changed from `"directory"` to `"source"` key in `withDirectory` operation arguments
15
- - **Environment Variables**: Improved environment variable handling using `ENV.fetch` for more consistent nil handling
13
+ - Explicit Apple Container and Docker runner selection.
14
+ - Compatible Dagger CLI and engine verification before standalone sessions.
15
+ - Container default-argument, Docker healthcheck, and host image-store export APIs.
16
16
 
17
17
  ### Changed
18
18
 
19
- - **Config Constructor**: `DaggerRuby::Config.new` now accepts a hash of options instead of individual keyword arguments
20
- - Old: `Config.new(log_output: $stdout, workdir: "/tmp", timeout: 300)`
21
- - New: `Config.new(log_output: $stdout, workdir: "/tmp", timeout: 300)` (same syntax, but internally uses hash)
19
+ - Support Ruby 3.2 and newer so Ruby applications do not need Ruby 4 solely to
20
+ use the Dagger client.
22
21
 
23
- ### Technical Details
22
+ ## [0.9.0] - 2026-08-20
24
23
 
25
- - Broke down complex `connection` method into focused helper methods: `existing_session?`, `handle_existing_session`, `start_new_session`, `build_dagger_command`, `build_ruby_command`, `build_dagger_options`
26
- - Maintained backward compatibility - all existing code continues to work without changes
27
- - All tests pass with improved code structure and maintainability
24
+ ### Added
28
25
 
29
- ## [0.6.0] - 2025-09-17
26
+ - Engine-backed compatibility tests for Dagger 0.21.8.
27
+ - Trusted publishing through RubyGems and GitHub Actions.
28
+ - Security, contribution, and community documentation.
30
29
 
31
- Programmatic Control:
30
+ ### Changed
32
31
 
33
- config = DaggerRuby::Config.new(
34
- engine_log_level: "error", # Only errors
35
- progress: "plain" # Clean progress format
36
- )
37
- DaggerRuby.connection(config) do |client|
38
- # Your operations with clean output
39
- end
32
+ - Require Ruby 4.0 or newer.
33
+ - Align container, directory, file, Git, host, secret, cache, and service queries
34
+ with the Dagger 0.21.8 GraphQL schema.
35
+ - Update runtime and development dependencies.
36
+ - Present the project as a community-maintained client with an explicit
37
+ compatibility policy.
40
38
 
41
- 📋 Progress Options:
39
+ ### Fixed
42
40
 
43
- - plain - Simple text progress (no fancy symbols like ▶ ●)
44
- - dots - Just dots for progress
45
- - tty - Full fancy output (default)
46
- - auto - Auto-detect based on terminal
41
+ - Preserve the value returned by `DaggerRuby.connection` blocks.
42
+ - Forward script names and arguments to `dagger run` without shell interpolation.
43
+ - Escape GraphQL strings and select nested fields consistently.
47
44
 
48
- 🎯 What This Eliminates:
45
+ ## [0.8.0] - 2025-01-27
49
46
 
50
- - All the ▶ connect, ● container: symbols
51
- - Timing information like 0.7s, 3.6s CACHED
52
- - Complex tree-style progress display
47
+ ### Changed
53
48
 
54
- ## [0.4.0] - 2025-09-17
49
+ - Simplified internal configuration initialization while keeping its public call
50
+ shape compatible.
55
51
 
56
- 1. Environment Variable (Easiest)
52
+ ### Fixed
57
53
 
58
- export DAGGER_LOG_LEVEL=error # Only show errors
59
- # or
60
- DAGGER_LOG_LEVEL=warn your_ruby_script.rb # Only warnings and errors
54
+ - Corrected `withDirectory` query arguments.
61
55
 
62
- 2. Programmatic Configuration
56
+ ## [0.6.0] - 2025-01-17
63
57
 
64
- config = DaggerRuby::Config.new(engine_log_level: "error")
65
- DaggerRuby.connection(config) do |client|
66
- # Your dagger operations with minimal logging
67
- end
58
+ ### Added
68
59
 
69
- 3. Available Log Levels (from most to least verbose):
60
+ - Progress and engine-log configuration.
70
61
 
71
- - trace - Everything (most verbose)
72
- - debug - Default Dagger behavior
73
- - info - Informational messages
74
- - warn - Warnings and errors (new default)
75
- - error - Only errors (cleanest output)
62
+ ## [0.4.0] - 2024-12-19
76
63
 
77
- What Changed:
64
+ ### Added
78
65
 
79
- - Added engine_log_level to Config class (lib/dagger_ruby/config.rb:5)
80
- - Modified dagger run command to pass --log-level flag (lib/dagger_ruby.rb:35-38)
81
- - Environment variable DAGGER_LOG_LEVEL support
82
- - Tests updated and passing
66
+ - Dagger log-level configuration.
83
67
 
84
68
  ## [0.3.0] - 2024-12-19
85
69
 
86
- ### Fixed
70
+ ### Fixed
87
71
 
88
- - Removed unwanted Gemfile dependencies
89
- - Rubocop
72
+ - Dependency and lint configuration.
90
73
 
91
74
  ## [0.1.0] - 2024-12-19
92
75
 
93
76
  ### Added
94
- - Complete Dagger Ruby SDK with full API coverage
95
- - Smart connection handling that auto-detects Dagger sessions
96
- - Container operations (from, with_exec, with_directory, with_mounted_cache, etc.)
97
- - Directory and file operations with proper GraphQL query generation
98
- - Cache volume management for build optimization
99
- - Secret management and mounting
100
- - HTTP GraphQL client with session token authentication
101
- - Lazy execution with method chaining
102
- - Comprehensive test suite (72 tests, 119 assertions, 0 failures)
103
- - Working examples with dummy applications
104
- - Integration with BoringBuildRuby for Rails application builds
105
-
106
- ### Features
107
- - **Client**: GraphQL client with automatic session detection
108
- - **Container**: Full container lifecycle management and operations
109
- - **Directory**: File system operations and directory manipulation
110
- - **File**: File reading, writing, and export operations
111
- - **Cache Volume**: Build caching for faster rebuilds
112
- - **Secret**: Secure secret injection and mounting
113
- - **Query Builder**: Optimized GraphQL query generation
114
- - **Error Handling**: Comprehensive error types and messages
115
-
116
- ### Examples
117
- - Simple Ruby application build with caching
118
- - Rails CI/CD pipeline with multi-environment support
119
- - BoringBuildRuby integration for optimized Rails builds
120
- - Cowsay demonstration of basic operations
121
-
122
- ### Performance
123
- - Lazy evaluation prevents unnecessary API calls
124
- - Cache volumes provide 50-80% faster rebuilds
125
- - Optimized GraphQL query generation
126
- - HTTP connection reuse and pooling
77
+
78
+ - Initial container, directory, file, cache, secret, Git, and GraphQL client.
79
+
80
+ [Unreleased]: https://github.com/boringcache/dagger_ruby/compare/v0.10.0...HEAD
81
+ [0.10.0]: https://github.com/boringcache/dagger_ruby/compare/v0.9.0...v0.10.0
82
+ [0.9.0]: https://github.com/boringcache/dagger_ruby/compare/v0.8.0...v0.9.0
83
+ [0.8.0]: https://github.com/boringcache/dagger_ruby/releases/tag/v0.8.0
84
+ [0.6.0]: https://github.com/boringcache/dagger_ruby/releases/tag/v0.6.0
85
+ [0.4.0]: https://github.com/boringcache/dagger_ruby/releases/tag/v0.4.0
86
+ [0.3.0]: https://github.com/boringcache/dagger_ruby/releases/tag/v0.3.0
87
+ [0.1.0]: https://github.com/boringcache/dagger_ruby/releases/tag/v0.1.0
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2025 Gaurav Tiwari
3
+ Copyright (c) 2025 BoringCache
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,319 +1,194 @@
1
- # DaggerRuby
1
+ # Dagger Ruby
2
2
 
3
- A Ruby SDK for [Dagger](https://dagger.io) - build powerful CI/CD pipelines using Ruby code instead of YAML configurations.
3
+ [![CI](https://github.com/boringcache/dagger_ruby/actions/workflows/main.yml/badge.svg)](https://github.com/boringcache/dagger_ruby/actions/workflows/main.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/dagger_ruby.svg)](https://rubygems.org/gems/dagger_ruby)
4
5
 
5
- DaggerRuby provides a fluent, idiomatic Ruby interface to Dagger's container-based CI/CD engine, enabling you to define build pipelines programmatically with the full power of Ruby.
6
+ A small, chainable Ruby client for [Dagger](https://dagger.io). Use Ruby to run
7
+ container builds, mount source directories and caches, pass secrets, and connect
8
+ services through Dagger's GraphQL API.
6
9
 
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
+ This is a community-maintained client, not an official Dagger SDK. It deliberately
11
+ covers a practical subset of the API instead of Dagger module code generation.
10
12
 
11
- ```ruby
12
- gem 'dagger_ruby'
13
- ```
13
+ ## Requirements
14
14
 
15
- And then execute:
15
+ - Ruby 3.2 or newer
16
+ - Dagger 0.21.8
17
+ - Docker, Colima, or another container runtime supported by Dagger
16
18
 
17
- ```bash
18
- bundle install
19
- ```
19
+ ## Installation
20
20
 
21
- Or install it yourself with:
21
+ Add the gem to your bundle:
22
22
 
23
23
  ```bash
24
- gem install dagger_ruby
24
+ bundle add dagger_ruby
25
25
  ```
26
26
 
27
- ### Prerequisites
27
+ Install the [Dagger CLI](https://docs.dagger.io/getting-started/installation/) if
28
+ it is not already available.
28
29
 
29
- - Ruby 3.1 or higher
30
- - [Dagger CLI](https://docs.dagger.io/install) installed
31
- - Docker or compatible container runtime (Docker Desktop, Podman, etc.)
30
+ ## Quick start
32
31
 
33
- ## Quick Start
32
+ Create `pipeline.rb`:
34
33
 
35
34
  ```ruby
36
- require 'dagger_ruby'
35
+ require "dagger_ruby"
37
36
 
38
37
  DaggerRuby.connection do |client|
39
- result = client.container
40
- .from("alpine:latest")
41
- .with_exec(["echo", "hello world"])
42
- .stdout
43
-
44
- puts result
38
+ output = client.container
39
+ .from("alpine:3.22")
40
+ .with_exec(["echo", "hello from Dagger"])
41
+ .stdout
42
+
43
+ puts output
45
44
  end
46
45
  ```
47
46
 
48
- Run your script with Dagger:
47
+ Then run it normally:
49
48
 
50
49
  ```bash
51
- dagger run ruby your_script.rb
50
+ bundle exec ruby pipeline.rb
52
51
  ```
53
52
 
54
- ## Key Features
53
+ Outside an existing Dagger session, `DaggerRuby.connection` restarts the script
54
+ under `dagger run`. Inside a session, it connects directly. You can also make the
55
+ session explicit:
55
56
 
56
- - **Smart Connection**: Auto-detects Dagger sessions
57
- - **Lazy Execution**: Queries built but not executed until needed
58
- - **Cache Volumes**: Fast builds with persistent caching
59
- - **Secrets Management**: Secure handling of sensitive data
60
- - **Git Integration**: Clone and build from repositories
61
- - **Registry Auth**: Push to private registries
62
- - **Multi-platform**: Build for multiple architectures
57
+ ```bash
58
+ dagger run -- bundle exec ruby pipeline.rb
59
+ ```
63
60
 
64
- ## Examples
61
+ ## Common operations
65
62
 
66
- ### Basic Container
67
- ```ruby
68
- DaggerRuby.connection do |client|
69
- client.container
70
- .from("python:alpine")
71
- .with_exec(["pip", "install", "cowsay"])
72
- .with_exec(["cowsay", "Hello from Dagger!"])
73
- .stdout
74
- end
75
- ```
63
+ Mount the current project and a persistent Bundler cache:
76
64
 
77
- ### With Caching
78
65
  ```ruby
79
66
  DaggerRuby.connection do |client|
80
- cache = client.cache_volume("bundle-cache")
81
-
82
- client.container
83
- .from("ruby:3.2")
84
- .with_mounted_cache("/usr/local/bundle", cache)
85
- .with_exec(["bundle", "install"])
86
- .with_exec(["ruby", "app.rb"])
67
+ source = client.host.directory(Dir.pwd, exclude: [".git", "vendor"])
68
+ gems = client.cache_volume("bundle-cache")
69
+
70
+ tests = client.container
71
+ .from("ruby:4.0.6")
72
+ .with_directory("/src", source)
73
+ .with_mounted_cache("/usr/local/bundle", gems)
74
+ .with_workdir("/src")
75
+ .with_exec(["bundle", "install"])
76
+ .with_exec(["bundle", "exec", "rake", "test"])
77
+
78
+ puts tests.stdout
87
79
  end
88
80
  ```
89
81
 
90
- ### Git Repository
91
- ```ruby
92
- DaggerRuby.connection do |client|
93
- source = client.git("https://github.com/user/repo.git")
94
- .branch("main")
95
- .tree
96
-
97
- client.container
98
- .from("node:18")
99
- .with_directory("/src", source)
100
- .with_exec(["npm", "install"])
101
- .with_exec(["npm", "run", "build"])
102
- end
103
- ```
82
+ Pass a secret without placing its plaintext in the container definition:
104
83
 
105
- ### Secret Management
106
84
  ```ruby
107
85
  DaggerRuby.connection do |client|
108
- # Set a secret
109
- db_password = client.set_secret("db_password", "super_secret")
110
-
111
- client.container
112
- .from("postgres:15")
113
- .with_secret_variable("POSTGRES_PASSWORD", db_password)
114
- .with_exec(["postgres"])
115
- end
116
- ```
86
+ token = client.set_secret("registry-token", ENV.fetch("REGISTRY_TOKEN"))
117
87
 
118
- ### Multi-stage Builds
119
- ```ruby
120
- DaggerRuby.connection do |client|
121
- # Build stage
122
- builder = client.container
123
- .from("golang:1.21")
124
- .with_directory("/src", client.host.directory("."))
125
- .with_workdir("/src")
126
- .with_exec(["go", "build", "-o", "app"])
127
-
128
- # Runtime stage
129
- client.container
130
- .from("alpine:latest")
131
- .with_file("/bin/app", builder.file("/src/app"))
132
- .with_entrypoint(["/bin/app"])
133
- end
134
- ```
88
+ result = client.container
89
+ .from("alpine:3.22")
90
+ .with_secret_variable("REGISTRY_TOKEN", token)
91
+ .with_exec(["sh", "-c", "test -n \"$REGISTRY_TOKEN\""])
92
+ .exit_code
135
93
 
136
- ### Building and Pushing Images
137
- ```ruby
138
- DaggerRuby.connection do |client|
139
- ref = client.container
140
- .from("node:18")
141
- .with_directory("/app", client.host.directory("."))
142
- .with_workdir("/app")
143
- .with_exec(["npm", "ci"])
144
- .with_exec(["npm", "run", "build"])
145
- .publish("registry.example.com/my-app:latest")
146
-
147
- puts "Published image: #{ref}"
94
+ abort "secret was unavailable" unless result.zero?
148
95
  end
149
96
  ```
150
97
 
151
- ## Advanced Usage
98
+ Bind a service to another container:
152
99
 
153
- ### Working with Services
154
100
  ```ruby
155
101
  DaggerRuby.connection do |client|
156
- # Start a database service
157
- postgres = client.container
158
- .from("postgres:15")
159
- .with_env_variable("POSTGRES_PASSWORD", "password")
160
- .with_exposed_port(5432)
161
- .as_service
162
-
163
- # Run tests against the database
164
- client.container
165
- .from("ruby:3.2")
166
- .with_service_binding("db", postgres)
167
- .with_env_variable("DATABASE_URL", "postgres://postgres:password@db:5432/test")
168
- .with_exec(["bundle", "exec", "rspec"])
102
+ redis = client.container
103
+ .from("redis:8-alpine")
104
+ .with_exposed_port(6379)
105
+ .as_service
106
+
107
+ pong = client.container
108
+ .from("redis:8-alpine")
109
+ .with_service_binding("redis", redis)
110
+ .with_exec(["redis-cli", "-h", "redis", "ping"])
111
+ .stdout
112
+
113
+ puts pong
169
114
  end
170
115
  ```
171
116
 
172
- ### Cross-platform Builds
117
+ Clone a repository:
118
+
173
119
  ```ruby
174
- DaggerRuby.connection do |client|
175
- platforms = ["linux/amd64", "linux/arm64"]
176
-
177
- platforms.each do |platform|
178
- ref = client.container(platform: platform)
179
- .from("golang:1.21")
180
- .with_directory("/src", client.host.directory("."))
181
- .with_workdir("/src")
182
- .with_exec(["go", "build", "-o", "app"])
183
- .publish("my-registry.com/app:latest-#{platform.gsub('/', '-')}")
184
-
185
- puts "Built for #{platform}: #{ref}"
186
- end
187
- end
120
+ source = client.git("https://github.com/example/project.git")
121
+ .branch("main")
122
+ .tree
188
123
  ```
189
124
 
190
- ## Configuration
125
+ Authenticated Git and registry operations accept Dagger `Secret` objects; see
126
+ the public methods in `DaggerRuby::Client` and `DaggerRuby::Container` for the
127
+ available options.
191
128
 
192
- DaggerRuby can be configured using a configuration object:
129
+ ## Configuration
193
130
 
194
131
  ```ruby
195
- config = DaggerRuby::Config.new
196
- config.timeout = 300 # Set timeout to 5 minutes
197
- config.log_output = STDOUT # Enable logging
132
+ config = DaggerRuby::Config.new(
133
+ timeout: 300,
134
+ progress: "plain",
135
+ log_output: $stderr,
136
+ runtime: :apple,
137
+ )
198
138
 
199
139
  DaggerRuby.connection(config) do |client|
200
- # Your pipeline code
201
- end
202
- ```
203
-
204
- ## Error Handling
205
-
206
- DaggerRuby provides specific error classes for different failure scenarios:
207
-
208
- ```ruby
209
- begin
210
- DaggerRuby.connection do |client|
211
- client.container
212
- .from("nonexistent:image")
213
- .stdout
214
- end
215
- rescue DaggerRuby::ConnectionError => e
216
- puts "Failed to connect to Dagger: #{e.message}"
217
- rescue DaggerRuby::GraphQLError => e
218
- puts "GraphQL error: #{e.message}"
219
- rescue DaggerRuby::InvalidQueryError => e
220
- puts "Invalid query: #{e.message}"
140
+ # Build pipeline
221
141
  end
222
142
  ```
223
143
 
224
- ## Best Practices
144
+ `DAGGER_QUIET`, `DAGGER_SILENT`, and `DAGGER_PROGRESS` can provide the same CLI
145
+ preferences through the environment.
225
146
 
226
- ### 1. Use Cache Volumes for Dependencies
227
- ```ruby
228
- # Good: Use cache volumes for package managers
229
- cache = client.cache_volume("npm-cache")
230
- container.with_mounted_cache("/root/.npm", cache)
147
+ The client verifies the installed Dagger CLI before it starts a runner and then
148
+ verifies the connected engine version. This matters for runtime drivers because
149
+ the compatible CLI provisions the runner; merely pointing an older CLI at a
150
+ newer engine image is not sufficient. Use `runtime: :apple` or `runtime: :docker`
151
+ when more than one runtime is installed and automatic detection would be
152
+ ambiguous. A custom runner can be selected with `runner_host:`.
231
153
 
232
- # Bad: No caching, slower builds
233
- container.with_exec(["npm", "install"])
234
- ```
154
+ ## Errors
235
155
 
236
- ### 2. Leverage Multi-stage Builds
237
- ```ruby
238
- # Separate build and runtime environments for smaller images
239
- builder = client.container.from("node:18").with_exec(["npm", "run", "build"])
240
- runtime = client.container.from("nginx:alpine").with_directory("/usr/share/nginx/html", builder.directory("/app/dist"))
241
- ```
156
+ Connection, transport, GraphQL, and invalid-query failures use dedicated error
157
+ classes:
242
158
 
243
- ### 3. Use Secrets for Sensitive Data
244
159
  ```ruby
245
- # Good: Use Dagger secrets
246
- api_key = client.set_secret("api_key", ENV["API_KEY"])
247
- container.with_secret_variable("API_KEY", api_key)
248
-
249
- # Bad: Expose secrets in environment variables
250
- container.with_env_variable("API_KEY", ENV["API_KEY"]) # This gets cached!
160
+ begin
161
+ DaggerRuby.connection { |client| puts client.container.from("missing").stdout }
162
+ rescue DaggerRuby::ConnectionError, DaggerRuby::GraphQLError => error
163
+ warn error.message
164
+ end
251
165
  ```
252
166
 
253
- ## Examples
254
-
255
- See the `examples/` directory for complete working examples:
167
+ ## Compatibility
256
168
 
257
- - `examples/cowsay.rb` - Simple container execution
258
- - `examples/ruby_app_build.rb` - Ruby web application build and validation
259
- - `examples/service_test.rb` - App testing and validation
260
- - `examples/simple_service.rb` - Quick service binding demo with Redis
261
-
262
- ### Running Examples
263
-
264
- ```bash
265
- # Simple container example
266
- dagger run ruby examples/cowsay.rb "Hello Dagger!"
267
-
268
- # Build and validate a Ruby web application
269
- dagger run ruby examples/ruby_app_build.rb
270
-
271
- # Test and validate app without services
272
- dagger run ruby examples/service_test.rb
273
-
274
- # Quick service binding example
275
- dagger run ruby examples/simple_service.rb
276
- ```
169
+ The current branch is tested against maintained Ruby releases and Dagger 0.21.8. Dagger's
170
+ GraphQL schema can change between releases, so each supported engine update is
171
+ validated by the live integration suite before release. Earlier Ruby and Dagger
172
+ versions are not covered by the current compatibility contract.
277
173
 
278
174
  ## Development
279
175
 
280
- After checking out the repo, run:
281
-
282
176
  ```bash
283
- bin/setup # Install dependencies
284
- bin/console # Start an interactive prompt
177
+ bin/setup
178
+ bin/ci
285
179
  ```
286
180
 
287
- To run tests:
181
+ The fast suite stubs the GraphQL endpoint. Run the engine-backed contract tests
182
+ with the supported Dagger version:
288
183
 
289
184
  ```bash
290
- bundle exec rake test
185
+ DAGGER_LIVE_TESTS=1 dagger run -- bundle exec ruby test/integration/test_dagger_engine.rb
291
186
  ```
292
187
 
293
- ## Contributing
294
-
295
- 1. Fork the repository
296
- 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
297
- 3. Commit your changes (`git commit -am 'Add amazing feature'`)
298
- 4. Push to the branch (`git push origin feature/amazing-feature`)
299
- 5. Open a Pull Request
300
-
301
- ## Requirements
302
-
303
- - Ruby 3.1+
304
- - Dagger CLI
305
- - Docker or compatible container runtime
306
-
307
- ## Support
308
-
309
- - [GitHub Issues](https://github.com/boring-build/dagger-ruby/issues) - Bug reports and feature requests
310
- - [Dagger Documentation](https://docs.dagger.io) - Official Dagger documentation
311
- - [Ruby Documentation](https://docs.ruby-lang.org) - Ruby language documentation
312
-
313
- ## Acknowledgments
314
-
315
- Built with ❤️ using **Claude Sonnet 3.5/4** + **GPT-4** AI assistance.
188
+ Working examples live in [`examples/`](examples). Contribution and security
189
+ guidance are in [`CONTRIBUTING.md`](CONTRIBUTING.md) and
190
+ [`SECURITY.md`](SECURITY.md).
316
191
 
317
192
  ## License
318
193
 
319
- MIT
194
+ Dagger Ruby is available under the [MIT License](LICENSE.txt).
data/SECURITY.md ADDED
@@ -0,0 +1,18 @@
1
+ # Security policy
2
+
3
+ ## Supported versions
4
+
5
+ Security fixes are made on the latest released version. Please upgrade before
6
+ reporting a problem that only affects an older release.
7
+
8
+ ## Reporting a vulnerability
9
+
10
+ Use [GitHub's private vulnerability reporting](https://github.com/boringcache/dagger_ruby/security/advisories/new).
11
+ Do not open a public issue for a suspected vulnerability.
12
+
13
+ Include the affected version, a minimal reproduction, the likely impact, and any
14
+ suggested remediation. Maintainers will acknowledge a complete report within
15
+ seven days and coordinate disclosure after a fix is available.
16
+
17
+ Never include real credentials, tokens, customer data, or other secrets in a
18
+ report or reproduction.