Replaces Middleman's built-in console with Pry, à la pry-rails.
Install the gem:
# Gemfile
gem 'middleman-pry'
$ bundle install
and activate the extension:
# config.rb
activate :pry
Start the Middleman console like normal:
$ middleman console
You should find yourself in an interactive Pry session in the context of your Middleman app:
middleman:~$ cd sitemap.resources.first
middleman:Middleman::Sitemap::Resource$ ls
Middleman::Sitemap::Resource#methods:
add_metadata blog_controller= instrument request_path url
app destination_path logger source_file
binary? destination_path= metadata store
blog_controller ext path template?
Middleman::Blog::BlogArticle#methods:
blog_data default_summary_generator previous_article summary
blog_options inspect published? tags
body lang render title
date next_article slug
middleman:Middleman::Sitemap::Resource$ url
=> "/use-pry-as-the-middleman-console/"