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

Use pry in bin/console #15

Merged
merged 1 commit into from
Jan 30, 2020
Merged

Use pry in bin/console #15

merged 1 commit into from
Jan 30, 2020

Conversation

Cruikshanks
Copy link
Member

Sometimes it's useful to be able to load the gem and interact with the classes in order to test and debug the code.

A great way to do this is the bin/console file found in most gems.

When you load the console the default is to open irb with your project loaded. However, our standard is to use pry.

In fact, switching is so common that the code to use pry is automatically added when you create the gem. It's just commented out.

We bring in the gem pry-byebug, which in turn brings in the pry gem. So we have everything we need to switch to using our preferred REPL. Hence we make that change here.

Sometimes it's useful to be able to load the gem and interact with the classes in order to test and debug the code.

A great way to do this is the `bin/console` file found in most gems.

When you load the console the default is to open [irb](https://github.com/ruby/irb) with your project loaded. However, our standard is to use [pry](https://github.com/pry/pry).

In fact, switching is so common that the code to use `pry` is automatically added when you create the gem. It's just commented out.

We bring in the gem [pry-byebug](https://github.com/deivid-rodriguez/pry-byebug.git), which in turn brings in the pry gem. So we have everything we need to switch to using our preferred REPL. Hence we make that change here.
@Cruikshanks Cruikshanks added the housekeeping Changes such as refactoring label Jan 30, 2020
@Cruikshanks Cruikshanks self-assigned this Jan 30, 2020
@Cruikshanks Cruikshanks marked this pull request as ready for review January 30, 2020 00:12
@Cruikshanks Cruikshanks merged commit 8aafcbe into master Jan 30, 2020
@Cruikshanks Cruikshanks deleted the use-pry-in-bin-console branch January 30, 2020 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Changes such as refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants