diff --git a/.devcontainer/2.5/bundle-config/devcontainer-feature.json b/.devcontainer/2.5/bundle-config/devcontainer-feature.json new file mode 100644 index 00000000..5f4cb243 --- /dev/null +++ b/.devcontainer/2.5/bundle-config/devcontainer-feature.json @@ -0,0 +1,9 @@ +{ + "name": "Bundle Config", + "id": "bundle-config", + "version": "1.0.0", + "description": "Bundle Config", + "install": { + "script": "install.sh" + } +} \ No newline at end of file diff --git a/.devcontainer/2.5/bundle-config/install.sh b/.devcontainer/2.5/bundle-config/install.sh new file mode 100644 index 00000000..a3da3a10 --- /dev/null +++ b/.devcontainer/2.5/bundle-config/install.sh @@ -0,0 +1,9 @@ +#!/bin/sh +RUBYGEMS_VERSION=3.3.27 +gem install rubygems-update -v ${RUBYGEMS_VERSION} > /dev/null 2>&1 && +update_rubygems > /dev/null 2>&1 +# Depends on making a copy of the Gemfile, so we don't conflict with the Gemfile.lock +# that is probably relegated to newer Ruby. +# We need to set the ENV variable here, but must wait to copy the Gemfile until the postCreateCommand hook. +# Ensure we use the right Gemfile +echo 'export BUNDLE_GEMFILE=Gemfile-ruby2_5.gemfile' >> ~/.bashrc diff --git a/.devcontainer/2.5/devcontainer.json b/.devcontainer/2.5/devcontainer.json new file mode 100644 index 00000000..88ccca81 --- /dev/null +++ b/.devcontainer/2.5/devcontainer.json @@ -0,0 +1,20 @@ +// 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 2.5 on Debian", + "image": "ruby:2.5-buster", + "postCreateCommand": "cp Gemfile Gemfile-ruby2_5.gemfile && bundle install", + + // Features to add to the dev container. More info: https://containers.dev/features. + // Features run during the image build, and thus before the lifecycle hooks in this file, e.g., postCreateCommand + "features": { + "./bundle-config": {} + }, + + // Configure tool-specific properties. + "customizations": { + "jetbrains": { + "backend": "RubyMine" + } + } +} diff --git a/.gitignore b/.gitignore index aeae5f29..dcb64e83 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ /spec/reports/ /tmp/ Gemfile.lock +*.gemfile +*.gemfile.lock \ No newline at end of file