-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
94 changed files
with
2,191 additions
and
215 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--format progress | ||
--color | ||
--require spec_helper |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
language: ruby | ||
rvm: | ||
- 2.2.4 | ||
- 2.3.2 | ||
- 2.4.0 | ||
- 2.3.7 | ||
- 2.4.4 | ||
- 2.5.1 | ||
- ruby-head |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<%= content_tag :div, class: "exception", data: { status: @exception.status, response: @exception.response.to_s.humanize, rails: Rails.version }, onclick: ("location.href=\"#{root_url}\";" if @exception.status == "500" && Rails.application.routes.recognize_path("/")), title: ("Return Home" if @exception.status == "500" && Rails.application.routes.recognize_path("/")) do %> | ||
<%= content_tag :div, class: "exception", data: { status: @exception.status, response: @exception.response.to_s.humanize, rails: Rails.version }, onclick: ("location.href=\"#{root_url}\";" if @exception.status.to_s.first == "5" && Rails.application.routes.recognize_path("/")) do %> | ||
<%= content_tag :span, @exception.description.html_safe %> | ||
<% end %> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /></head> | ||
<body><%= yield %></body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= yield %> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
######################################## | ||
######################################## | ||
## _____ _ ## | ||
## | ___ \ | | ## | ||
## | |_/ /___ _ _| |_ ___ ___ ## | ||
## | // _ \| | | | __/ _ \/ __| ## | ||
## | |\ \ (_) | |_| | || __/\__ \ ## | ||
## \_| \_\___/ \__,_|\__\___||___/ ## | ||
## ## | ||
######################################## | ||
######################################## | ||
|
||
## Good resource | ||
## https://gist.github.com/maxivak/5d428ade54828836e6b6#merge-engine-and-app-routes | ||
|
||
######################################## | ||
######################################## | ||
|
||
## Routes ## | ||
Rails.application.routes.draw do | ||
|
||
######################################## | ||
######################################## | ||
|
||
# => ExceptionHandler | ||
# => Used to provide error page examples in "dev" mode | ||
if Object.const_defined?('ExceptionHandler') && ExceptionHandler.config.try(:dev) | ||
|
||
# => Items | ||
Rack::Utils::SYMBOL_TO_STATUS_CODE.select{ |key, value| value.to_s.match('\b(?:4[0-9]{2}|5[0-9]{2}|599)\b') }.each do |code, status| | ||
get status.to_s, to: 'exception_handler/exceptions#show', as: code, code: code | ||
end | ||
|
||
end | ||
|
||
######################################## | ||
######################################## | ||
|
||
end | ||
|
||
######################################## | ||
######################################## |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,16 +11,17 @@ require_relative 'lib/exception_handler/version' | |
Gem::Specification.new do |s| | ||
|
||
## General ## | ||
s.name = "exception_handler" | ||
s.authors = ["R.Peck"] | ||
s.email = ["[email protected]"] | ||
s.version = ExceptionHandler::VERSION::STRING | ||
s.platform = Gem::Platform::RUBY | ||
s.name = "exception_handler" | ||
s.authors = ["R.Peck"] | ||
s.email = ["[email protected]"] | ||
s.version = ExceptionHandler::VERSION::STRING | ||
s.platform = Gem::Platform::RUBY | ||
|
||
## Details ## | ||
s.summary = %q{Rails gem to show custom error pages in production. Also logs errors in db & sends notification emails} | ||
s.description = %q{Rails gem to create custom error pages. Captures exceptions using "exception_app" callback, routing to "Exception" controller, rendering the view as required.} | ||
s.homepage = "https://github.com/richpeck/exception_handler" | ||
s.summary = %q{Rails gem to show custom error pages in production. Also logs errors in db & sends notification emails} | ||
s.description = %q{Rails gem to create custom error pages. Captures exceptions using "exception_app" callback, routing to "Exception" controller, rendering the view as required.} | ||
s.post_install_message = %q{ExceptionHandler 0.8.0.0 → New "config" (config.exception_handler = {exceptions: {layout: 'x', notification: true, action: {redirect_to root_path} }} ). https://www.github.com/richpeck/exception_handler#config for more info. } | ||
s.homepage = "https://github.com/richpeck/exception_handler" | ||
|
||
## License ## | ||
s.license = "MIT" | ||
|
This file contains 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
Oops, something went wrong.