mailer-log 0.2.11 → 0.3.0

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: e66906204b18d91f7933db73891a887de45e506d30a16cf8ecdfaea112bd35c1
4
- data.tar.gz: 13abcc76cb3f3cc77d4dad8acde0a30ca584cf34425fba56ac6d94dfacf67c99
3
+ metadata.gz: f62830eb92d1540200d0a0bbd4e58c9f95d3b13c3af7f9e8841274b338308f08
4
+ data.tar.gz: 7b6ff984a35b1f02bd595ce9fd6e98ee0d1827f003911c4bf437f505f1b6b9c3
5
5
  SHA512:
6
- metadata.gz: e2560edc6cc96b1618ee98d8db9845d3c4bc1a6d6cd8fedfe733e6fe60354f87eca701c606e647e2c3c9ce5adecf772a771ef07fafd95216ff4e9abca3ae11cc
7
- data.tar.gz: b7ce9ccf3e2c9cdd782f8260808234e47752ffe8c79afd230b37dee26fd61f6a04517a42de48b3cbc28779d458e805d58e0537680ac47248c869fc2811f091fa
6
+ metadata.gz: 34fcc902f54c3df6b260a06e1e93331c14a25358ff478a63e91a3463cb27088b2943438dfc302945532a601553ddcf657a21a938c38b791dfe601b14cf22eb18
7
+ data.tar.gz: cbd4c22a0efa7e46fc7253fba38c6edfe8b4f09d35d6ed8275422061e960f3165ab3a4ee229903ab5e1e626618b6fd1a3a553f8d09e0c25d9ed3565d6fea016c
@@ -3,8 +3,9 @@
3
3
  module MailerLog
4
4
  class SpaController < MailerLog::AdminController
5
5
  helper MailerLog::SpaHelper
6
+ helper Rails.application.helpers
6
7
 
7
- layout false
8
+ layout -> { MailerLog.configuration.spa_layout || false }
8
9
 
9
10
  def index
10
11
  render :index
@@ -1,3 +1,7 @@
1
+ <% host_layout = MailerLog.configuration.spa_layout.present? %>
2
+ <% header_partial = MailerLog.configuration.header_partial %>
3
+
4
+ <% unless host_layout %>
1
5
  <!DOCTYPE html>
2
6
  <html lang="en">
3
7
  <head>
@@ -11,21 +15,36 @@
11
15
  <% end %>
12
16
  </head>
13
17
  <body class="bg-gray-100 min-h-screen">
14
- <% header_partial = MailerLog.configuration.header_partial %>
15
- <script>
16
- window.MAILER_LOG_CONFIG = {
17
- mountPath: '<%= request.script_name %>',
18
- hideNavbar: <%= header_partial.present? %>
19
- };
20
- </script>
21
- <% if header_partial %>
22
- <%= render partial: header_partial %>
23
- <% end %>
24
- <div id="app"></div>
18
+ <% end %>
19
+
20
+ <% if host_layout %>
25
21
  <% if (dev_url = mailer_log_dev_server_url) %>
26
- <script type="module" src="<%= dev_url %>/src/main.js"></script>
27
- <% elsif (js = mailer_log_js_entry) %>
28
- <script type="module" src="<%= js %>"></script>
22
+ <script type="module" src="<%= dev_url %>/@vite/client"></script>
23
+ <% elsif (css = mailer_log_css_entry) %>
24
+ <link rel="stylesheet" href="<%= css %>">
29
25
  <% end %>
26
+ <% end %>
27
+
28
+ <script>
29
+ window.MAILER_LOG_CONFIG = {
30
+ mountPath: '<%= request.script_name %>',
31
+ hideNavbar: <%= header_partial.present? || host_layout %>
32
+ };
33
+ </script>
34
+
35
+ <% if header_partial %>
36
+ <%= render partial: header_partial %>
37
+ <% end %>
38
+
39
+ <div id="app"></div>
40
+
41
+ <% if (dev_url = mailer_log_dev_server_url) %>
42
+ <script type="module" src="<%= dev_url %>/src/main.js"></script>
43
+ <% elsif (js = mailer_log_js_entry) %>
44
+ <script type="module" src="<%= js %>"></script>
45
+ <% end %>
46
+
47
+ <% unless host_layout %>
30
48
  </body>
31
49
  </html>
50
+ <% end %>
@@ -9,6 +9,7 @@ module MailerLog
9
9
  :call_stack_depth,
10
10
  :per_page,
11
11
  :header_partial,
12
+ :spa_layout,
12
13
  :show_delivery_events,
13
14
  :github_repo
14
15
 
@@ -22,6 +23,7 @@ module MailerLog
22
23
  @call_stack_depth = 20
23
24
  @per_page = 25
24
25
  @header_partial = nil # e.g., 'shared/admin_navbar'
26
+ @spa_layout = nil # e.g., 'application' — when set, SPA renders inside host app layout
25
27
  @show_delivery_events = nil # nil = auto (true if webhook_signing_key present)
26
28
  @github_repo = nil # e.g., 'trafficrunners/gmbmanager' for GitHub links in call stack
27
29
  @authenticate_with_proc = nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MailerLog
4
- VERSION = '0.2.11'
4
+ VERSION = '0.3.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailer-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TrafficRunners
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 4.0.3
128
+ rubygems_version: 3.6.7
129
129
  specification_version: 4
130
130
  summary: Rails engine for logging outgoing emails with Mailgun webhook integration
131
131
  test_files: []