sinatra-hexacta 0.3.16 → 0.3.17
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ce9729468b924495d760e891e5011f6ec91a7a1d5867445043fb36cd8c7cced
|
4
|
+
data.tar.gz: 84206d7c18208e55794e01e00904c1c58f0781f7f7116045d560ae44ec6bb659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 407744e4cf104e64dd731aaca8b3c302b888b6045065cba2f35789c99700c9459d8806879fc76cb6adb7216285805472849cd9e832f0ae13c31ffb35ee2e6372
|
7
|
+
data.tar.gz: 2523b68e3033e60b18f4dd0b6efeafd16f68b8a5ba1f1b2baaf38e5622fe26f3bb72deea41338bc250a1fa1da9c709f339c939b44d0b8cb2623cd1955d4a123e
|
@@ -10,17 +10,24 @@ module Sinatra
|
|
10
10
|
error_template(404)
|
11
11
|
error_template(403)
|
12
12
|
error_template(500)
|
13
|
+
error_template(Sequel::DatabaseDisconnectError)
|
14
|
+
error_template(Sequel::DatabaseConnectionError)
|
13
15
|
end
|
14
16
|
|
15
17
|
def error_template(code)
|
16
|
-
|
18
|
+
if code.is_a? Numeric
|
19
|
+
template_code = code
|
20
|
+
else
|
21
|
+
template_code = code.to_s.split('::').last
|
22
|
+
end
|
23
|
+
ErrorHandler.copy_file("/lib/sinatra/views/errors/#{template_code}.slim","/app/views/#{Hexacta::GEM_FILE_DIR}/errors/#{template_code}.slim")
|
17
24
|
error code do
|
18
25
|
if code == 500
|
19
26
|
title = env['sinatra.error'].message.split(':')[0].gsub('#<','');
|
20
27
|
message = (["in #{request.url}"] + env['sinatra.error'].backtrace).join(',');
|
21
28
|
NotificationSender.instance.send_error(authenticated(User),title,message)
|
22
29
|
end
|
23
|
-
slim "#{Hexacta::GEM_FILE_DIR}/errors/#{
|
30
|
+
slim "#{Hexacta::GEM_FILE_DIR}/errors/#{template_code}".to_sym, locals: { :params => params }
|
24
31
|
end
|
25
32
|
end
|
26
33
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.row
|
2
|
+
.col-xs-12
|
3
|
+
.lv-item.p-20.bgm-orange.m-b-5
|
4
|
+
.media
|
5
|
+
.pull-left
|
6
|
+
i.zmdi.zmdi-hc-3x.zmdi-cloud-off.c-white
|
7
|
+
.media-body
|
8
|
+
.lv-title.c-white Error de conexión con la base de datos
|
9
|
+
small.lv-small.c-white Espera unos segundos mientras se reestablece la conexión.
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
javascript:
|
14
|
+
$(document).ready(function() {
|
15
|
+
setTimeout(function(){
|
16
|
+
window.location.reload(1);
|
17
|
+
}, 5000);
|
18
|
+
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.row
|
2
|
+
.col-xs-12
|
3
|
+
.lv-item.p-20.bgm-orange.m-b-5
|
4
|
+
.media
|
5
|
+
.pull-left
|
6
|
+
i.zmdi.zmdi-hc-3x.zmdi-cloud-off.c-white
|
7
|
+
.media-body
|
8
|
+
.lv-title.c-white Conexión con la base de datos
|
9
|
+
small.lv-small.c-white Espera unos segundos mientras se reestablece la conexión.
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
javascript:
|
14
|
+
$(document).ready(function() {
|
15
|
+
setTimeout(function(){
|
16
|
+
window.location.reload(1);
|
17
|
+
}, 5000);
|
18
|
+
});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-hexacta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Zanger
|
@@ -157,6 +157,8 @@ files:
|
|
157
157
|
- lib/sinatra/views/errors/403.slim
|
158
158
|
- lib/sinatra/views/errors/404.slim
|
159
159
|
- lib/sinatra/views/errors/500.slim
|
160
|
+
- lib/sinatra/views/errors/DatabaseConnectionError.slim
|
161
|
+
- lib/sinatra/views/errors/DatabaseDisconnectError.slim
|
160
162
|
- lib/sinatra/views/inputs/date.slim
|
161
163
|
- lib/sinatra/views/inputs/input.slim
|
162
164
|
- lib/sinatra/views/inputs/month.slim
|