basecamp / basecamp/console1984
Add support for pry
- Dominant language
- Ruby
- Stars
- 844
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Any statements entered while inside a pry console aren't added to the console1984_commands table.
### Steps to reproduce
I created a [dummy repo](https://github.com/ohthatjames/console1984-pry-test) to test this. It's a vanilla `rails new` on version 7.0.4.2 with [pry and console1984 added](https://github.com/ohthatjames/console1984-pry-test/commit/0d4e5fb0b670b4e108f9c95c914ea5fe441a3205).
```
console1984-pry-test % CONSOLE_USER=james bin/rails c
# ... console1984 setup truncated ...
Loading development environment (Rails 7.0.4.2)
irb(main):001:0> puts "Before pry"
Before pry
=> nil
irb(main):002:0> pry
[1] pry(main)> puts "Inside pry"
Inside pry
=> nil
[2] pry(main)> exit
=> nil
irb(main):003:0> puts "After pry"
After pry
=> nil
irb(main):004:0> exit
```
### Expected logged commands
```
puts "Before pry"
pry
puts "Inside pry"
exit
puts "After pry"
exit
```
### Actual logged commands
```
console1984-pry-test % bin/rails runner "puts Console1984::Session.last.commands.map(&:statements)"
puts "Before pry"
pry
puts "After pry"
exit
```
### Extra info
rails version 7.0.4.2
console1984 version 0.1.26
pry version 0.14.2
I've tried `gem "pry", require: false` and changing the order of gems in the Gemfile, but the result always appears to be the same.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the behavior in the linked dummy repository with Rails 7.0.4.2, Pry 0.14.2, and console1984 0.1.26, starting at the bin/rails c entry point. Inspect the recorded Console1984::Session commands around entering and leaving pry; done means commands entered inside pry appear in console1984_commands alongside the surrounding commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100