rambulance 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/.rspec +2 -0
- data/.travis.yml +21 -0
- data/Appraisals +28 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +114 -0
- data/Rakefile +25 -0
- data/gemfiles/rails_32.gemfile +9 -0
- data/gemfiles/rails_40.gemfile +9 -0
- data/gemfiles/rails_41.gemfile +9 -0
- data/gemfiles/rails_edge.gemfile +14 -0
- data/lib/generators/rambulance/exceptions_app_generator.rb +20 -0
- data/lib/generators/rambulance/install_generator.rb +47 -0
- data/lib/generators/rambulance/templates/exceptions_app.rb +13 -0
- data/lib/generators/rambulance/templates/rambulance.rb +43 -0
- data/lib/generators/rambulance/templates/views/bad_request.html.erb +58 -0
- data/lib/generators/rambulance/templates/views/bad_request.html.haml +54 -0
- data/lib/generators/rambulance/templates/views/bad_request.json.jbuilder +1 -0
- data/lib/generators/rambulance/templates/views/forbidden.html.erb +58 -0
- data/lib/generators/rambulance/templates/views/forbidden.html.haml +54 -0
- data/lib/generators/rambulance/templates/views/forbidden.json.jbuilder +1 -0
- data/lib/generators/rambulance/templates/views/internal_server_error.html.erb +58 -0
- data/lib/generators/rambulance/templates/views/internal_server_error.html.haml +54 -0
- data/lib/generators/rambulance/templates/views/internal_server_error.json.jbuilder +1 -0
- data/lib/generators/rambulance/templates/views/not_found.html.erb +59 -0
- data/lib/generators/rambulance/templates/views/not_found.html.haml +55 -0
- data/lib/generators/rambulance/templates/views/not_found.json.jbuilder +1 -0
- data/lib/generators/rambulance/templates/views/unprocessable_entity.html.erb +59 -0
- data/lib/generators/rambulance/templates/views/unprocessable_entity.html.haml +55 -0
- data/lib/generators/rambulance/templates/views/unprocessable_entity.json.jbuilder +1 -0
- data/lib/rambulance.rb +26 -0
- data/lib/rambulance/exceptions_app.rb +56 -0
- data/lib/rambulance/railtie.rb +26 -0
- data/lib/rambulance/version.rb +3 -0
- data/rambulance.gemspec +33 -0
- data/spec/fake_app/app/views/errors/internal_server_error.html.erb +1 -0
- data/spec/fake_app/app/views/errors/internal_server_error.json.jbuilder +1 -0
- data/spec/fake_app/app/views/errors/not_found.html.erb +1 -0
- data/spec/fake_app/app/views/errors/not_found.json.jbuilder +1 -0
- data/spec/fake_app/app/views/layouts/error.html.erb +10 -0
- data/spec/fake_app/lib/exceptions_app.rb +12 -0
- data/spec/fake_app/rails_app.rb +59 -0
- data/spec/requests/error_json_spec.rb +40 -0
- data/spec/requests/error_page_spec.rb +53 -0
- data/spec/spec_helper.rb +19 -0
- metadata +255 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
:css
|
2
|
+
div.dialog {
|
3
|
+
color: #2E2F30;
|
4
|
+
text-align: center;
|
5
|
+
font-family: arial, sans-serif;
|
6
|
+
margin: 0;
|
7
|
+
width: 95%;
|
8
|
+
max-width: 33em;
|
9
|
+
margin: 4em auto;
|
10
|
+
}
|
11
|
+
|
12
|
+
div.dialog > div {
|
13
|
+
border: 1px solid #CCC;
|
14
|
+
border-right-color: #999;
|
15
|
+
border-left-color: #999;
|
16
|
+
border-bottom-color: #BBB;
|
17
|
+
border-top: #B00100 solid 4px;
|
18
|
+
border-top-left-radius: 9px;
|
19
|
+
border-top-right-radius: 9px;
|
20
|
+
background-color: white;
|
21
|
+
padding: 7px 12% 0;
|
22
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
23
|
+
}
|
24
|
+
|
25
|
+
h1 {
|
26
|
+
font-size: 100%;
|
27
|
+
color: #730E15;
|
28
|
+
line-height: 1.5em;
|
29
|
+
margin: 10px 0;
|
30
|
+
}
|
31
|
+
|
32
|
+
div.dialog p {
|
33
|
+
margin: 16px 0;
|
34
|
+
}
|
35
|
+
|
36
|
+
div.dialog > p {
|
37
|
+
margin: 0 0 1em;
|
38
|
+
padding: 1em;
|
39
|
+
background-color: #F7F7F7;
|
40
|
+
border: 1px solid #CCC;
|
41
|
+
border-right-color: #999;
|
42
|
+
border-left-color: #999;
|
43
|
+
border-bottom-color: #999;
|
44
|
+
border-bottom-left-radius: 4px;
|
45
|
+
border-bottom-right-radius: 4px;
|
46
|
+
border-top-color: #DADADA;
|
47
|
+
color: #666;
|
48
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
49
|
+
}
|
50
|
+
/ This file lives in app/views/errors/unprocessable_entity.html.erb
|
51
|
+
.dialog
|
52
|
+
%div
|
53
|
+
%h1 The change you wanted was rejected.
|
54
|
+
%p Maybe you tried to change something you didn't have access to.
|
55
|
+
%p If you are the application owner check the logs for more information.
|
@@ -0,0 +1 @@
|
|
1
|
+
json.error_message "The change you wanted was rejected. Maybe you tried to change something you didn't have access to."
|
data/lib/rambulance.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require "rambulance/version"
|
2
|
+
require "rambulance/railtie"
|
3
|
+
|
4
|
+
module Rambulance
|
5
|
+
|
6
|
+
# List of custom pairs of cexception/corresponding http status.
|
7
|
+
mattr_reader :rescue_responses
|
8
|
+
@@rescue_responses = {}
|
9
|
+
|
10
|
+
# The template name for the layout of the error pages.
|
11
|
+
mattr_accessor :layout_name
|
12
|
+
@@layout_name = "error"
|
13
|
+
|
14
|
+
# The directry name to organize error page templates.
|
15
|
+
mattr_accessor :view_path
|
16
|
+
@@view_path = "errors"
|
17
|
+
|
18
|
+
def self.rescue_responses=(rescue_responses)
|
19
|
+
@@rescue_responses = rescue_responses
|
20
|
+
ActionDispatch::ExceptionWrapper.rescue_responses.merge!(rescue_responses)
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.setup
|
24
|
+
yield self
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Rambulance
|
2
|
+
ERROR_HTTP_STATUSES = Rack::Utils::SYMBOL_TO_STATUS_CODE.select do |status_in_words, http_status|
|
3
|
+
# Exclude http statuses that:
|
4
|
+
# * represent a successful status(2xx, 3xx)
|
5
|
+
# * are unassigned(427, 430, 509)
|
6
|
+
# * is a joke definition(418)
|
7
|
+
http_status >= 400 && ![418, 427, 430, 509].include?(http_status)
|
8
|
+
end.invert
|
9
|
+
|
10
|
+
class ExceptionsApp < ActionController::Base
|
11
|
+
layout Rambulance.layout_name
|
12
|
+
|
13
|
+
def self.call(env)
|
14
|
+
exception = env["action_dispatch.exception"]
|
15
|
+
status_in_words = if exception
|
16
|
+
ActionDispatch::ExceptionWrapper.rescue_responses[exception.class.to_s]
|
17
|
+
else
|
18
|
+
env["PATH_INFO"][1..-1].to_sym.tap do |status_in_words|
|
19
|
+
env["PATH_INFO"] = "/#{Rack::Utils::SYMBOL_TO_STATUS_CODE[status_in_words]}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
action(status_in_words).call(env)
|
24
|
+
end
|
25
|
+
|
26
|
+
ERROR_HTTP_STATUSES.values.each do |status_in_words|
|
27
|
+
eval <<-ACTION
|
28
|
+
def #{status_in_words}
|
29
|
+
render(template_exists?(error_path) ? error_path : error_path(:internal_server_error))
|
30
|
+
end
|
31
|
+
ACTION
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def send_action(name, *args)
|
37
|
+
@_status = env["PATH_INFO"][1..-1].to_i
|
38
|
+
@_response.status = @_status
|
39
|
+
@_body = { :status => @_status, :error => Rack::Utils::HTTP_STATUS_CODES.fetch(@_status.to_i, Rack::Utils::HTTP_STATUS_CODES[500]) }
|
40
|
+
|
41
|
+
super
|
42
|
+
end
|
43
|
+
|
44
|
+
def status_in_words
|
45
|
+
ERROR_HTTP_STATUSES[status.to_i]
|
46
|
+
end
|
47
|
+
|
48
|
+
def exception
|
49
|
+
env["action_dispatch.exception"]
|
50
|
+
end
|
51
|
+
|
52
|
+
def error_path(status_in_words = status_in_words())
|
53
|
+
"#{Rambulance.view_path}/#{status_in_words}"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Rambulance
|
2
|
+
class Railtie < Rails::Railtie
|
3
|
+
initializer "action_controller" do |app|
|
4
|
+
require "rambulance/exceptions_app"
|
5
|
+
end
|
6
|
+
|
7
|
+
initializer "activesupport.dependencies" do |app|
|
8
|
+
begin
|
9
|
+
ActiveSupport::Dependencies.load_missing_constant(Object, :ExceptionsApp)
|
10
|
+
app.config.exceptions_app = ->(env){ ::ExceptionsApp.call(env) }
|
11
|
+
rescue NameError
|
12
|
+
app.config.exceptions_app = ::Rambulance::ExceptionsApp
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
initializer 'rambulance' do |app|
|
17
|
+
ActiveSupport.on_load(:after_initialize) do
|
18
|
+
if Rails.env.development?
|
19
|
+
Rails.application.routes.append do
|
20
|
+
mount app.config.exceptions_app, at: '/rambulance'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/rambulance.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "rambulance/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rambulance"
|
8
|
+
spec.version = Rambulance::VERSION
|
9
|
+
spec.authors = ["Yuki Nishijima"]
|
10
|
+
spec.email = ["mail@yukinishijima.net"]
|
11
|
+
spec.summary = %q{Simple and safe way to dynamically generate error pages}
|
12
|
+
spec.description = %q{Rambulance provides a simple and safe way to dynamically generate error pages.}
|
13
|
+
spec.homepage = "http://github.com/yuki24/rambulance"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "activesupport"
|
22
|
+
spec.add_dependency "actionpack"
|
23
|
+
spec.add_dependency "railties"
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
26
|
+
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency "tzinfo"
|
28
|
+
spec.add_development_dependency "jbuilder"
|
29
|
+
spec.add_development_dependency "rspec"
|
30
|
+
spec.add_development_dependency "rspec-rails", '~> 2.14.1'
|
31
|
+
spec.add_development_dependency "capybara"
|
32
|
+
spec.add_development_dependency "appraisal"
|
33
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Something went wrong.
|
@@ -0,0 +1 @@
|
|
1
|
+
json.message "Something went wrong"
|
@@ -0,0 +1 @@
|
|
1
|
+
Page not found.
|
@@ -0,0 +1 @@
|
|
1
|
+
json.message "Page not found"
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# require 'rails/all'
|
2
|
+
require 'action_controller/railtie'
|
3
|
+
require 'action_view/railtie'
|
4
|
+
require 'jbuilder'
|
5
|
+
|
6
|
+
# config
|
7
|
+
app = Class.new(Rails::Application)
|
8
|
+
app.config.secret_token = '964ab2f0fbbb68bc36f3cc487ca296bb8555fac50627924024c245a1599e5265'
|
9
|
+
app.config.session_store :cookie_store, :key => '_myapp_session'
|
10
|
+
app.config.active_support.deprecation = :log
|
11
|
+
app.config.eager_load = false
|
12
|
+
|
13
|
+
# Rais.root
|
14
|
+
app.config.root = File.dirname(__FILE__)
|
15
|
+
app.config.autoload_paths += ["#{app.config.root}/lib"] if ENV["CUSTOM_EXCEPTIONS_APP"]
|
16
|
+
Rails.backtrace_cleaner.remove_silencers!
|
17
|
+
app.initialize!
|
18
|
+
|
19
|
+
# routes
|
20
|
+
app.routes.draw do
|
21
|
+
resources :users
|
22
|
+
end
|
23
|
+
|
24
|
+
# custom exception class
|
25
|
+
class CustomException < StandardError; end
|
26
|
+
|
27
|
+
Rambulance.setup do |config|
|
28
|
+
config.rescue_responses = {
|
29
|
+
'CustomException' => :not_found
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# controllers
|
34
|
+
class ApplicationController < ActionController::Base
|
35
|
+
append_view_path "spec/fake_app/views"
|
36
|
+
before_filter :bad_filter
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def bad_filter
|
41
|
+
raise "This is a bad filter."
|
42
|
+
end
|
43
|
+
end
|
44
|
+
class UsersController < ApplicationController
|
45
|
+
skip_filter :bad_filter, except: :show
|
46
|
+
|
47
|
+
def index
|
48
|
+
raise CustomException
|
49
|
+
end
|
50
|
+
|
51
|
+
def show; end
|
52
|
+
|
53
|
+
def new
|
54
|
+
raise ActionController::InvalidAuthenticityToken
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# helpers
|
59
|
+
Object.const_set(:ApplicationHelper, Module.new)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
feature 'Error json responses', if: !ENV["CUSTOM_EXCEPTIONS_APP"] do
|
5
|
+
def json_response
|
6
|
+
JSON.parse(response.body)
|
7
|
+
end
|
8
|
+
|
9
|
+
def get(path)
|
10
|
+
super(path, nil, "CONTENT_TYPE" => "application/json", "HTTP_ACCEPT" => "application/json")
|
11
|
+
end
|
12
|
+
|
13
|
+
scenario 'Unprocessable entity due to ActionController:InvalidAuthenticityToken but without its template' do
|
14
|
+
get '/users/new'
|
15
|
+
|
16
|
+
response.status.should == 422
|
17
|
+
json_response['message'].should == "Something went wrong"
|
18
|
+
end
|
19
|
+
|
20
|
+
scenario 'Internal server error due to RuntimeError' do
|
21
|
+
get '/users/1.json'
|
22
|
+
|
23
|
+
response.status.should == 500
|
24
|
+
json_response['message'].should == "Something went wrong"
|
25
|
+
end
|
26
|
+
|
27
|
+
scenario 'Not found due to CustomException' do
|
28
|
+
get '/users.json'
|
29
|
+
|
30
|
+
response.status.should == 404
|
31
|
+
json_response['message'].should == "Page not found"
|
32
|
+
end
|
33
|
+
|
34
|
+
scenario 'Not found due to ActinoController::RoutingError' do
|
35
|
+
get '/doesnt_exist.json'
|
36
|
+
|
37
|
+
response.status.should == 404
|
38
|
+
json_response['message'].should == "Page not found"
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
feature 'Error pages' do
|
5
|
+
shared_examples_for "an action that renders 500 page if the template is missing" do
|
6
|
+
scenario 'Unprocessable entity due to ActionController:InvalidAuthenticityToken but without its template' do
|
7
|
+
visit '/users/new'
|
8
|
+
|
9
|
+
page.status_code.should == 422
|
10
|
+
page.body.should have_content "Error page"
|
11
|
+
page.body.should have_content "Something went wrong."
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'with the default exceptions app', if: !ENV["CUSTOM_EXCEPTIONS_APP"] do
|
16
|
+
it_behaves_like "an action that renders 500 page if the template is missing"
|
17
|
+
|
18
|
+
scenario 'Internal server error due to RuntimeError' do
|
19
|
+
visit '/users/1'
|
20
|
+
|
21
|
+
page.status_code.should == 500
|
22
|
+
page.body.should have_content "Error page"
|
23
|
+
page.body.should have_content "Something went wrong."
|
24
|
+
end
|
25
|
+
|
26
|
+
scenario 'Not found due to CustomException' do
|
27
|
+
visit '/users'
|
28
|
+
|
29
|
+
page.status_code.should == 404
|
30
|
+
page.body.should have_content "Error page"
|
31
|
+
page.body.should have_content "Page not found."
|
32
|
+
end
|
33
|
+
|
34
|
+
scenario 'Not found due to ActinoController::RoutingError' do
|
35
|
+
visit '/doesnt_exist'
|
36
|
+
|
37
|
+
page.status_code.should == 404
|
38
|
+
page.body.should have_content "Error page"
|
39
|
+
page.body.should have_content "Page not found."
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
context "With a custom exception app", if: ENV["CUSTOM_EXCEPTIONS_APP"] do
|
44
|
+
it_behaves_like "an action that renders 500 page if the template is missing"
|
45
|
+
|
46
|
+
scenario 'Internal server error due to RuntimeError' do
|
47
|
+
visit '/users/1'
|
48
|
+
|
49
|
+
page.status_code.should == 500
|
50
|
+
page.body.should have_content "Custom error page"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
|
4
|
+
require 'rails'
|
5
|
+
|
6
|
+
require 'bundler/setup'
|
7
|
+
Bundler.require
|
8
|
+
|
9
|
+
require 'capybara/rspec'
|
10
|
+
require 'fake_app/rails_app'
|
11
|
+
require 'rspec/rails'
|
12
|
+
|
13
|
+
# Requires supporting files with custom matchers and macros, etc,
|
14
|
+
# in ./support/ and its subdirectories.
|
15
|
+
# Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f }
|
16
|
+
|
17
|
+
# RSpec.configure do |config|
|
18
|
+
#
|
19
|
+
# end
|
metadata
ADDED
@@ -0,0 +1,255 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rambulance
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yuki Nishijima
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-06-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: actionpack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: railties
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: tzinfo
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jbuilder
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec-rails
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 2.14.1
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 2.14.1
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: capybara
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: appraisal
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: Rambulance provides a simple and safe way to dynamically generate error
|
168
|
+
pages.
|
169
|
+
email:
|
170
|
+
- mail@yukinishijima.net
|
171
|
+
executables: []
|
172
|
+
extensions: []
|
173
|
+
extra_rdoc_files: []
|
174
|
+
files:
|
175
|
+
- ".gitignore"
|
176
|
+
- ".rspec"
|
177
|
+
- ".travis.yml"
|
178
|
+
- Appraisals
|
179
|
+
- Gemfile
|
180
|
+
- LICENSE.txt
|
181
|
+
- README.md
|
182
|
+
- Rakefile
|
183
|
+
- gemfiles/rails_32.gemfile
|
184
|
+
- gemfiles/rails_40.gemfile
|
185
|
+
- gemfiles/rails_41.gemfile
|
186
|
+
- gemfiles/rails_edge.gemfile
|
187
|
+
- lib/generators/rambulance/exceptions_app_generator.rb
|
188
|
+
- lib/generators/rambulance/install_generator.rb
|
189
|
+
- lib/generators/rambulance/templates/exceptions_app.rb
|
190
|
+
- lib/generators/rambulance/templates/rambulance.rb
|
191
|
+
- lib/generators/rambulance/templates/views/bad_request.html.erb
|
192
|
+
- lib/generators/rambulance/templates/views/bad_request.html.haml
|
193
|
+
- lib/generators/rambulance/templates/views/bad_request.json.jbuilder
|
194
|
+
- lib/generators/rambulance/templates/views/forbidden.html.erb
|
195
|
+
- lib/generators/rambulance/templates/views/forbidden.html.haml
|
196
|
+
- lib/generators/rambulance/templates/views/forbidden.json.jbuilder
|
197
|
+
- lib/generators/rambulance/templates/views/internal_server_error.html.erb
|
198
|
+
- lib/generators/rambulance/templates/views/internal_server_error.html.haml
|
199
|
+
- lib/generators/rambulance/templates/views/internal_server_error.json.jbuilder
|
200
|
+
- lib/generators/rambulance/templates/views/not_found.html.erb
|
201
|
+
- lib/generators/rambulance/templates/views/not_found.html.haml
|
202
|
+
- lib/generators/rambulance/templates/views/not_found.json.jbuilder
|
203
|
+
- lib/generators/rambulance/templates/views/unprocessable_entity.html.erb
|
204
|
+
- lib/generators/rambulance/templates/views/unprocessable_entity.html.haml
|
205
|
+
- lib/generators/rambulance/templates/views/unprocessable_entity.json.jbuilder
|
206
|
+
- lib/rambulance.rb
|
207
|
+
- lib/rambulance/exceptions_app.rb
|
208
|
+
- lib/rambulance/railtie.rb
|
209
|
+
- lib/rambulance/version.rb
|
210
|
+
- rambulance.gemspec
|
211
|
+
- spec/fake_app/app/views/errors/internal_server_error.html.erb
|
212
|
+
- spec/fake_app/app/views/errors/internal_server_error.json.jbuilder
|
213
|
+
- spec/fake_app/app/views/errors/not_found.html.erb
|
214
|
+
- spec/fake_app/app/views/errors/not_found.json.jbuilder
|
215
|
+
- spec/fake_app/app/views/layouts/error.html.erb
|
216
|
+
- spec/fake_app/lib/exceptions_app.rb
|
217
|
+
- spec/fake_app/rails_app.rb
|
218
|
+
- spec/requests/error_json_spec.rb
|
219
|
+
- spec/requests/error_page_spec.rb
|
220
|
+
- spec/spec_helper.rb
|
221
|
+
homepage: http://github.com/yuki24/rambulance
|
222
|
+
licenses:
|
223
|
+
- MIT
|
224
|
+
metadata: {}
|
225
|
+
post_install_message:
|
226
|
+
rdoc_options: []
|
227
|
+
require_paths:
|
228
|
+
- lib
|
229
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
230
|
+
requirements:
|
231
|
+
- - ">="
|
232
|
+
- !ruby/object:Gem::Version
|
233
|
+
version: '0'
|
234
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
235
|
+
requirements:
|
236
|
+
- - ">="
|
237
|
+
- !ruby/object:Gem::Version
|
238
|
+
version: '0'
|
239
|
+
requirements: []
|
240
|
+
rubyforge_project:
|
241
|
+
rubygems_version: 2.2.2
|
242
|
+
signing_key:
|
243
|
+
specification_version: 4
|
244
|
+
summary: Simple and safe way to dynamically generate error pages
|
245
|
+
test_files:
|
246
|
+
- spec/fake_app/app/views/errors/internal_server_error.html.erb
|
247
|
+
- spec/fake_app/app/views/errors/internal_server_error.json.jbuilder
|
248
|
+
- spec/fake_app/app/views/errors/not_found.html.erb
|
249
|
+
- spec/fake_app/app/views/errors/not_found.json.jbuilder
|
250
|
+
- spec/fake_app/app/views/layouts/error.html.erb
|
251
|
+
- spec/fake_app/lib/exceptions_app.rb
|
252
|
+
- spec/fake_app/rails_app.rb
|
253
|
+
- spec/requests/error_json_spec.rb
|
254
|
+
- spec/requests/error_page_spec.rb
|
255
|
+
- spec/spec_helper.rb
|