openstax_rescue_from 1.8.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/app/views/errors/any.html.erb +3 -2
- data/lib/openstax/rescue_from/controller.rb +1 -0
- data/lib/openstax/rescue_from/exception_options.rb +3 -1
- data/lib/openstax/rescue_from/exception_proxy.rb +6 -0
- data/lib/openstax/rescue_from/version.rb +1 -1
- data/lib/openstax/rescue_from.rb +4 -0
- data/openstax_rescue_from.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d74e037eddc6542ef9b523001d60775c21c17f2
|
4
|
+
data.tar.gz: 0687bd2b44e7bdc12892305047dc49f6addaa7f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93b966cb0ca0df03e8bd8a8db2bbadffeca993b2f8c69fffc5992ca1aff57c3eed7433519fa6122b7422717540970e008b5db8fc92993325f79673cb984b1150
|
7
|
+
data.tar.gz: 2862293642d457822bf177b7542165a93d90b53c60ef54bd07e97197cd205209b7609405cac7c47a6fc2973e10e24acc3b46c2647ba54d7e6e565707ad681041
|
data/.travis.yml
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
<h3 class='rescue-from'><%= @message %></h3>
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
<% if @sorry %>
|
4
|
+
<p class='rescue-from'>We're sorry this <%= @code %> error occurred. If you need help, please contact <%= openstax_rescue_from_contact_info %><%= " and reference error #{@error_id}" if @error_id && @did_notify %>.</p>
|
5
|
+
<% end %>
|
@@ -1,18 +1,20 @@
|
|
1
1
|
module OpenStax
|
2
2
|
module RescueFrom
|
3
3
|
class ExceptionOptions
|
4
|
-
attr_accessor :notify, :status_code, :message, :extras
|
4
|
+
attr_accessor :notify, :status_code, :message, :sorry, :extras
|
5
5
|
|
6
6
|
def initialize(options = {})
|
7
7
|
options.stringify_keys!
|
8
8
|
options = { 'notify' => true,
|
9
9
|
'status' => :internal_server_error,
|
10
10
|
'message' => nil,
|
11
|
+
'sorry' => true,
|
11
12
|
'extras' => ->(exception) { {} } }.merge(options)
|
12
13
|
|
13
14
|
@notify = options['notify']
|
14
15
|
@status_code = options['status']
|
15
16
|
@message = options['message']
|
17
|
+
@sorry = options['sorry']
|
16
18
|
@extras = options['extras']
|
17
19
|
end
|
18
20
|
|
data/lib/openstax/rescue_from.rb
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.required_ruby_version = '~> 2.0'
|
22
22
|
|
23
|
-
spec.add_dependency "rails", '>= 3.1', '<
|
23
|
+
spec.add_dependency "rails", '>= 3.1', '< 6.0'
|
24
24
|
spec.add_dependency "exception_notification", '>= 4.1', '< 5.0'
|
25
25
|
|
26
26
|
spec.add_development_dependency "sqlite3", '~> 1.3.10'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstax_rescue_from
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: '3.1'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
23
|
+
version: '6.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: '3.1'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6.0'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: exception_notification
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|