Skip to content

Commit ef0ca9d

Browse files
committed
Update devcontainer image and fix test for Rails 8.1
1 parent f07d6fe commit ef0ca9d

File tree

2 files changed

+8
-29
lines changed

2 files changed

+8
-29
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,12 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ruby
33
{
4-
"name": "Ruby",
5-
"build": {
6-
"dockerfile": "Dockerfile",
7-
"args": {
8-
// Update 'VARIANT' to pick a Ruby version: 3, 3.0, 2, 2.7, 2.6
9-
// Append -bullseye or -buster to pin to an OS version.
10-
// Use -bullseye variants on local on arm64/Apple Silicon.
11-
"VARIANT": "3-bullseye",
12-
// Options
13-
"NODE_VERSION": "lts/*"
14-
}
15-
},
4+
"name": "activeresource",
5+
"image": "ghcr.io/rails/devcontainer/images/ruby:3.4.5",
166

17-
// Set *default* container specific settings.json values on container create.
18-
"settings": {},
19-
20-
// Add the IDs of extensions you want installed when the container is created.
21-
"extensions": [
22-
"rebornix.Ruby"
23-
],
24-
25-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
26-
// "forwardPorts": [],
27-
28-
// Use 'postCreateCommand' to run commands after the container is created.
29-
// "postCreateCommand": "ruby --version",
30-
31-
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
327
"remoteUser": "vscode",
338
"features": {
349
"github-cli": "latest"
3510
}
3611

37-
}
12+
}

test/cases/base_test.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,11 @@ def test_collection_path_with_parameters
804804
def test_collection_url_with_parameters
805805
assert_equal "http://37s.sunrise.i:3000/people.json?name=Test", Person.collection_url(name: "Test")
806806
assert_equal "http://37s.sunrise.i:3000/people.json?name=false", Person.collection_url(name: false)
807-
assert_equal "http://37s.sunrise.i:3000/people.json?name=", Person.collection_url(name: nil)
807+
if ActiveSupport::VERSION::MAJOR < 8 || ActiveSupport::VERSION::MINOR < 1
808+
assert_equal "http://37s.sunrise.i:3000/people.json?name=", Person.collection_url(name: nil)
809+
else
810+
assert_equal "http://37s.sunrise.i:3000/people.json?name", Person.collection_url(name: nil)
811+
end
808812

809813
assert_equal "http://37s.sunrise.i:3000/people.json?name=Test", Person.collection_url("name" => "Test")
810814

0 commit comments

Comments
 (0)