mailbox_gem 0.1.0 → 0.1.1

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: fa8d40772489423cacc25cb31361764217a829ea682e0feaabae1c7ad9a8ac7f
4
- data.tar.gz: a4c11a6abf57765980328193a6dab0e212e74edfc2d207b9c603cd54be67ca05
3
+ metadata.gz: 010b2c97f9ec4c2f8a206f4ce9a80a5a2d1369ae46ddb243f5bdc80caec777ec
4
+ data.tar.gz: 60d23ed4a710964d32b92335946383d06fdc98990d8fceed3569d5c1c754c3e6
5
5
  SHA512:
6
- metadata.gz: f3be8e4cf7f0b2e8a88d4a707f1000f151917df1a5991006d6f1b421ed5e76f657254a175e522181a6add6264472cbfc24c8c104dfdcc35494e75c29d7f35d50
7
- data.tar.gz: 83b0fffc3a4130c43db73c44e2232c93d700a39bf11505d28d0045abe4b061f1747478815d440c0aebab4051d24821108a9dd8e97e8c5bfd744aeba0b255e176
6
+ metadata.gz: 47ba87dc6910cbbc361a9da5b4e185c1670fe94ba1a482d4582ad1ea8b5849c96f64573e8e88c67e1624fae8f849a669c6ac9b613afbd3e37c46bfdaf433d374
7
+ data.tar.gz: fae3ca99d0a726132bf39655b68c45e84778633728ef73008e395b9dd7e5fd105eeac88a5d2ddc11c69182717287f698abcc6674b0509de7f34941a2b5af60e6
data/README.md CHANGED
@@ -12,10 +12,16 @@ MailboxGem is a standalone engine. It doesn't modify Rails or Action Mailer; it
12
12
  Rails already has two ways to look at outgoing mail in development, and both have a gap:
13
13
 
14
14
  - **`ActionMailer::Preview`** (`/rails/mailers`) renders a mailer against data you construct by hand in a preview class. It never touches your real application code path, so it can drift from what actually gets sent.
15
- - **`ActionMailer::Base.deliveries`** only accumulates anything when `delivery_method` is `:test`, which is what the `test` environment uses — not `development`. In development there's normally nowhere to look at all.
15
+ - **`ActionMailer::Base.deliveries`** only accumulates anything when `delivery_method` is `:test`, which is what the `test` environment uses — not `development`. In development, there's normally nowhere to look at all.
16
16
 
17
17
  MailboxGem fills that gap: it captures the real `Mail::Message` your app hands to Action Mailer when a user actually triggers an email (signs up, resets a password, checks out), and gives you a live UI to inspect it — HTML, plain text, and raw source, with attachments.
18
18
 
19
+ ## Demo
20
+
21
+
22
+ https://github.com/user-attachments/assets/16f82b71-7b6c-47fa-8acc-0dbe147975cd
23
+
24
+
19
25
  ## Features
20
26
 
21
27
  - **Captures real mail**, not previews — anything delivered through Action Mailer while `mailbox_gem` is the active delivery method.
@@ -29,7 +29,10 @@ module MailboxGem
29
29
  private
30
30
 
31
31
  def filtered_messages
32
- Store.all.select { |message| message.matches?(@query) }
32
+ Store.all
33
+ .select { |message| message.matches?(@query) }
34
+ .sort_by { |message| message.captured_at }
35
+ .reverse
33
36
  end
34
37
  end
35
38
  end
@@ -32,26 +32,26 @@
32
32
 
33
33
  <% case @view %>
34
34
  <% when "html" %>
35
- <iframe
36
- class="body-frame"
37
- sandbox=""
38
- title="HTML body"
39
- referrerpolicy="no-referrer"
40
- srcdoc="<%= @message.html_body %>"
41
- >
42
- </iframe>
43
- <% when "text" %>
44
- <pre class="body-text"><%= @message.text_body %></pre>
45
- <% when "source" %>
46
- <pre class="body-text"><%= @message.source %></pre>
47
- <% end %>
35
+ <iframe
36
+ class="body-frame"
37
+ sandbox="allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"
38
+ title="HTML body"
39
+ referrerpolicy="no-referrer"
40
+ srcdoc="<%= @message.html_body %>"
41
+ >
42
+ </iframe>
43
+ <% when "text" %>
44
+ <pre class="body-text"><%= @message.text_body %></pre>
45
+ <% when "source" %>
46
+ <pre class="body-text"><%= @message.source %></pre>
47
+ <% end %>
48
48
 
49
- <% if @message.attachments.any? %>
50
- <h2>Attachments</h2>
51
- <ul class="attachments">
52
- <% @message.attachments.each do |attachment| %>
53
- <li><%= attachment.filename %>
54
- <span class="muted">(<%= number_to_human_size(attachment.decoded.bytesize) %>)</span></li>
55
- <% end %>
56
- </ul>
57
- <% end %>
49
+ <% if @message.attachments.any? %>
50
+ <h2>Attachments</h2>
51
+ <ul class="attachments">
52
+ <% @message.attachments.each do |attachment| %>
53
+ <li><%= attachment.filename %>
54
+ <span class="muted">(<%= number_to_human_size(attachment.decoded.bytesize) %>)</span></li>
55
+ <% end %>
56
+ </ul>
57
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module MailboxGem
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailbox_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luka Tchelidze