exception_handler 0.7.5 → 0.7.5.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccc92609ab7af5a0f65736e1578aaef57b51a2d7
4
- data.tar.gz: 1843d7a57a2551baa486a8579e60594eca2e2d5f
3
+ metadata.gz: 7d0159ca0e6b4084616339284170c8a10e91ed30
4
+ data.tar.gz: 5857d0d29b10e4e6056d4cf6f67d57b1c5daaf11
5
5
  SHA512:
6
- metadata.gz: 0af19ea19133e86ad15a43f9324ee923ebdce75a7747543bd57f799ca16c8b14f0f24b81ce6ed144c8a6cd78169c2aa5e0b6c8bc5780af801bf1d169acc57fb9
7
- data.tar.gz: 0740300edaa518daf6db9e133b75650684bdcaf3b276b84c7e4568b9fd61d5032d8d0c14c5037ceaa72998c58076d059a7970b2a2d8321dbd95c526cb8e4fddd
6
+ metadata.gz: 3de77586327b0612743fe04a39e853fca5f45f091587cdb24920036ebaced4ddf0227dadd0fa8cb4fe581d0b8a71cceb3d15e56c6c9e61c547d3cc93cbef4446
7
+ data.tar.gz: 5e9332a919cd968576a95c6ab4a15c0cb784510f4a6087431fb3568a2b10c46e046e96c8368f3b11c126f5c0f305e54005127de2edf8f9a262d352e55e93e3cf
@@ -0,0 +1,7 @@
1
+ # Ignore art files
2
+ # https://devcenter.heroku.com/articles/slug-compiler#ignoring-files-with-slugignore
3
+ *.psd
4
+ *.pdf
5
+ /test
6
+ /spec
7
+ /readme
data/README.md CHANGED
@@ -88,8 +88,6 @@ The secret lies in [**`config.exceptions_app`**][exception_app] ↴
88
88
 
89
89
  Each time an exception is raised, [`ShowExceptions`][show_exception] takes the request and forwards it to `config.exceptions_app`. This is expected to return a response - allowing us to inject a [`controller`](app/controllers/exception_handler/exceptions_controller.rb):
90
90
 
91
- > ```app.config.exceptions_app = ->(env) { ExceptionHandler::ExceptionsController.action(:show).call(env) }```
92
-
93
91
  ![config.exceptions_app - The key to all Rails exceptions][exceptions_app]
94
92
 
95
93
  Because our callback maintains the request, we are able to do whatever we need before serving a response. This is a **major** advantage over the "default" (routes). The routes invokes Rails twice and does not persist the request.
@@ -130,7 +128,7 @@ Once invoked, its `model`, `controller` and `views` work together to serve the b
130
128
  </p>
131
129
 
132
130
  <p align="center">
133
- <a href="#config"><img src="readme/titles/icons/config.png" alt="Cinfiguration Options" align="absmiddle" height="24" /> Config</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#dev-mode" title="Dev Mode"><img src="readme/titles/icons/dev.png" alt="Dev" align="absmiddle" height="24" /> Dev</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#database"><img src="readme/titles/icons/database.png" alt="Database" align="absmiddle" height="24" /> Database</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#email"><img src="readme/titles/icons/email.png" alt="Email" align="absmiddle" height="24" /> Email</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#views"><img src="readme/titles/icons/views.png" alt="Views" align="absmiddle" height="24" /> Views</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#locales"><img src="readme/titles/icons/locales.png" alt="Locales" align="absmiddle" height="24" /> Locales</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#custom-exceptions"><img src="readme/titles/icons/custom.png" alt="Custom Exceptions" align="absmiddle" height="24" /> Custom Exceptions</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#generators"><img src="readme/titles/icons/generators.png" alt="Generators" align="absmiddle" height="24" /> Generators</a>
131
+ <a href="#config"><img src="readme/titles/icons/config.png" alt="Cinfiguration Options" align="absmiddle" height="24" /> Config</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#dev-mode" title="Dev Mode"><img src="readme/titles/icons/dev.png" alt="Dev" align="absmiddle" height="24" /> Dev</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#database"><img src="readme/titles/icons/database.png" alt="Database" align="absmiddle" height="24" /> Database</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#email"><img src="readme/titles/icons/email.png" alt="Email" align="absmiddle" height="24" /> Email</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#views"><img src="readme/titles/icons/views.png" alt="Views" align="absmiddle" height="24" /> Views</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#locales"><img src="readme/titles/icons/locales.png" alt="Locales" align="absmiddle" height="20" /> Locales</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#custom-exceptions"><img src="readme/titles/icons/custom.png" alt="Custom Exceptions" align="absmiddle" height="18" /> Custom Exceptions</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#generators"><img src="readme/titles/icons/generators.png" alt="Generators" align="absmiddle" height="24" /> Generators</a>
134
132
  </p>
135
133
 
136
134
  ----
@@ -171,17 +169,12 @@ You only need to provide the inputs you want, for example:
171
169
 
172
170
  **To enable `ExceptionHandler` in dev, enable the [`dev`](lib/exception_handler/config.rb#L38) option:**
173
171
 
174
- # config/application.rb
175
- config.exception_handler = { dev: true }
176
-
177
172
  ![Dev][dev_mode]
178
173
 
179
174
  This disables [`config.consider_all_requests_local`](http://guides.rubyonrails.org/configuring.html#rails-general-configuration), making Rails behave as it would in production:
180
175
 
181
176
  ![Dev][dev_img]
182
177
 
183
- This should be used temporarily.
184
-
185
178
  ----
186
179
 
187
180
  ## Database
@@ -8,6 +8,10 @@ module ExceptionHandler
8
8
  # => CSRF
9
9
  protect_from_forgery
10
10
 
11
+ # => Devise
12
+ # => http://stackoverflow.com/a/38531245/1143732
13
+ skip_before_action :authenticate_user!, raise: false
14
+
11
15
  ##################################
12
16
  ##################################
13
17
 
@@ -22,7 +22,6 @@
22
22
 
23
23
  en:
24
24
  exception_handler:
25
- not_found: "Page missing"
26
25
  internal_server_error: "<strong>%{status} Error</strong> %{message} <p>Return home</p>"
27
26
 
28
27
  #######################################################################################
@@ -12,7 +12,7 @@ module ExceptionHandler
12
12
  MAJOR = 0
13
13
  MINOR = 7
14
14
  TINY = 5
15
- PRE = nil # "alpha"
15
+ PRE = 15 # "alpha"
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
18
18
  end
@@ -60,7 +60,7 @@ Gem::Specification.new do |s|
60
60
  s.required_ruby_version = ">= 2.1.0"
61
61
 
62
62
  # => Runtime
63
- s.add_dependency "bundler", "~> 1.6"
63
+ s.add_dependency "bundler"
64
64
  s.add_dependency "rails", ">= 4.2.0"
65
65
  s.add_dependency "responders"
66
66
 
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.5.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Peck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-17 00:00:00.000000000 Z
11
+ date: 2017-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -133,6 +133,7 @@ files:
133
133
  - ".gitattributes"
134
134
  - ".gitignore"
135
135
  - ".rspec"
136
+ - ".slugignore"
136
137
  - ".travis.yml"
137
138
  - Gemfile
138
139
  - LICENSE.txt
@@ -253,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
254
  version: '0'
254
255
  requirements: []
255
256
  rubyforge_project:
256
- rubygems_version: 2.6.8
257
+ rubygems_version: 2.6.10
257
258
  signing_key:
258
259
  specification_version: 4
259
260
  summary: Rails gem to show custom error pages in production. Also logs errors in db