Created
December 16, 2012 14:09
-
-
Save tyabe/4307628 to your computer and use it in GitHub Desktop.
This is Padrino Plugin for better_errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Better Errors plugin on Padrino | |
# | |
# https://github.com/charliesome/better_errors | |
# | |
GEMFILE = <<-GEMFILE | |
# Better Errors | |
group :development do | |
gem "better_errors" | |
gem "binding_of_caller" | |
end | |
GEMFILE | |
append_file("Gemfile", GEMFILE) | |
CONFIG = <<-CONFIG | |
# Setup better_errors | |
if Padrino.env == :development | |
require 'better_errors' | |
Padrino::Application.use BetterErrors::Middleware | |
BetterErrors.application_root = PADRINO_ROOT | |
BetterErrors.logger = Padrino.logger | |
end | |
CONFIG | |
inject_into_file destination_root('config/boot.rb'), CONFIG, :after => "Bundler.require(:default, PADRINO_ENV)\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment