Project

debbie

0.01
No commit activity in last 3 years
No release in over 3 years
Spending hours in the rails console? Spruce it up and show off those hard-working hands! Debbie replaces IRB with Pry, improves output through awesome_print, and has some other goodies up its sleeves.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.4.2
~> 0.7
~> 0.10
~> 0.6
~> 0.3
>= 3.0
 Project Readme

Debbie

Fully based on the amazing work of @nixme (Gopal Patel) on his gem Jazz Hands

We only removed some stuff that we're not using it


Spending hours in the rails console? Spruce it up and show off those hard-working hands!

debbie is an opinionated set of console-related gems and a bit of glue:

  • Pry for a powerful shell alternative to IRB.
  • Awesome Print for stylish pretty print.
  • Hirb for tabular collection output.
  • Pry Rails for additional commands (show-routes, show-models, show-middleware) in the Rails console.
  • Pry Stack Explorer to navigate the call stack and frames.
  • Pry Remote to connect remotely to a Pry console.
  • Pry Byebug Adds step, next, finish and continue commands and breakpoints to Pry using byebug.
  • Coolline & Coderay for syntax highlighting as you type. Optional. MRI 1.9.3/2.0.0 only

To-Do

Usage

IMPORTANT

This version of debbie works on ruby version > 2.2, if you need to use it on a ruby 2.1+ or 2.0+ stick with the version 1.0.2

Ruby 2.2+, Rails 3, 4 and 5. Add to your project Gemfile:

group :development, :test do
  gem 'debbie'
end

That's it. Run bundle and then bundle exec rails c as usual.

Hirb isn't enabled by default. To use, run Hirb.enable in the console.

Ruby compiled against a proper readline library, ideally GNU readline, is recommended. Alternatively, gem install rb-readline for an acceptible backup. Using ruby compiled against a libedit wrapper (primarily OS X) will work but is not recommended.

Options

Change the following options by creating an initializer in your Rails project Example config/initializers/debbie.rb:

if defined?(Debbie)
  Debbie.colored_prompt = false
  Debbie.enable_syntax_highlighting_as_you_type!
end

colored_prompt

Color the console prompt? Defaults to true when the current ruby is compiled against GNU readline or rb-readline, which don't have issues counting characters in colored prompts. false for libedit.

Note: Pry.color = false trumps this setting and disables all console coloring.

prompt_separator

Separator string between the application name and line input. Defaults to ยป for GNU readline or libedit. Defaults to > for rb-readline which fails on mixed encodings.

Syntax highlighting

Syntax highlighting as you type via Coolline and Coderay is disabled by default due to slightly buggy behavior. To enable, add Debbie.enable_syntax_highlighting_as_you_type! to the initializer. Only works with MRI 1.9.3 or 2.0.0.

Contributing

Patches and bug reports are welcome. Just send a pull request or file an issue. Project changelog.