diff --git a/README.md b/README.md index 249d4ad..161641d 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Three developer setups live in this repo. Pick the one that matches what you wan | --- | --- | | A complete dev workstation: tools, OS settings, WSL, and terminal. One command, may reboot. | [Windows Dev Config](#%EF%B8%8F-windows-dev-config) | | A polished WSL shell: zsh/bash, Starship, CLI tools, and a themed terminal profile. Interactive or unattended. | [WSL Comfort](#-wsl-comfort) | -| A single language toolchain: Node, Python, SQL, PowerShell, .NET, Rust, Go, Java, PHP, WinForms, or WinUI 3. One command each. | [Workloads](#-single-language-workloads) | +| A single language toolchain: Node, Python, Ruby, SQL, PowerShell, .NET, Rust, Go, Java, PHP, WinForms, or WinUI 3. One command each. | [Workloads](#-single-language-workloads) | Most of them use [`winget configure`](https://learn.microsoft.com/en-us/windows/package-manager/winget/configure). If you've never used it before, enable it once: @@ -136,6 +136,7 @@ Just want one toolchain? Pick a row. Each workload ships a `configuration.winget | Java | Microsoft Build of OpenJDK 25 LTS | `winget configure -f .\Workloads\java\configuration.winget --accept-configuration-agreements --disable-interactivity` | | Rust | Rust stable via rustup | `winget configure -f .\Workloads\rust\configuration.winget --accept-configuration-agreements --disable-interactivity` | | Python | Python 3.14 + uv | `winget configure -f .\Workloads\python\configuration.winget --accept-configuration-agreements --disable-interactivity` | +| Ruby | Ruby 3.4 + MSYS2 DevKit | `winget configure -f .\Workloads\ruby\configuration.winget --accept-configuration-agreements --disable-interactivity` | | SQL | Lightweight SQL Developer: SQL Server + sqlcmd + VS Code extension | `winget configure -f .\Workloads\sql\configuration.winget --accept-configuration-agreements --disable-interactivity` | | PowerShell | PowerShell 7 + VS Code PowerShell extensions + PSScriptAnalyzer settings | `winget configure -f .\Workloads\powershell\configuration.winget --accept-configuration-agreements --disable-interactivity` | | WinForms | .NET SDK 10 + Windows Forms desktop workload | `winget configure -f .\Workloads\winforms\configuration.winget --accept-configuration-agreements --disable-interactivity` | diff --git a/src/Workloads/ruby/configuration.winget b/src/Workloads/ruby/configuration.winget new file mode 100644 index 0000000..d5f03e1 --- /dev/null +++ b/src/Workloads/ruby/configuration.winget @@ -0,0 +1,21 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json +# +# winget configure --file scripts/windows/ruby/configuration.winget ` +# --accept-configuration-agreements ` +# --disable-interactivity +# +$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json +metadata: + winget: + processor: dscv3 +resources: + - name: Ruby + type: Microsoft.WinGet/Package + properties: + id: RubyInstallerTeam.RubyWithDevKit.3.4 + source: winget + acceptAgreements: true + metadata: + description: Install Ruby 3.4 with MSYS2 DevKit (provides ruby + gem + ridk) + winget: + securityContext: elevated diff --git a/src/Workloads/ruby/install.ps1 b/src/Workloads/ruby/install.ps1 new file mode 100644 index 0000000..ebccfca --- /dev/null +++ b/src/Workloads/ruby/install.ps1 @@ -0,0 +1,26 @@ +<# +.SYNOPSIS + Apply the Ruby winget DSC configuration on Windows. + +.DESCRIPTION + This script is a thin CI/dev shim. The core artifact for the Ruby flow is + `configuration.winget` in this directory — a winget DSC configuration that + declaratively installs Ruby 3.4 with MSYS2 DevKit via winget. + + The shim exists only to: + * apply the DSC config with retry (hosted-runner networks are flaky), + * rehydrate PATH in the current session so later CI steps see `ruby` and `gem`, + * verify those commands resolve, and + * emit `INSTALL_OK: ruby` for the test harness. +#> + +[CmdletBinding()] +param() + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version Latest + +& (Join-Path $PSScriptRoot '..\_common\apply-configuration.ps1') ` + -Id 'ruby' ` + -ConfigFile (Join-Path $PSScriptRoot 'configuration.winget') ` + -RequireCommands @('ruby', 'gem') diff --git a/src/docs/development.md b/src/docs/development.md index b408197..717a1eb 100644 --- a/src/docs/development.md +++ b/src/docs/development.md @@ -44,6 +44,7 @@ extension. | Java | ✅ automated | `Microsoft.OpenJDK.25` | | Rust | ✅ automated | `Rustlang.Rustup` (then `rustup default stable`) | | Python | ✅ automated | `Python.Python.3.14`, `astral-sh.uv` | +| Ruby | ✅ automated | `RubyInstallerTeam.RubyWithDevKit.3.4` | | SQL Developer | 🙋 manual | Lightweight SQL Developer: SQL Server + sqlcmd + VS Code extension; no VS/SSDT | | PowerShell | ✅ automated | `Microsoft.PowerShell`, `Microsoft.VisualStudioCode`, VS Code PowerShell/Pester extensions + PSScriptAnalyzer settings | | WinForms | 🙋 manual | `Microsoft.DotNet.SDK.10` + the .NET desktop workload (multi-GB; manual to spare CI minutes) | diff --git a/src/manifest.yml b/src/manifest.yml index d7631c9..9179ae3 100644 --- a/src/manifest.yml +++ b/src/manifest.yml @@ -223,6 +223,22 @@ flows: expected: src/tests/python/expected.txt version: "python --version; uv --version" + - id: ruby + name: Ruby + description: Ruby 3.4 + MSYS2 DevKit + category: languages + tags: [ruby, gem, scripting, rails] + icon: 💎 + onboardingUrl: https://www.ruby-lang.org/en/documentation/quickstart/ + os: [windows] + windows: + install: Workloads/ruby/install.ps1 + configuration: Workloads/ruby/configuration.winget + build: "" + run: ruby src/tests/ruby/hello.rb + expected: src/tests/ruby/expected.txt + version: "ruby --version; gem --version" + - id: sql name: Lightweight SQL Developer description: SQL Server Developer + sqlcmd + VS Code SQL database projects extension diff --git a/src/tests/ruby/expected.txt b/src/tests/ruby/expected.txt new file mode 100644 index 0000000..af5626b --- /dev/null +++ b/src/tests/ruby/expected.txt @@ -0,0 +1 @@ +Hello, world! diff --git a/src/tests/ruby/hello.rb b/src/tests/ruby/hello.rb new file mode 100644 index 0000000..bf234ce --- /dev/null +++ b/src/tests/ruby/hello.rb @@ -0,0 +1 @@ +puts "Hello, world!"