dagger_ruby 0.3.0 → 0.6.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: 9bb342a6b2f94fd6077e596faed26989210cbd80f77b1dc98d960a38296e701e
4
- data.tar.gz: ee43c34f786d43639538ffefae5bc0554c983071b6411ac9a9031d0193c763c8
3
+ metadata.gz: d55d30e1a649d969398e1f7e4a049e5303cbf037b0b57272e4f7c093c0f86722
4
+ data.tar.gz: 0d242f193df07c677b1e70c105bfd856a881a740b727376942f4d33a593e0612
5
5
  SHA512:
6
- metadata.gz: 7272a0f5320e74fb5b329f8d8928c4061bba358fe1bf0a1f91234546504b9695fd9858a42642cb916ff2dae94ab6ad1251d61452ef9e0ca7fc6da863fc64d734
7
- data.tar.gz: 3e860fb3f81ccadae92fafa0ada49e0b6609829b2cca3305b8c1af3d964adac54362950a0d643a0698fad70132c0f5af9c8ecfe21f8816a6882b407b1c280562
6
+ metadata.gz: c1ab620c788a833a369fa4f587a1ed50d3feab24278c314192bf75afb4b1a42a69a7ad756b03644d699bb424a4dce16087e18af5d265d2befbf47ef92295c6a7
7
+ data.tar.gz: 2aa572694719d97f99523ef393075fd2468344d975a0e7774a74d1e89d56cd25529d1fddc520c1a9c18887caf3de7d347231c947c67ed2ecc8d788cff44c79bf
data/CHANGELOG.md CHANGED
@@ -5,6 +5,61 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.6.0] - 2025-09-17
9
+
10
+ Programmatic Control:
11
+
12
+ config = DaggerRuby::Config.new(
13
+ engine_log_level: "error", # Only errors
14
+ progress: "plain" # Clean progress format
15
+ )
16
+ DaggerRuby.connection(config) do |client|
17
+ # Your operations with clean output
18
+ end
19
+
20
+ 📋 Progress Options:
21
+
22
+ - plain - Simple text progress (no fancy symbols like ▶ ●)
23
+ - dots - Just dots for progress
24
+ - tty - Full fancy output (default)
25
+ - auto - Auto-detect based on terminal
26
+
27
+ 🎯 What This Eliminates:
28
+
29
+ - All the ▶ connect, ● container: symbols
30
+ - Timing information like 0.7s, 3.6s CACHED
31
+ - Complex tree-style progress display
32
+
33
+ ## [0.4.0] - 2025-09-17
34
+
35
+ 1. Environment Variable (Easiest)
36
+
37
+ export DAGGER_LOG_LEVEL=error # Only show errors
38
+ # or
39
+ DAGGER_LOG_LEVEL=warn your_ruby_script.rb # Only warnings and errors
40
+
41
+ 2. Programmatic Configuration
42
+
43
+ config = DaggerRuby::Config.new(engine_log_level: "error")
44
+ DaggerRuby.connection(config) do |client|
45
+ # Your dagger operations with minimal logging
46
+ end
47
+
48
+ 3. Available Log Levels (from most to least verbose):
49
+
50
+ - trace - Everything (most verbose)
51
+ - debug - Default Dagger behavior
52
+ - info - Informational messages
53
+ - warn - Warnings and errors (new default)
54
+ - error - Only errors (cleanest output)
55
+
56
+ What Changed:
57
+
58
+ - Added engine_log_level to Config class (lib/dagger_ruby/config.rb:5)
59
+ - Modified dagger run command to pass --log-level flag (lib/dagger_ruby.rb:35-38)
60
+ - Environment variable DAGGER_LOG_LEVEL support
61
+ - Tests updated and passing
62
+
8
63
  ## [0.3.0] - 2024-12-19
9
64
 
10
65
  ### Fixed
@@ -2,12 +2,15 @@ require "logger"
2
2
 
3
3
  module DaggerRuby
4
4
  class Config
5
- attr_reader :log_output, :workdir, :timeout
5
+ attr_reader :log_output, :workdir, :timeout, :quiet, :silent, :progress
6
6
 
7
- def initialize(log_output: nil, workdir: nil, timeout: nil)
7
+ def initialize(log_output: nil, workdir: nil, timeout: nil, quiet: nil, silent: nil, progress: nil)
8
8
  @log_output = log_output
9
9
  @workdir = workdir
10
10
  @timeout = timeout || 600
11
+ @quiet = quiet || ENV["DAGGER_QUIET"]&.to_i
12
+ @silent = silent || ENV["DAGGER_SILENT"] == "true"
13
+ @progress = progress || ENV.fetch("DAGGER_PROGRESS", nil)
11
14
  end
12
15
  end
13
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DaggerRuby
4
- VERSION = "0.3.0"
4
+ VERSION = "0.6.0"
5
5
  end
data/lib/dagger_ruby.rb CHANGED
@@ -31,8 +31,18 @@ module DaggerRuby
31
31
  # Construct the command that dagger should run
32
32
  ruby_cmd = ["ruby", script, *args].join(" ")
33
33
 
34
- # Run dagger with our command
35
- cmd = ["dagger", "run", ruby_cmd].join(" ")
34
+ # Get verbosity options from config or environment
35
+ quiet = config&.quiet || ENV["DAGGER_QUIET"]&.to_i
36
+ silent = config&.silent || ENV["DAGGER_SILENT"] == "true"
37
+ progress = config&.progress || ENV.fetch("DAGGER_PROGRESS", nil)
38
+
39
+ # Build dagger command with options
40
+ cmd_parts = ["dagger"]
41
+ cmd_parts += ["-q"] * quiet if quiet&.positive?
42
+ cmd_parts += ["--silent"] if silent
43
+ cmd_parts += ["--progress", progress] if progress
44
+ cmd_parts += ["run", ruby_cmd]
45
+ cmd = cmd_parts.join(" ")
36
46
 
37
47
  # Execute the command
38
48
  exec(cmd)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dagger_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaurav Tiwari
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.6.9
106
+ rubygems_version: 3.6.7
107
107
  specification_version: 4
108
108
  summary: A Ruby SDK for Dagger - build powerful CI/CD pipelines using Ruby
109
109
  test_files: []