exception_handler 0.7.5 → 0.8.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +5 -5
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +51 -33
  4. data/.rspec +3 -4
  5. data/.slugignore +7 -0
  6. data/.travis.yml +13 -5
  7. data/Gemfile +16 -13
  8. data/README.md +643 -443
  9. data/Rakefile +7 -7
  10. data/app/assets/stylesheets/exception_handler.css.erb +23 -18
  11. data/app/assets/stylesheets/styles/_base.css.erb +28 -35
  12. data/app/assets/stylesheets/styles/_exception.css.erb +106 -105
  13. data/app/assets/stylesheets/styles/_footer.css.erb +24 -24
  14. data/app/assets/stylesheets/styles/_responsive.css +5 -5
  15. data/app/controllers/exception_handler/exceptions_controller.rb +66 -55
  16. data/app/mailers/exception_handler/exception_mailer.rb +17 -17
  17. data/app/models/exception_handler/exception.rb +200 -191
  18. data/app/views/exception_handler/exceptions/show.html.erb +3 -3
  19. data/app/views/exception_handler/mailers/layout.haml +8 -8
  20. data/app/views/exception_handler/mailers/layout.text.erb +1 -1
  21. data/app/views/exception_handler/mailers/new_exception.erb +4 -4
  22. data/app/views/layouts/exception.html.erb +32 -27
  23. data/app/views/layouts/mailer.html.erb +5 -0
  24. data/app/views/layouts/mailer.text.erb +1 -0
  25. data/config/locales/exception_handler.en.yml +28 -29
  26. data/config/routes.rb +42 -0
  27. data/db/migrate/000000_create_errors.rb +34 -34
  28. data/exception_handler.gemspec +64 -80
  29. data/lib/exception_handler.rb +56 -45
  30. data/lib/exception_handler/config.rb +185 -103
  31. data/lib/exception_handler/engine.rb +78 -60
  32. data/lib/exception_handler/version.rb +25 -0
  33. data/lib/generators/exception_handler/views_generator.rb +33 -33
  34. data/spec/controllers/controller_spec.rb +107 -0
  35. data/spec/dummy/.rspec +1 -0
  36. data/spec/dummy/.ruby-version +1 -0
  37. data/spec/dummy/Rakefile +6 -6
  38. data/spec/dummy/app/assets/config/manifest.js +3 -4
  39. data/spec/dummy/app/assets/javascripts/application.js +15 -13
  40. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  41. data/spec/dummy/app/assets/stylesheets/application.css +15 -15
  42. data/spec/dummy/app/channels/application_cable/channel.rb +4 -5
  43. data/spec/dummy/app/channels/application_cable/connection.rb +4 -5
  44. data/spec/dummy/app/controllers/application_controller.rb +2 -5
  45. data/spec/dummy/app/helpers/application_helper.rb +2 -2
  46. data/spec/dummy/app/jobs/application_job.rb +2 -2
  47. data/spec/dummy/app/mailers/application_mailer.rb +4 -4
  48. data/spec/dummy/app/models/application_record.rb +3 -3
  49. data/spec/dummy/app/views/layouts/application.html.erb +15 -15
  50. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -13
  51. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -1
  52. data/spec/dummy/bin/bundle +3 -3
  53. data/spec/dummy/bin/rails +4 -4
  54. data/spec/dummy/bin/rake +4 -4
  55. data/spec/dummy/bin/setup +36 -34
  56. data/spec/dummy/bin/update +31 -29
  57. data/spec/dummy/bin/yarn +11 -0
  58. data/spec/dummy/config.ru +5 -8
  59. data/spec/dummy/config/application.rb +18 -21
  60. data/spec/dummy/config/boot.rb +5 -5
  61. data/spec/dummy/config/cable.yml +10 -10
  62. data/spec/dummy/config/database.yml +25 -25
  63. data/spec/dummy/config/environment.rb +5 -5
  64. data/spec/dummy/config/environments/development.rb +61 -62
  65. data/spec/dummy/config/environments/production.rb +94 -87
  66. data/spec/dummy/config/environments/test.rb +46 -42
  67. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -6
  68. data/spec/dummy/config/initializers/assets.rb +14 -11
  69. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
  70. data/spec/dummy/config/initializers/content_security_policy.rb +25 -0
  71. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -5
  72. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -4
  73. data/spec/dummy/config/initializers/inflections.rb +16 -16
  74. data/spec/dummy/config/initializers/mime_types.rb +4 -4
  75. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
  76. data/spec/dummy/config/locales/en.yml +33 -23
  77. data/spec/dummy/config/puma.rb +34 -47
  78. data/spec/dummy/config/routes.rb +3 -6
  79. data/spec/dummy/config/storage.yml +34 -0
  80. data/spec/dummy/package.json +5 -0
  81. data/spec/dummy/public/404.html +67 -67
  82. data/spec/dummy/public/422.html +67 -67
  83. data/spec/dummy/public/500.html +66 -66
  84. data/spec/dummy/spec/rails_helper.rb +57 -0
  85. data/spec/dummy/spec/spec_helper.rb +100 -0
  86. data/spec/dummy/storage/.keep +0 -0
  87. data/spec/features/asset_spec.rb +61 -0
  88. data/spec/features/config_spec.rb +51 -0
  89. data/spec/features/engine_spec.rb +180 -0
  90. data/spec/mailers/mailer_spec.rb +26 -0
  91. data/spec/models/model_spec.rb +26 -0
  92. data/spec/routing/routing_spec.rb +85 -0
  93. data/spec/spec_helper.rb +101 -55
  94. data/spec/views/views_spec.rb +29 -0
  95. metadata +54 -28
  96. data/.gitattributes +0 -1
  97. data/LICENSE.txt +0 -22
  98. data/app/assets/images/exception_handler/bg.jpg +0 -0
  99. data/app/assets/images/exception_handler/bg_overlay.png +0 -0
  100. data/spec/database.yml +0 -3
  101. data/spec/dummy/app/assets/javascripts/cable.coffee +0 -11
  102. data/spec/dummy/config/initializers/active_record_belongs_to_required_by_default.rb +0 -6
  103. data/spec/dummy/config/initializers/callback_terminator.rb +0 -6
  104. data/spec/dummy/config/initializers/per_form_csrf_tokens.rb +0 -4
  105. data/spec/dummy/config/initializers/request_forgery_protection.rb +0 -4
  106. data/spec/dummy/config/initializers/session_store.rb +0 -3
  107. data/spec/dummy/config/secrets.yml +0 -22
  108. data/spec/exception_handler.rb +0 -22
  109. data/spec/exception_handler/exception_controller_spec.rb +0 -18
@@ -1 +1 @@
1
- <%= yield %>
1
+ <%= yield %>
@@ -1,4 +1,4 @@
1
- <h1><%= Rails.application.class.parent_name %> (<%= Rails.env.titleize %>)</h1>
2
-
3
- <strong><u><%= @exception.response %> (<%= @exception.status %>)</u></strong>
4
- <p><%= @exception.message %></p>
1
+ <h1><%= Rails.application.class.parent_name %> (<%= Rails.env.titleize %>)</h1>
2
+
3
+ <strong><u><%= @exception.response %> (<%= @exception.status %>)</u></strong>
4
+ <p><%= @exception.message %></p>
@@ -1,27 +1,32 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <!-- Head -->
4
- <head>
5
- <!-- Info -->
6
- <%= content_tag :title, "Error - #{@exception.status} (#{@exception.response.to_s.gsub("_", " ").titleize}) | #{Rails.application.class.parent_name.titleize}" %>
7
-
8
- <!-- Styling -->
9
- <%= stylesheet_link_tag :exception_handler %>
10
- <%= favicon_link_tag "exception_handler/favicon.ico" %>
11
-
12
- <!-- Auth -->
13
- <%= csrf_meta_tags %>
14
- </head>
15
-
16
- <!-- Body -->
17
- <%= content_tag :body, yield %>
18
-
19
- <!-- Footer -->
20
- <% if ExceptionHandler.config.try(:social) %>
21
- <%= content_tag :footer do %>
22
- <% ExceptionHandler.config.social.each do |k,v| %>
23
- <%= link_to image_tag("exception_handler/connect/#{k}.png"), ExceptionHandler::Config::SOCIAL[k] + "/" + v, id: k, title: "#{k.to_s.titleize} Feed", target: :blank if v %>
24
- <% end %>
25
- <% end %>
26
- <% end %>
27
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <!-- Head -->
4
+ <head>
5
+ <!-- Info -->
6
+ <%= content_tag :title, "Error - #{@exception.status} (#{@exception.response.to_s.gsub("_", " ").titleize})" %>
7
+
8
+ <!-- Styling -->
9
+ <%= stylesheet_link_tag :exception_handler %>
10
+ <%= favicon_link_tag "exception_handler/favicon.ico" %>
11
+
12
+ <% if x = ExceptionHandler.config.options(@exception.status) %>
13
+ <style>body { background: url("<%= asset_path x %>") center center no-repeat !important; background-size: cover !important; }</style>
14
+ <% end %>
15
+
16
+ <!-- Auth -->
17
+ <%= csrf_meta_tags %>
18
+ </head>
19
+
20
+ <!-- Body -->
21
+ <%= content_tag :body, yield %>
22
+
23
+ <!-- Footer -->
24
+ <% if ExceptionHandler.config.try(:social) %>
25
+ <%= content_tag :footer do %>
26
+ <% ExceptionHandler.config.social.each do |k,v| %>
27
+ <%= link_to image_tag("exception_handler/connect/#{k}.png"), ExceptionHandler::Config::SOCIAL[k] + "/" + v, id: k, title: "#{k.to_s.titleize} Feed", target: :blank if v %>
28
+ <% end %>
29
+ <% end %>
30
+ <% end %>
31
+
32
+ </html>
@@ -0,0 +1,5 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /></head>
4
+ <body><%= yield %></body>
5
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -1,29 +1,28 @@
1
- #######################################################################################
2
- #######################################################################################
3
- ## _____ _ _ _ _ _ _ ##
4
- ## | ___| | | (_) | | | | | | | ##
5
- ## | |____ _____ ___ _ __ | |_ _ ___ _ __ | |_| | __ _ _ __ __| | | ___ _ __ ##
6
- ## | __\ \/ / __/ _ \ '_ \| __| |/ _ \| '_ \ | _ |/ _` | '_ \ / _` | |/ _ \ '__| ##
7
- ## | |___> < (_| __/ |_) | |_| | (_) | | | | | | | | (_| | | | | (_| | | __/ | ##
8
- ## \____/_/\_\___\___| .__/ \__|_|\___/|_| |_| \_| |_/\__,_|_| |_|\__,_|_|\___|_| ##
9
- ## | | ##
10
- ## |_| ##
11
- #######################################################################################
12
- #######################################################################################
13
-
14
- # Have to use strings rather than integers
15
- # https://github.com/rack/rack/blob/1.5.2/lib/rack/utils.rb#L544
16
-
17
- # By default, exceptions will show their "response" code (404 = "Not Found")
18
- # If you want to create custom messages, you have to assign the values as [response]: "message"
19
-
20
- #######################################################################################
21
- #######################################################################################
22
-
23
- en:
24
- exception_handler:
25
- not_found: "Page missing"
26
- internal_server_error: "<strong>%{status} Error</strong> %{message} <p>Return home</p>"
27
-
28
- #######################################################################################
29
- #######################################################################################
1
+ #######################################################################################
2
+ #######################################################################################
3
+ ## _____ _ _ _ _ _ _ ##
4
+ ## | ___| | | (_) | | | | | | | ##
5
+ ## | |____ _____ ___ _ __ | |_ _ ___ _ __ | |_| | __ _ _ __ __| | | ___ _ __ ##
6
+ ## | __\ \/ / __/ _ \ '_ \| __| |/ _ \| '_ \ | _ |/ _` | '_ \ / _` | |/ _ \ '__| ##
7
+ ## | |___> < (_| __/ |_) | |_| | (_) | | | | | | | | (_| | | | | (_| | | __/ | ##
8
+ ## \____/_/\_\___\___| .__/ \__|_|\___/|_| |_| \_| |_/\__,_|_| |_|\__,_|_|\___|_| ##
9
+ ## | | ##
10
+ ## |_| ##
11
+ #######################################################################################
12
+ #######################################################################################
13
+
14
+ # Have to use strings rather than integers
15
+ # https://github.com/rack/rack/blob/1.5.2/lib/rack/utils.rb#L544
16
+
17
+ # By default, exceptions will show their "response" code (404 = "Not Found")
18
+ # If you want to create custom messages, you have to assign the values as [response]: "message"
19
+
20
+ #######################################################################################
21
+ #######################################################################################
22
+
23
+ en:
24
+ exception_handler:
25
+ internal_server_error: "<strong>%{status} Error</strong> %{message}"
26
+
27
+ #######################################################################################
28
+ #######################################################################################
data/config/routes.rb ADDED
@@ -0,0 +1,42 @@
1
+ ########################################
2
+ ########################################
3
+ ## _____ _ ##
4
+ ## | ___ \ | | ##
5
+ ## | |_/ /___ _ _| |_ ___ ___ ##
6
+ ## | // _ \| | | | __/ _ \/ __| ##
7
+ ## | |\ \ (_) | |_| | || __/\__ \ ##
8
+ ## \_| \_\___/ \__,_|\__\___||___/ ##
9
+ ## ##
10
+ ########################################
11
+ ########################################
12
+
13
+ ## Good resource
14
+ ## https://gist.github.com/maxivak/5d428ade54828836e6b6#merge-engine-and-app-routes
15
+
16
+ ########################################
17
+ ########################################
18
+
19
+ ## Routes ##
20
+ Rails.application.routes.draw do
21
+
22
+ ########################################
23
+ ########################################
24
+
25
+ # => ExceptionHandler
26
+ # => Used to provide error page examples in "dev" mode
27
+ if Object.const_defined?('ExceptionHandler') && ExceptionHandler.config.try(:dev)
28
+
29
+ # => Items
30
+ 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|
31
+ get status.to_s, to: 'exception_handler/exceptions#show', as: code, code: code
32
+ end
33
+
34
+ end
35
+
36
+ ########################################
37
+ ########################################
38
+
39
+ end
40
+
41
+ ########################################
42
+ ########################################
@@ -1,34 +1,34 @@
1
- class CreateErrors < ActiveRecord::Migration[5.0]
2
-
3
- # => ATTRS
4
- require_relative "../../app/models/exception_handler/exception.rb"
5
-
6
- #########################################
7
- #########################################
8
-
9
- # => Defs
10
- @@table = ExceptionHandler.config.try(:db)
11
-
12
- #########################################
13
-
14
- # Up
15
- def up
16
- create_table @@table do |t|
17
- ExceptionHandler::ATTRS.each do |attr|
18
- t.text attr
19
- end
20
- t.timestamps
21
- end
22
- end
23
-
24
- #########################################
25
-
26
- # Down
27
- def down
28
- drop_table @@table, if_exists: true
29
- end
30
-
31
- #########################################
32
- #########################################
33
-
34
- end
1
+ class CreateErrors < ActiveRecord::Migration[5.0]
2
+
3
+ # => ATTRS
4
+ require_relative "../../app/models/exception_handler/exception.rb"
5
+
6
+ #########################################
7
+ #########################################
8
+
9
+ # => Defs
10
+ @@table = ExceptionHandler.config.try(:db)
11
+
12
+ #########################################
13
+
14
+ # Up
15
+ def up
16
+ create_table @@table do |t|
17
+ ExceptionHandler::ATTRS.each do |attr|
18
+ t.text attr
19
+ end
20
+ t.timestamps
21
+ end
22
+ end
23
+
24
+ #########################################
25
+
26
+ # Down
27
+ def down
28
+ drop_table @@table, if_exists: true
29
+ end
30
+
31
+ #########################################
32
+ #########################################
33
+
34
+ end
@@ -1,80 +1,64 @@
1
- # Dependencies
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
-
5
- ##############################################################
6
- ##############################################################
7
-
8
- # => Version
9
- # => https://github.com/rails/rails/blob/master/version.rb
10
- module ExceptionHandler
11
- module VERSION
12
- MAJOR = 0
13
- MINOR = 7
14
- TINY = 5
15
- PRE = nil # "alpha"
16
-
17
- STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
18
- end
19
- end
20
-
21
- ##############################################################
22
- ##############################################################
23
-
24
- # => Gem
25
- Gem::Specification.new do |s|
26
-
27
- ##############################################################
28
-
29
- # => General
30
- s.platform = Gem::Platform::RUBY
31
- s.name = "exception_handler"
32
- s.version = ExceptionHandler::VERSION::STRING
33
-
34
- # => Author
35
- s.authors = ["Richard Peck"]
36
- s.email = ["rpeck@frontlineutilities.co.uk"]
37
-
38
- # => Details
39
- s.summary = %q{Rails gem to show custom error pages in production. Also logs errors in db & sends notification emails}
40
- 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.}
41
- s.homepage = "http://github.com/richpeck/exception_handler"
42
-
43
- # => License
44
- s.license = "MIT"
45
-
46
- ##############################################################
47
-
48
- # => Files
49
- # => Remove "readme" dir from gem
50
- s.files = `git ls-files -z`.split("\x0")
51
- s.files.reject! { |fn| fn.include? "readme" } #-> https://github.com/gauntlt/gauntlt/blob/master/gauntlt.gemspec#L16
52
-
53
- s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
54
- s.test_files = s.files.grep(%r{^(test|spec|features)/}) unless RUBY_VERSION >= "2.2.0" #-> deprecated in Ruby 2.2.0
55
- s.require_paths = ["lib"]
56
-
57
- ##############################################################
58
-
59
- # => Ruby
60
- s.required_ruby_version = ">= 2.1.0"
61
-
62
- # => Runtime
63
- s.add_dependency "bundler", "~> 1.6"
64
- s.add_dependency "rails", ">= 4.2.0"
65
- s.add_dependency "responders"
66
-
67
- # => Extras
68
- s.add_development_dependency "autoprefixer-rails"
69
-
70
- # => Dev
71
- # => For testing etc
72
- s.add_development_dependency "rake"
73
- s.add_development_dependency "rspec"
74
- s.add_development_dependency "rspec-rails"
75
- s.add_development_dependency "sqlite3", ">= 1.3.10"
76
-
77
- ##############################################################
78
- ##############################################################
79
-
80
- end
1
+ ########################################################################################
2
+ ########################################################################################
3
+
4
+ # => Version
5
+ require_relative 'lib/exception_handler/version'
6
+
7
+ ##############################################################
8
+ ##############################################################
9
+
10
+ ## Specs ##
11
+ Gem::Specification.new do |s|
12
+
13
+ ## General ##
14
+ s.name = "exception_handler"
15
+ s.authors = ["R.Peck"]
16
+ s.email = ["rpeck@fl.co.uk"]
17
+ s.version = ExceptionHandler::VERSION::STRING
18
+ s.platform = Gem::Platform::RUBY
19
+
20
+ ## Details ##
21
+ s.summary = %q{Rails gem to show custom error pages in production. Also logs errors in db & sends notification emails}
22
+ 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.}
23
+ 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. }
24
+ s.homepage = "https://github.com/richpeck/exception_handler"
25
+
26
+ ## License ##
27
+ s.license = "MIT"
28
+
29
+ ##############################################################
30
+ ##############################################################
31
+
32
+ ## Files ##
33
+ s.files = `git ls-files -z`.split("\x0")
34
+ s.files.reject! { |fn| fn.include? "readme" } #-> https://github.com/gauntlt/gauntlt/blob/master/gauntlt.gemspec#L16
35
+
36
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
37
+ s.test_files = s.files.grep(%r{^(test|spec|features)/}) unless RUBY_VERSION >= "2.2.0" #-> deprecated in Ruby 2.2.0
38
+ s.require_paths = ["lib"]
39
+
40
+ ##############################################################
41
+ ##############################################################
42
+
43
+ ## Ruby ##
44
+ s.required_ruby_version = ">= 2.1.0"
45
+
46
+ ## Runtime
47
+ s.add_dependency "bundler"
48
+ s.add_dependency "rails", ">= 4.2.0"
49
+ s.add_dependency "responders"
50
+
51
+ ## Extras ##
52
+ s.add_development_dependency "autoprefixer-rails"
53
+
54
+ ## Dev ##
55
+ s.add_development_dependency "rake"
56
+ s.add_development_dependency "rspec"
57
+ s.add_development_dependency "rspec-rails"
58
+ s.add_development_dependency "coveralls"
59
+ s.add_development_dependency "sqlite3", ">= 1.3.10"
60
+
61
+ ##############################################################
62
+ ##############################################################
63
+
64
+ end
@@ -1,45 +1,56 @@
1
- #########################################################
2
- #########################################################
3
-
4
- module ExceptionHandler
5
-
6
- ##############################
7
- ##############################
8
-
9
- # => Table Prefix
10
- # => Keeps Rails Engine from generating all table prefixes with the engines name
11
- # => http://stackoverflow.com/questions/19435214/rails-mountable-engine-with-isolate-namespace-but-without-prefixed-namespace-on
12
- def self.table_name_prefix
13
- # => No prefix
14
- end
15
-
16
- # => Config
17
- # => Invoke instance of config (ExceptionHandler.config)
18
- mattr_accessor :config
19
-
20
- ##############################
21
- ##############################
22
-
23
- # => Exceptions
24
- # => https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/errors.rb
25
- class Error < StandardError; end
26
-
27
- ##############################
28
- ##############################
29
-
30
- end
31
-
32
- #########################################################
33
- #########################################################
34
-
35
- # => Libs
36
- # => http://stackoverflow.com/a/4528011/1143732
37
- # => http://stackoverflow.com/a/21693468/1143732
38
- # => https://github.com/jekyll/jekyll/blob/master/lib/jekyll.rb#L8
39
- Dir.glob(File.join(File.dirname(__FILE__), 'exception_handler', '**/*.rb'), &method(:require))
40
-
41
- # => External Dependencies
42
- require 'responders'
43
-
44
- #########################################################
45
- #########################################################
1
+ ########################################################################################
2
+ ########################################################################################
3
+ ## _____ _ _ _ _ _ _ ##
4
+ ## | ___| | | (_) | | | | | | | ##
5
+ ## | |____ _____ ___ _ __ | |_ _ ___ _ __ | |_| | __ _ _ __ __| | | ___ _ __ ##
6
+ ## | __\ \/ / __/ _ \ '_ \| __| |/ _ \| '_ \ | _ |/ _` | '_ \ / _` | |/ _ \ '__| ##
7
+ ## | |___> < (_| __/ |_) | |_| | (_) | | | | | | | | (_| | | | | (_| | | __/ | ##
8
+ ## \____/_/\_\___\___| .__/ \__|_|\___/|_| |_| \_| |_/\__,_|_| |_|\__,_|_|\___|_| ##
9
+ ## | | ##
10
+ ## |_| ##
11
+ ########################################################################################
12
+ ########################################################################################
13
+
14
+ module ExceptionHandler
15
+
16
+ ##############################
17
+ ##############################
18
+
19
+ # => Table Prefix
20
+ # => Keeps Rails Engine from generating all table prefixes with the engines name
21
+ # => http://stackoverflow.com/questions/19435214/rails-mountable-engine-with-isolate-namespace-but-without-prefixed-namespace-on
22
+ def self.table_name_prefix
23
+ # => No prefix
24
+ end
25
+
26
+ # => Config
27
+ # => Invoke instance of config (ExceptionHandler.config)
28
+ mattr_accessor :config
29
+
30
+ ##############################
31
+ ##############################
32
+
33
+ # => Exceptions
34
+ # => https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/errors.rb
35
+ class Error < StandardError; end
36
+
37
+ ##############################
38
+ ##############################
39
+
40
+
41
+ end
42
+
43
+ #########################################################
44
+ #########################################################
45
+
46
+ # => Libs
47
+ # => http://stackoverflow.com/a/4528011/1143732
48
+ # => http://stackoverflow.com/a/21693468/1143732
49
+ # => https://github.com/jekyll/jekyll/blob/master/lib/jekyll.rb#L8
50
+ Dir.glob(File.join(File.dirname(__FILE__), 'exception_handler', '**/*.rb'), &method(:require))
51
+
52
+ # => External Dependencies
53
+ require 'responders'
54
+
55
+ #########################################################
56
+ #########################################################