0.01
No commit activity in last 3 years
No release in over 3 years
A Pry plugin which enables a nice looking prompt, with many customizable components.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.7
~> 0.10
 Project Readme

Pry Bloodline

A glorious descendant of a noble lineage of status lines, to be used with Pry.

It turns this:

Before

Into this:

After

Themes

It's really easy to build your own theme!

Freedom

PryBloodline.configure do |c|
  c.line_color = :white
  c.name_color = :blue
  c.path_color = :red
  c.separator = "★"
  c.separator_color = :white
end

Freedom

Blood

PryBloodline.configure do |c|
  c.line_color = :light_white
  c.name_color = :light_red
  c.path_color = :red
  c.separator_color = :light_black
end

Blood

Thor

PryBloodline.configure do |c|
  c.line_color = :red
  c.name_color = :white
  c.path_color = :blue
  c.separator = "⚡"
end

Thor

Tropicana

PryBloodline.configure do |c|
  c.line_color = :light_green
  c.name_color = :light_yellow
  c.path_color = :light_red
  c.separator = "🍹"
end

Tropicana

Installation

Add this line to your application's Gemfile:

group :development, :test do
  gem 'pry-bloodline'
end

And then execute:

$ bundle

Or install it yourself as:

$ gem install pry-bloodline

Usage

Just run:

$ rails console

Or if you want to use it as your default pry shell, create a .pryrc file in your home folder:

require 'pry-bloodline'

PryBloodline.setup!

Then:

$ pry

Configuration

Here are all the fields you can configure:

PryBloodline.configure do |c|
  c.name = "pry"
  c.line_color = :light_black
  c.name_color = :green
  c.path_color = :light_blue
  c.separator = "\u00BB"
  c.separator_color = :light_green
  c.name_proc = -> { c.name.colorize(c.name_color) }
  c.line_proc = ->(obj, level, pry) { "[#{pry.input_array.size}]".colorize(c.line_color) }
  c.path_proc = ->(obj, level, pry) { "(#{Pry.view_clip(obj)})".colorize(c.path_color) }
  c.separator_proc = -> { c.separator.colorize(c.separator_color) }
end

This configuration yields this theme:

Custom

Also you can try out things live:

Live

Check the source code for more details on this ;)

Troubleshooting

I can't see the colors!!

Make sure your ruby is compiled with readline support. RVM should enable this by default, while for rbenv you can run:

brew install readline
RUBY_CONFIGURE_OPTS=--with-readline-dir="$(brew --prefix readline)" rbenv install 2.1.3

Contributing

  1. Fork it ( https://github.com/Arkham/pry-bloodline/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request