tramway-admin 1.8.1.4 → 1.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9d8371c8564d2c45d2b9abd10c2bdcd505217e74138b608b76518682d54752a
4
- data.tar.gz: a935c9e71ebc04dbc91f34ca7a96381c57cd8e1d8d0d9545b3cc5e06599bb9d8
3
+ metadata.gz: b128f728912742d6d55dacdc9e0945d67892a3a622284081c7d4171b902f4e76
4
+ data.tar.gz: 25d58efc8bb6d510b251d7736083cfc8919d6c3bdce0358c60083e46c3b04cc2
5
5
  SHA512:
6
- metadata.gz: 8f0f15ad65d217ec85195b0301f83bc6827eaf2374dec8bc85dd31c17fb661a400504eab4279f1f1e0de28b20f1c13801f7481b46eb4d899fd6ffabaf63bfa30
7
- data.tar.gz: e765b3e3ab14e21b9376246fa90e36b14abf1bf3f1e579b380ba2932a87fad5ec1177d3d76adc070197963729ce00e0d3c8391cad6c3fb9d6b327df3a7c70bf1
6
+ metadata.gz: f75f54717f73cf0988daac7996fc4f30053e041e641b2bfac38dcc8553bed6f667178b6bf43bc12cd965bd6676c39d56d2adf350dc4f210c6a805b591b49e0b7
7
+ data.tar.gz: 812c5d5b221a78763f47312a872aff169ebbd7bd73a1acaaebbfc0744003db79cca3cf855ace5947179d1d7bcc0898e39c7d86d781b85fe229e08a95fd2be467
@@ -35,6 +35,21 @@ module Tramway
35
35
  end
36
36
  end
37
37
 
38
+ EXCEPTIONS = [
39
+ ActionController::RoutingError,
40
+ ActionView::MissingTemplate,
41
+ ActiveRecord::RecordNotFound,
42
+ NoMethodError,
43
+ ActionView::Template::Error
44
+ ]
45
+
46
+ rescue_from(*EXCEPTIONS) do |exception|
47
+ Rails.logger.warn "ERROR MESSAGE: #{exception.message}"
48
+ Rails.logger.warn "BACKTRACE: #{exception.backtrace.first(30).join("\n")}"
49
+ @exception = exception
50
+ render 'tramway/admin/shared/errors/server_error', status: 500, layout: false
51
+ end
52
+
38
53
  private
39
54
 
40
55
  include Tramway::ClassNameHelpers
@@ -0,0 +1,12 @@
1
+ - title @exception.message
2
+ %h2
3
+ = @exception.message
4
+ %ul
5
+ - @exception.source_extract.each do |line|
6
+ %li
7
+ = line
8
+ %ul
9
+ - @exception.backtrace.each do |line|
10
+ %li
11
+ = line
12
+
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Admin
3
- VERSION = '1.8.1.4'
3
+ VERSION = '1.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1.4
4
+ version: '1.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-06 00:00:00.000000000 Z
11
+ date: 2019-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-kaminari-views
@@ -233,6 +233,7 @@ files:
233
233
  - app/views/tramway/admin/records/show.html.haml
234
234
  - app/views/tramway/admin/shared/_input.html.haml
235
235
  - app/views/tramway/admin/shared/_show.html.haml
236
+ - app/views/tramway/admin/shared/errors/server_error.html.haml
236
237
  - app/views/tramway/admin/singletons/_form.html.haml
237
238
  - app/views/tramway/admin/singletons/edit.html.haml
238
239
  - app/views/tramway/admin/singletons/new.html.haml