#ruby

1 messages · Page 1 of 1 (latest)

grave harness
#

Of course you can Daggerize a Ruby environment, by run the ruby toolchain in containers, and assembling pipelines from there

#

Additionally our friend @reef zealot has started a prototype of a Ruby SDK for Dagger, which would enable scripting pipelines directly in Ruby! Great for ruby dev teams who want to script their pipelines in the same language as their app.

See discussion here: #1124111401363976295

violet basalt
#

Anyone using the ruby SDK yet or is it too early?

grave harness
ripe tide
#

👋
As a way to play with dagger I started a ruby SDK.
I've opened a PR in draft to have room to discuss it: https://github.com/dagger/dagger/pull/9026
A part is working, a SDK is there (maybe needs some adjustments and improvements), a Gem is almost there too.
And I'm currently trying to make modules with it. This part is not yet working, I'm on it.
A part of it has been made by copy/pasting code from php and typescripts sdks.
Happy to get any feedback on it 🙂

GitHub

Start implementing a ruby sdk.
WarningThis is work in progress

Ruby SDK
A generated ruby client can be found in /sdk/ruby. The code generation is working, and a Go runtime is provided.
To generate...

ripe tide
#

Multiple options are possible for the way the SDK could be designed.
Do anyone have opinions on which one would be best?

  • keyword parameters and no specific type for options
  def gen
    ctr
      .with_directory(
        path: "lib",
        directory: lib
      )
      .with_directory(
        path: module_path,
        directory: sdk,
        include: ['client.gen.rb']
      )
  end
  • keyword parameters but a specific type for options
  def gen_args
    ctr
      .with_directory(
        path: "lib",
        directory: lib
      )
      .with_directory(
        path: module_path,
        directory: sdk,
        opts: dagger::ContainerWithDirectoryOpts.new(
          include: ['client.gen.rb']
        )
      )
  end
  • no keyword parameters
  def gen_no_names
    ctr
      .with_directory(
        "lib",
        lib
      )
      .with_directory(
        module_path,
        sdk,
        dagger::ContainerWithDirectoryOpts.new(
          include: ['client.gen.rb']
        )
      )
  end