Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add templates from hidden directories #51863

Closed
wants to merge 1 commit into from

Conversation

tochev
Copy link

@tochev tochev commented May 19, 2024

Motivation / Background

The .devcontainer/* template files (introduced in #50914 ) were not included in the railties gem, resulting in a failure to create a new project (rails new foo).

The error was Could not find ".devcontainer/devcontainer.json" in any of your source paths.

Detail

The .devcontainer/* template files were not included in the railties gem, because the old file pattern didn't match files in hidden directories, only hidden files.

Additional information

The issue was observed with ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]

Gem contents for devcontainer before the change:
image

Gem contents after the change:
image

File diff between the two:
image

Alternative pattern

An alternative could be

Dir[..., "exe/**/*", "lib/{**,**/.[a-z]*/**}/{*,.[a-z]*}"])

but I think it is harder to read.

Checklist

Before submitting the PR make sure the following are checked:

  • [*] This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • [*] Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • [*] CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@rails-bot rails-bot bot added the railties label May 19, 2024
@yahonda
Copy link
Member

yahonda commented Jun 4, 2024

Thanks for opening a pull request. Now main branch renames .devcontainer to devcontainer by removing the . prefix via 5fea59c so it looks like this fix is not needed.

@yahonda
Copy link
Member

yahonda commented Jun 4, 2024

7-2-stable branch also back ports this change via 77c73da

@yahonda
Copy link
Member

yahonda commented Jun 4, 2024

Closing this pull request since renaming.devcontainer to devcontainer by removing the . prefix.

Thanks again for your contribution.

@yahonda yahonda closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants