exception_handler 0.8.0.0 → 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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +1 -0
  4. data/.rspec +3 -3
  5. data/.travis.yml +6 -0
  6. data/README.md +327 -326
  7. data/app/views/layouts/exception.html.erb +1 -1
  8. data/app/views/layouts/mailer.html.erb +5 -5
  9. data/app/views/layouts/mailer.text.erb +1 -1
  10. data/config/locales/exception_handler.en.yml +1 -1
  11. data/config/routes.rb +42 -42
  12. data/exception_handler.gemspec +1 -0
  13. data/lib/exception_handler/version.rb +1 -1
  14. data/spec/controllers/controller_spec.rb +107 -107
  15. data/spec/dummy/Rakefile +6 -6
  16. data/spec/dummy/app/assets/config/manifest.js +3 -3
  17. data/spec/dummy/app/assets/javascripts/application.js +15 -15
  18. data/spec/dummy/app/assets/javascripts/cable.js +13 -13
  19. data/spec/dummy/app/assets/stylesheets/application.css +15 -15
  20. data/spec/dummy/app/channels/application_cable/channel.rb +4 -4
  21. data/spec/dummy/app/channels/application_cable/connection.rb +4 -4
  22. data/spec/dummy/app/controllers/application_controller.rb +2 -2
  23. data/spec/dummy/app/helpers/application_helper.rb +2 -2
  24. data/spec/dummy/app/jobs/application_job.rb +2 -2
  25. data/spec/dummy/app/mailers/application_mailer.rb +4 -4
  26. data/spec/dummy/app/models/application_record.rb +3 -3
  27. data/spec/dummy/app/views/layouts/application.html.erb +15 -15
  28. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -13
  29. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -1
  30. data/spec/dummy/bin/bundle +3 -3
  31. data/spec/dummy/bin/rails +4 -4
  32. data/spec/dummy/bin/rake +4 -4
  33. data/spec/dummy/bin/setup +36 -36
  34. data/spec/dummy/bin/update +31 -31
  35. data/spec/dummy/bin/yarn +11 -11
  36. data/spec/dummy/config.ru +5 -5
  37. data/spec/dummy/config/application.rb +18 -18
  38. data/spec/dummy/config/boot.rb +5 -5
  39. data/spec/dummy/config/cable.yml +10 -10
  40. data/spec/dummy/config/database.yml +25 -25
  41. data/spec/dummy/config/environment.rb +5 -5
  42. data/spec/dummy/config/environments/development.rb +61 -61
  43. data/spec/dummy/config/environments/production.rb +94 -94
  44. data/spec/dummy/config/environments/test.rb +46 -46
  45. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -8
  46. data/spec/dummy/config/initializers/assets.rb +14 -14
  47. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -7
  48. data/spec/dummy/config/initializers/content_security_policy.rb +25 -25
  49. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -5
  50. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -4
  51. data/spec/dummy/config/initializers/inflections.rb +16 -16
  52. data/spec/dummy/config/initializers/mime_types.rb +4 -4
  53. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -14
  54. data/spec/dummy/config/locales/en.yml +33 -33
  55. data/spec/dummy/config/puma.rb +34 -34
  56. data/spec/dummy/config/routes.rb +3 -3
  57. data/spec/dummy/config/storage.yml +34 -34
  58. data/spec/dummy/package.json +5 -5
  59. data/spec/dummy/public/404.html +67 -67
  60. data/spec/dummy/public/422.html +67 -67
  61. data/spec/dummy/public/500.html +66 -66
  62. data/spec/dummy/spec/rails_helper.rb +57 -57
  63. data/spec/features/asset_spec.rb +61 -61
  64. data/spec/features/config_spec.rb +51 -51
  65. data/spec/features/engine_spec.rb +180 -180
  66. data/spec/mailers/mailer_spec.rb +26 -0
  67. data/spec/models/model_spec.rb +26 -0
  68. data/spec/routing/routing_spec.rb +85 -85
  69. data/spec/spec_helper.rb +101 -93
  70. data/spec/views/views_spec.rb +29 -29
  71. metadata +22 -6
@@ -1,4 +1,4 @@
1
- module ApplicationCable
2
- class Channel < ActionCable::Channel::Base
3
- end
4
- end
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -1,4 +1,4 @@
1
- module ApplicationCable
2
- class Connection < ActionCable::Connection::Base
3
- end
4
- end
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -1,2 +1,2 @@
1
- class ApplicationController < ActionController::Base
2
- end
1
+ class ApplicationController < ActionController::Base
2
+ end
@@ -1,2 +1,2 @@
1
- module ApplicationHelper
2
- end
1
+ module ApplicationHelper
2
+ end
@@ -1,2 +1,2 @@
1
- class ApplicationJob < ActiveJob::Base
2
- end
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -1,4 +1,4 @@
1
- class ApplicationMailer < ActionMailer::Base
2
- default from: 'from@example.com'
3
- layout 'mailer'
4
- end
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -1,3 +1,3 @@
1
- class ApplicationRecord < ActiveRecord::Base
2
- self.abstract_class = true
3
- end
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -1,15 +1,15 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
7
-
8
- <%= stylesheet_link_tag 'application', media: 'all' %>
9
- <%= javascript_include_tag 'application' %>
10
- </head>
11
-
12
- <body>
13
- <%= yield %>
14
- </body>
15
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag 'application', media: 'all' %>
9
+ <%= javascript_include_tag 'application' %>
10
+ </head>
11
+
12
+ <body>
13
+ <%= yield %>
14
+ </body>
15
+ </html>
@@ -1,13 +1,13 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <style>
6
- /* Email styles need to be inline */
7
- </style>
8
- </head>
9
-
10
- <body>
11
- <%= yield %>
12
- </body>
13
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -1 +1 @@
1
- <%= yield %>
1
+ <%= yield %>
@@ -1,3 +1,3 @@
1
- #!/usr/bin/env ruby.exe
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
- load Gem.bin_path('bundler', 'bundle')
1
+ #!/usr/bin/env ruby.exe
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
+ load Gem.bin_path('bundler', 'bundle')
data/spec/dummy/bin/rails CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby.exe
2
- APP_PATH = File.expand_path('../config/application', __dir__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
1
+ #!/usr/bin/env ruby.exe
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
data/spec/dummy/bin/rake CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby.exe
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
1
+ #!/usr/bin/env ruby.exe
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
data/spec/dummy/bin/setup CHANGED
@@ -1,36 +1,36 @@
1
- #!/usr/bin/env ruby.exe
2
- require 'fileutils'
3
- include FileUtils
4
-
5
- # path to your application root.
6
- APP_ROOT = File.expand_path('..', __dir__)
7
-
8
- def system!(*args)
9
- system(*args) || abort("\n== Command #{args} failed ==")
10
- end
11
-
12
- chdir APP_ROOT do
13
- # This script is a starting point to setup your application.
14
- # Add necessary setup steps to this file.
15
-
16
- puts '== Installing dependencies =='
17
- system! 'gem install bundler --conservative'
18
- system('bundle check') || system!('bundle install')
19
-
20
- # Install JavaScript dependencies if using Yarn
21
- # system('bin/yarn')
22
-
23
- # puts "\n== Copying sample files =="
24
- # unless File.exist?('config/database.yml')
25
- # cp 'config/database.yml.sample', 'config/database.yml'
26
- # end
27
-
28
- puts "\n== Preparing database =="
29
- system! 'bin/rails db:setup'
30
-
31
- puts "\n== Removing old logs and tempfiles =="
32
- system! 'bin/rails log:clear tmp:clear'
33
-
34
- puts "\n== Restarting application server =="
35
- system! 'bin/rails restart'
36
- end
1
+ #!/usr/bin/env ruby.exe
2
+ require 'fileutils'
3
+ include FileUtils
4
+
5
+ # path to your application root.
6
+ APP_ROOT = File.expand_path('..', __dir__)
7
+
8
+ def system!(*args)
9
+ system(*args) || abort("\n== Command #{args} failed ==")
10
+ end
11
+
12
+ chdir APP_ROOT do
13
+ # This script is a starting point to setup your application.
14
+ # Add necessary setup steps to this file.
15
+
16
+ puts '== Installing dependencies =='
17
+ system! 'gem install bundler --conservative'
18
+ system('bundle check') || system!('bundle install')
19
+
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
23
+ # puts "\n== Copying sample files =="
24
+ # unless File.exist?('config/database.yml')
25
+ # cp 'config/database.yml.sample', 'config/database.yml'
26
+ # end
27
+
28
+ puts "\n== Preparing database =="
29
+ system! 'bin/rails db:setup'
30
+
31
+ puts "\n== Removing old logs and tempfiles =="
32
+ system! 'bin/rails log:clear tmp:clear'
33
+
34
+ puts "\n== Restarting application server =="
35
+ system! 'bin/rails restart'
36
+ end
@@ -1,31 +1,31 @@
1
- #!/usr/bin/env ruby.exe
2
- require 'fileutils'
3
- include FileUtils
4
-
5
- # path to your application root.
6
- APP_ROOT = File.expand_path('..', __dir__)
7
-
8
- def system!(*args)
9
- system(*args) || abort("\n== Command #{args} failed ==")
10
- end
11
-
12
- chdir APP_ROOT do
13
- # This script is a way to update your development environment automatically.
14
- # Add necessary update steps to this file.
15
-
16
- puts '== Installing dependencies =='
17
- system! 'gem install bundler --conservative'
18
- system('bundle check') || system!('bundle install')
19
-
20
- # Install JavaScript dependencies if using Yarn
21
- # system('bin/yarn')
22
-
23
- puts "\n== Updating database =="
24
- system! 'bin/rails db:migrate'
25
-
26
- puts "\n== Removing old logs and tempfiles =="
27
- system! 'bin/rails log:clear tmp:clear'
28
-
29
- puts "\n== Restarting application server =="
30
- system! 'bin/rails restart'
31
- end
1
+ #!/usr/bin/env ruby.exe
2
+ require 'fileutils'
3
+ include FileUtils
4
+
5
+ # path to your application root.
6
+ APP_ROOT = File.expand_path('..', __dir__)
7
+
8
+ def system!(*args)
9
+ system(*args) || abort("\n== Command #{args} failed ==")
10
+ end
11
+
12
+ chdir APP_ROOT do
13
+ # This script is a way to update your development environment automatically.
14
+ # Add necessary update steps to this file.
15
+
16
+ puts '== Installing dependencies =='
17
+ system! 'gem install bundler --conservative'
18
+ system('bundle check') || system!('bundle install')
19
+
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
23
+ puts "\n== Updating database =="
24
+ system! 'bin/rails db:migrate'
25
+
26
+ puts "\n== Removing old logs and tempfiles =="
27
+ system! 'bin/rails log:clear tmp:clear'
28
+
29
+ puts "\n== Restarting application server =="
30
+ system! 'bin/rails restart'
31
+ end
data/spec/dummy/bin/yarn CHANGED
@@ -1,11 +1,11 @@
1
- #!/usr/bin/env ruby.exe
2
- APP_ROOT = File.expand_path('..', __dir__)
3
- Dir.chdir(APP_ROOT) do
4
- begin
5
- exec "yarnpkg", *ARGV
6
- rescue Errno::ENOENT
7
- $stderr.puts "Yarn executable was not detected in the system."
8
- $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
- exit 1
10
- end
11
- end
1
+ #!/usr/bin/env ruby.exe
2
+ APP_ROOT = File.expand_path('..', __dir__)
3
+ Dir.chdir(APP_ROOT) do
4
+ begin
5
+ exec "yarnpkg", *ARGV
6
+ rescue Errno::ENOENT
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
+ exit 1
10
+ end
11
+ end
data/spec/dummy/config.ru CHANGED
@@ -1,5 +1,5 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require_relative 'config/environment'
4
-
5
- run Rails.application
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
@@ -1,18 +1,18 @@
1
- require_relative 'boot'
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require(*Rails.groups)
6
- require 'exception_handler'
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Initialize configuration defaults for originally generated Rails version.
11
- config.load_defaults 5.2
12
-
13
- # Settings in config/environments/* take precedence over those specified here.
14
- # Application configuration can go into files in config/initializers
15
- # -- all .rb files in that directory are automatically loaded after loading
16
- # the framework and any gems in your application.
17
- end
18
- end
1
+ require_relative 'boot'
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require 'exception_handler'
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Initialize configuration defaults for originally generated Rails version.
11
+ config.load_defaults 5.2
12
+
13
+ # Settings in config/environments/* take precedence over those specified here.
14
+ # Application configuration can go into files in config/initializers
15
+ # -- all .rb files in that directory are automatically loaded after loading
16
+ # the framework and any gems in your application.
17
+ end
18
+ end
@@ -1,5 +1,5 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
-
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -1,10 +1,10 @@
1
- development:
2
- adapter: async
3
-
4
- test:
5
- adapter: async
6
-
7
- production:
8
- adapter: redis
9
- url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
- channel_prefix: dummy_production
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: redis
9
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
+ channel_prefix: dummy_production
@@ -1,25 +1,25 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: db/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: db/test.sqlite3
22
-
23
- production:
24
- <<: *default
25
- database: db/production.sqlite3
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3