From 595dc382855b587bb37d6cf4eb6efd75ca39b110 Mon Sep 17 00:00:00 2001 From: Beth Maloney Date: Sun, 14 Apr 2024 17:00:58 +1000 Subject: [PATCH] Add Dev Container Also add webrick to GemFile to prevent error when using Ruby 3.x --- .devcontainer/devcontainer.json | 22 ++++++++++++++++++++++ Gemfile | 2 ++ Gemfile.lock | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..9428d7b2 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ruby +{ + "name": "Ruby", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/ruby:3.2", + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "gem install bundler -v 2.1.4" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/Gemfile b/Gemfile index 098abe3d..af158dba 100644 --- a/Gemfile +++ b/Gemfile @@ -5,3 +5,5 @@ require 'rbconfig' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i gem 'wdm', '>= 0.1.0' end + +gem "webrick", "~> 1.8" diff --git a/Gemfile.lock b/Gemfile.lock index 7277fd02..70efb230 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -216,6 +216,8 @@ GEM nokogiri (1.16.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) + nokogiri (1.16.2-x64-mingw32) + racc (~> 1.4) octokit (4.25.1) faraday (>= 1, < 3) sawyer (~> 0.9) @@ -252,6 +254,7 @@ GEM unf_ext (0.0.8.2) unf_ext (0.0.8.2-x64-mingw32) unicode-display_width (1.8.0) + webrick (1.8.1) PLATFORMS ruby @@ -259,6 +262,7 @@ PLATFORMS DEPENDENCIES github-pages + webrick (~> 1.8) BUNDLED WITH 2.1.4