Skip to content

feat(runtime): add Ruby provider #37

@CalvinAllen

Description

@CalvinAllen

Add Ruby runtime provider to dtvem for managing Ruby versions.

Current State

Empty directory exists at src/runtimes/ruby/ but no implementation.

Remaining Work

Core Implementation

  • Create src/runtimes/ruby/provider.go with all 19 Provider interface methods
  • Add init() function for auto-registration: runtime.Register(NewProvider())
  • Import in src/main.go: _ "github.com/CodingWithCalvin/dtvem/src/runtimes/ruby"
  • Update schemas/runtimes.schema.json to add "ruby" to runtime enum

Provider Methods

  • Implement Shims() to return: ["ruby", "gem", "irb", "bundle", "rake", "rdoc", "ri"]
  • Implement ShouldReshimAfter() for gem install/uninstall and bundle install/update
  • Implement version listing from ruby-lang.org
  • Implement download/installation logic (platform-specific)
  • Implement migration detection for rbenv, rvm, chruby, system

Testing & Documentation

  • Add tests using provider contract harness
  • Update documentation with Ruby examples

Version Sources

Migration Sources

  • rbenv: ~/.rbenv/versions/
  • rvm: ~/.rvm/rubies/
  • chruby: /opt/rubies/ or ~/.rubies/

References

  • Provider interface: src/internal/runtime/provider.go
  • Example implementations: src/runtimes/node/, src/runtimes/python/

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestproviderRuntime provider implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions