proscenium 0.11.0.pre.11-x86_64-darwin → 0.11.0.pre.13-x86_64-darwin

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: bbaa1085da775617ff05dd56b98b9596a269ce6dbdcbf2022298b805ba60d9d1
4
- data.tar.gz: 12cba17bddc0b42ef9e9352a816711ab4dca1ee8b2c1090c95774aaf32772c1f
3
+ metadata.gz: 24b039ca3989d06f563b34c31d55bfacb05ad5ef39685cc1af24e00260864724
4
+ data.tar.gz: c827e017c374e7858d33006820ec65e804ab6fe17d22ade8d566c27d2976aefd
5
5
  SHA512:
6
- metadata.gz: c8f0ca2517304db1a98e07f86b6f170de1a798e73044914974dc9997b8ef9475f71926466ed40f035b02bafba2b35206dcbefb66573c82def82e6c36ffb9a8e1
7
- data.tar.gz: 5c575c1788cd624ed78d358e4d5a01158a532f6e16676d86fa267aadd7eb6300684f6a9cbf9038e43dd849af81de6b0459c533323def4cd9cdbc3a354c457bad
6
+ metadata.gz: 873421a45e6a1ebe9efc84e890c6126ed067e7e91b4463b443a6ff8fe4abc169fe9b1fdb641e7c3d5495de8864f6781ca48ebc821e6d9222fd5f91af738b03a8
7
+ data.tar.gz: 047e15c1dce6130dbd8d1dbae02d69c8505bb59b2dd952110ac284e438056ff4395876811d80071e10fd04e1e46e5d4c194478abd43d8e8ccb2a49dfcd6db6fc
Binary file
@@ -45,6 +45,13 @@ module Proscenium
45
45
  'Proscenium::Builder::BuildError' => 'build_error'
46
46
  }
47
47
 
48
+ initializer 'proscenium.debugging' do
49
+ if Rails.gem_version >= Gem::Version.new('7.1.0')
50
+ tpl_path = root.join('lib', 'proscenium', 'templates').to_s
51
+ ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS << tpl_path
52
+ end
53
+ end
54
+
48
55
  initializer 'proscenium.middleware' do |app|
49
56
  app.middleware.insert_after ActionDispatch::Static, Middleware
50
57
  # app.middleware.insert_after ActionDispatch::Static, Rack::ETag, 'no-cache'
@@ -70,12 +77,13 @@ module Proscenium
70
77
  end
71
78
  end
72
79
 
73
- # Monkey path ActionDispatch::DebugView to use our custom error template on BuildError exceptions.
74
- class ActionDispatch::DebugView
75
- def initialize(assigns)
76
- paths = [RESCUES_TEMPLATE_PATH,
77
- Proscenium::Railtie.root.join('lib', 'proscenium', 'templates').to_s]
78
- lookup_context = ActionView::LookupContext.new(paths)
79
- super(lookup_context, assigns, nil)
80
+ if Rails.gem_version < Gem::Version.new('7.1.0')
81
+ class ActionDispatch::DebugView
82
+ def initialize(assigns)
83
+ tpl_path = Proscenium::Railtie.root.join('lib', 'proscenium', 'templates').to_s
84
+ paths = [RESCUES_TEMPLATE_PATH, tpl_path]
85
+ lookup_context = ActionView::LookupContext.new(paths)
86
+ super(lookup_context, assigns, nil)
87
+ end
80
88
  end
81
89
  end
@@ -1,11 +1,14 @@
1
1
  <header>
2
2
  <h1>
3
- <%= @exception.class.to_s %>
3
+ <%= Rails.gem_version >= Gem::Version.new('7.1.0') ? @exception_wrapper.exception_class_name : @exception.class.to_s %>
4
+ <% if params_valid? && @request.parameters['controller'] %>
5
+ in <%= @request.parameters['controller'].camelize %>Controller<% if @request.parameters['action'] %>#<%= @request.parameters['action'] %><% end %>
6
+ <% end %>
4
7
  </h1>
5
8
  </header>
6
9
 
7
10
  <main role="main" id="container">
8
- <%= render "rescues/message_and_suggestions", exception: @exception %>
11
+ <%= render "rescues/message_and_suggestions", exception: @exception, exception_wrapper: Rails.gem_version >= Gem::Version.new('7.1.0') ? @exception_wrapper : nil %>
9
12
 
10
13
  <% if @exception.error['location'] %>
11
14
  <div class="source">
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.11.0.pre.11'
4
+ VERSION = '0.11.0.pre.13'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0.pre.11
4
+ version: 0.11.0.pre.13
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-10 00:00:00.000000000 Z
11
+ date: 2023-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport