Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/ruby-rails-postgres/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
FROM mcr.microsoft.com/devcontainers/ruby:3-${templateOption:imageVariant}
FROM mcr.microsoft.com/devcontainers/ruby:4-${templateOption:imageVariant}

# Install Rails
RUN su vscode -c "gem install rails webdrivers"
RUN su vscode -c "/usr/local/rvm/bin/rvm fix-permissions"
RUN groupadd --system rubygems \
&& usermod --append --groups rubygems vscode \
&& chgrp -R rubygems "$GEM_HOME" \
&& chmod -R g+rwX "$GEM_HOME" \
&& find "$GEM_HOME" -type d -exec chmod g+s {} +

# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
# The value is a comma-separated list of allowed domains
Expand Down
12 changes: 6 additions & 6 deletions src/ruby-rails-postgres/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "ruby-rails-postgres",
"version": "6.0.1",
"version": "6.0.2",
"name": "Ruby on Rails & Postgres",
"description": "Develop Ruby on Rails applications with Postgres. Includes a Rails application container and PostgreSQL server.",
"documentationURL": "https://github.com/devcontainers/templates/tree/main/src/ruby-rails-postgres",
Expand All @@ -11,17 +11,17 @@
"type": "string",
"description": "Ruby version (use - trixie, -bookworm, -bullseye variants on local arm64/Apple Silicon):",
"proposals": [
"4-trixie",
"4.0-trixie",
"3.4-trixie",
"3.3-trixie",
"4-bookworm",
"4.0-bookworm",
"3.4-bookworm",
"3.3-bookworm",
"3.4-bullseye",
"3.4-bullseye",
"3.3-bullseye"
],
"default": "4-trixie"
}
"default": "4.0-trixie"
}
},
"platforms": ["Ruby"],
"optionalPaths": [
Expand Down
2 changes: 1 addition & 1 deletion src/ruby/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Ruby",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/ruby:3-${templateOption:imageVariant}"
"image": "mcr.microsoft.com/devcontainers/ruby:4-${templateOption:imageVariant}"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
14 changes: 7 additions & 7 deletions src/ruby/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "ruby",
"version": "6.0.1",
"version": "6.0.2",
"name": "Ruby",
"description": "Develop Ruby based applications. includes everything you need to get up and running.",
"documentationURL": "https://github.com/devcontainers/templates/tree/main/src/ruby",
Expand All @@ -11,16 +11,16 @@
"type": "string",
"description": "Ruby version (use -trixie, -bookworm, -bullseye variants on local arm64/Apple Silicon):",
"proposals": [
"4-trixie",
"3.4-trixie",
"4.0-trixie",
"3.4-trixie",
"3.3-trixie",
"4-bookworm",
"3.4-bookworm",
"4.0-bookworm",
"3.4-bookworm",
"3.3-bookworm",
"3.4-bullseye",
"3.4-bullseye",
"3.3-bullseye"
],
"default": "4-trixie"
"default": "4.0-trixie"
}
},
"platforms": ["Ruby"],
Expand Down
2 changes: 0 additions & 2 deletions test/ruby-rails-postgres/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ checkCommon
# Run devcontainer specific tests
check "rails" rails --version
check "rails installation path" gem which rails
check "user has write permission to rvm gems" [ -w /usr/local/rvm/gems ]
check "user has write permission to rvm gems default" [ -w /usr/local/rvm/gems/default ]
check "user can install gems" gem install github-markup
check "gem command works" gem --version
check "user can install gems" gem install github-markup
Expand Down
11 changes: 5 additions & 6 deletions test/universal/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,19 @@ echo $(echo "java versions" && ls -a /usr/local/sdkman/candidates/java)

# Check Ruby tools
check "ruby" ruby --version
check "rvm" bash -c ". /usr/local/rvm/scripts/rvm && rvm --version"
check "rbenv" bash -c 'eval "$(rbenv init -)" && rbenv --version'
check "ruby-build" ruby-build --version
check "gems" gem --version
check "rake" rake --version
check "jekyll" jekyll --version
count=$(ls /usr/local/rvm/gems | wc -l)
expectedCount=6 # 2 version folders + 2 global folders for each version + 1 default folder which links to either one of the version + 1 cache folder
check "ruby gems are writable" test -w "$(gem env gemdir)"
count=$(find /usr/local/rubies -mindepth 1 -maxdepth 1 -type d | wc -l)
expectedCount=2
checkVersionCount "two versions of ruby are present" $count $expectedCount
echo $(echo "ruby versions" && ls -a /usr/local/rvm/rubies)
echo $(echo "ruby versions" && ls -a /usr/local/rubies)

# Node.js
check "node" node --version
check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm --version"
check "nvs" bash -c ". /usr/local/nvs/nvs.sh && nvs --version"
check "yarn" yarn --version
check "npm" npm --version
count=$(ls /usr/local/share/nvm/versions/node | wc -l)
Expand Down
Loading