exception_handler 0.7.5.15 → 0.8.0.2

Sign up to get free protection for your applications and to get access to all the features.
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 -7
  6. data/.travis.yml +13 -5
  7. data/Gemfile +16 -13
  8. data/README.md +643 -436
  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 -59
  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 -28
  26. data/config/routes.rb +42 -0
  27. data/db/migrate/000000_create_errors.rb +34 -34
  28. data/exception_handler.gemspec +63 -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 +47 -24
  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
data/spec/database.yml DELETED
@@ -1,3 +0,0 @@
1
- test:
2
- adapter: sqlite3
3
- database: ":memory:" #-> https://github.com/thoughtbot/paperclip/blob/master/spec/database.yml
@@ -1,11 +0,0 @@
1
- # Action Cable provides the framework to deal with WebSockets in Rails.
2
- # You can generate new channels where WebSocket features live using the rails generate channel command.
3
- #
4
- # Turn on the cable connection by removing the comments after the require statements (and ensure it's also on in config/routes.rb).
5
- #
6
- #= require action_cable
7
- #= require_self
8
- #= require_tree ./channels
9
- #
10
- # @App ||= {}
11
- # App.cable = ActionCable.createConsumer()
@@ -1,6 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Require `belongs_to` associations by default. This is a new Rails 5.0
4
- # default, so it is introduced as a configuration option to ensure that apps
5
- # made on earlier versions of Rails are not affected when upgrading.
6
- Rails.application.config.active_record.belongs_to_required_by_default = true
@@ -1,6 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Do not halt callback chains when a callback returns false. This is a new
4
- # Rails 5.0 default, so it is introduced as a configuration option to ensure
5
- # that apps made with earlier versions of Rails are not affected when upgrading.
6
- ActiveSupport.halt_callback_chains_on_return_false = false
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Enable per-form CSRF tokens.
4
- Rails.application.config.action_controller.per_form_csrf_tokens = true
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Enable origin-checking CSRF mitigation.
4
- Rails.application.config.action_controller.forgery_protection_origin_check = true
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,22 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rails secret` to generate a secure secret key.
9
-
10
- # Make sure the secrets in this file are kept private
11
- # if you're sharing your code publicly.
12
-
13
- development:
14
- secret_key_base: 75c0b242a2ffad88f78f95aaa47045940d5788ccb97d4daf98bfc9eb011ea2c848e91c94aa5d284cd2bfef1e87ccba5f7a10227c8e3e05b0f3ecf68e3968e717
15
-
16
- test:
17
- secret_key_base: 7a1a9e0602a17584ab18b94687b2282df53258640fb390f9d84bbcd7ff3bf90d56dc04dff243438414b29e810fb1a0cbb2847fed617efeef8907041c778e9297
18
-
19
- # Do not keep production secrets in the repository,
20
- # instead read values from the environment.
21
- production:
22
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -1,22 +0,0 @@
1
- #####################################################
2
- ## ______ ##
3
- ## | ___ \ ##
4
- ## | |_/ / __ _ ___ ___ ##
5
- ## | ___ \/ _` / __|/ _ \ ##
6
- ## | |_/ / (_| \__ \ __/ ##
7
- ## \____/ \__,_|___/\___| ##
8
- ## ##
9
- #####################################################
10
-
11
- # Should test basic setup for further specs:
12
-
13
- # Rails env
14
- # Config options
15
- # Activerecord (connection)
16
-
17
- #####################################################
18
-
19
-
20
-
21
- #####################################################
22
- #####################################################
@@ -1,18 +0,0 @@
1
- require 'spec_helper'
2
-
3
- #####################################
4
- #####################################
5
-
6
- # => ExceptionController
7
- describe ExceptionHandler::ExceptionsController do
8
-
9
-
10
- # => @exception
11
- #context "@exception" do
12
- # it { is.expected.to respond_with 404}
13
- #end
14
-
15
- end
16
-
17
- #####################################
18
- #####################################