Skip to content

Developer Console Feature#1755

Merged
neilvcarvalho merged 3 commits intothoughtbot:mainfrom
CodeMeister:dev-console
Jul 11, 2025
Merged

Developer Console Feature#1755
neilvcarvalho merged 3 commits intothoughtbot:mainfrom
CodeMeister:dev-console

Conversation

@CodeMeister
Copy link
Contributor

Developer helper to quickly open an IRB console with the gem code already loaded: bin/console

It also has a built-in reload! method that will reload a fresh copy of the files.

There is no change to any gem code.

  • the reload! method is define in .irb
  • the console is configured and launched from bin/console
  • .setup ensures the shell environment:
    • fails early
    • only uses "\n\t" as line breaks
    • prints the result of each command to the console, for easier debugging.

It's easier to debug using an IDE with an integrated debugger, but sometimes you just want to play with the code 🚀

- `bin/console` opens an IRB console, with factory_bot already loaded.
- The session method `reload!` will reload all gem files.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds an interactive reload! helper in the IRB configuration to unload and reload the factory_bot gem during a console session without restarting.

  • Implements reload! in .irbrc to remove the FactoryBot constant and related loaded features
  • Re-requires factory_bot and signals success to the user

CodeMeister and others added 2 commits July 11, 2025 18:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@neilvcarvalho neilvcarvalho left a comment

Choose a reason for hiding this comment

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

This is awesome. Thank you!

@neilvcarvalho neilvcarvalho merged commit 343824f into thoughtbot:main Jul 11, 2025
25 checks passed
@CodeMeister CodeMeister deleted the dev-console branch July 28, 2025 12:29
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.

3 participants