Skip to content

Commit b0bdafb

Browse files
authored
feat(runtime): add Ruby provider (#116)
1 parent f872308 commit b0bdafb

7 files changed

Lines changed: 1209 additions & 12 deletions

File tree

.dtvem/runtimes.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/dtvem/dtvem/main/schemas/runtimes.schema.json",
3-
"node": "22.0.0"
4-
}
3+
"node": "22.0.0",
4+
"python": "3.8.9",
5+
"ruby": "3.3.9"
6+
}

schemas/runtimes.schema.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
1111
},
1212
"propertyNames": {
13-
"description": "Runtime name (e.g., 'python', 'node'). NOTE: When adding a new runtime provider, update this enum list to include the new runtime name.",
13+
"description": "Runtime name (e.g., 'python', 'node', 'ruby'). NOTE: When adding a new runtime provider, update this enum list to include the new runtime name.",
1414
"enum": [
1515
"python",
16-
"node"
16+
"node",
17+
"ruby"
1718
]
1819
},
1920
"examples": [

src/internal/runtime/registry_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ type mockProvider struct {
1010
displayName string
1111
}
1212

13-
func (m *mockProvider) Name() string { return m.name }
14-
func (m *mockProvider) DisplayName() string { return m.displayName }
15-
func (m *mockProvider) Shims() []string { return []string{m.name} }
13+
func (m *mockProvider) Name() string { return m.name }
14+
func (m *mockProvider) DisplayName() string { return m.displayName }
15+
func (m *mockProvider) Shims() []string { return []string{m.name} }
1616
func (m *mockProvider) Install(version string) error { return nil }
1717
func (m *mockProvider) Uninstall(version string) error { return nil }
1818
func (m *mockProvider) ListInstalled() ([]InstalledVersion, error) { return nil, nil }

src/internal/tui/styles.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ func initStyles() {
5959
lipgloss.SetColorProfile(termenv.TrueColor)
6060

6161
// Color palette
62-
colorPrimary = lipgloss.Color("39") // Cyan
62+
colorPrimary = lipgloss.Color("39") // Cyan
6363
colorSecondary = lipgloss.Color("213") // Magenta/Pink
64-
colorSuccess = lipgloss.Color("42") // Green
65-
colorWarning = lipgloss.Color("214") // Orange/Yellow
66-
colorError = lipgloss.Color("196") // Red
67-
colorMuted = lipgloss.Color("245") // Gray
64+
colorSuccess = lipgloss.Color("42") // Green
65+
colorWarning = lipgloss.Color("214") // Orange/Yellow
66+
colorError = lipgloss.Color("196") // Red
67+
colorMuted = lipgloss.Color("245") // Gray
6868

6969
// Text styles
7070
StyleTitle = lipgloss.NewStyle().

src/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
// Import runtime providers to register them
77
_ "github.com/dtvem/dtvem/src/runtimes/node"
88
_ "github.com/dtvem/dtvem/src/runtimes/python"
9+
_ "github.com/dtvem/dtvem/src/runtimes/ruby"
910
)
1011

1112
func main() {

0 commit comments

Comments
 (0)