Skip to content

Commit 5c933a3

Browse files
authored
Merge pull request rails#51791 from duduribeiro/add-name-to-devcontainer-compose
Add name to DevContainer compose file
2 parents 3e08223 + f63d344 commit 5c933a3

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.github/workflows/devcontainer-smoke-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
- name: Generate rails app sqlite3
3434
run: bundle exec railties/exe/rails new myapp_sqlite --database="sqlite3" --dev
3535

36+
- name: Remove old deprecated docker-compose
37+
run: |
38+
sudo rm /usr/local/bin/docker-compose
39+
3640
- name: Test devcontainer sqlite3
3741
uses: devcontainers/[email protected]
3842
with:

railties/lib/rails/generators/rails/app/templates/.devcontainer/compose.yaml.tt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: "<%= app_name %>"
2+
13
services:
24
rails-app:
35
build:

railties/test/generators/app_generator_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,8 @@ def test_devcontainer
12951295
assert_match(/ARG RUBY_VERSION=#{RUBY_VERSION}/, content)
12961296
end
12971297
assert_compose_file do |compose_config|
1298+
assert_equal "my_app", compose_config["name"]
1299+
12981300
expected_rails_app_config = {
12991301
"build" => {
13001302
"context" => "..",

0 commit comments

Comments
 (0)