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

Ignore comment lines in option files #2984

Merged
merged 1 commit into from
Dec 10, 2022

Conversation

JunichiIto
Copy link
Contributor

@JunichiIto JunichiIto commented Nov 29, 2022

Resolves #2985

@JunichiIto JunichiIto marked this pull request as ready for review November 29, 2022 02:22
@@ -169,7 +169,8 @@ def parse_args_ignoring_files_or_dirs_to_run(args, source)
def args_from_options_file(path)
return [] unless path && File.exist?(path)
config_string = options_file_as_erb_string(path)
FlatMap.flat_map(config_string.split(/\n+/), &:shellsplit)
config_lines = config_string.split(/\n+/).reject { |s| s.match?(/\A\s*#/) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match?/1 isn't supported by all of our supported Rubies, this would need to change to be merged,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review. I use =~ instead: 51d6054

@JunichiIto JunichiIto force-pushed the ignore-comment-lines-in-option-files branch from c9d9e3b to 51d6054 Compare December 2, 2022 03:27
@JonRowe JonRowe merged commit 7d011c8 into rspec:main Dec 10, 2022
JonRowe added a commit that referenced this pull request Dec 10, 2022
@JonRowe
Copy link
Member

JonRowe commented Dec 10, 2022

Thanks, I fixed the Ruby 3.1 build elsewhere so this is now merged.

@JunichiIto
Copy link
Contributor Author

Great, thank you!

@JunichiIto JunichiIto deleted the ignore-comment-lines-in-option-files branch December 10, 2022 07:19
@JonRowe
Copy link
Member

JonRowe commented Feb 4, 2024

Released in 3.13.0, apologies it has taken so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot comment out lines in .rspec
2 participants