[HACKATHON] Enable user narrative script to work with binding.pry#11651
Merged
eileen-nava merged 3 commits intologin-hackathon-2024-user-narrativefrom Dec 20, 2024
Merged
Conversation
matthinz
reviewed
Dec 19, 2024
| events = [] | ||
|
|
||
| $stdin.each_line do |line| | ||
| File.read(file_name).each_line do |line| |
Contributor
There was a problem hiding this comment.
A common pattern in shell tools is to allow "-" to mean "use stdin". So it would be cool to just check if file_name == '-' and use stdin in that case (so, keep stdin_source and update find_cloudwatch_events to check if '-' has been passed as a filename and use stdin_source in that case, otherwise use file_source).
Contributor
Author
There was a problem hiding this comment.
I am going to merge the PR as is and make a note to come back to this after the holidays.
matthinz
approved these changes
Dec 19, 2024
Contributor
matthinz
left a comment
There was a problem hiding this comment.
Thank you! I have a mild suggestion about supporting '-' but don't want to hold this up any longer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 Summary of changes
-f, for passing in a file that contains ndjson. I made this change to enable usingbinding.prywith the script. Previously, the script regarded the piped-in file asstdin, which made it impossible to interact withbinding.prybreakpoints via the terminal.📜 Testing Plan
binding.prysomewhere in the script.