mailbin 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheets/mailbin/application.css +46 -6
- data/app/views/layouts/mailbin/application.html.erb +1 -1
- data/app/views/mailbin/messages/index.html.erb +25 -9
- data/app/views/mailbin/messages/show.html.erb +3 -4
- data/config/importmap.rb +1 -1
- data/lib/mailbin/engine.rb +11 -4
- data/lib/mailbin/version.rb +1 -1
- data/lib/mailbin.rb +2 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67be1f2f606c258a26f029a1607a5a8a98563081cfffbaca218e08fcadba5697
|
4
|
+
data.tar.gz: 99e4de39547a8af3d4b5f06cd82c5b2593c898f2f7e7406459bd79f02a53170c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64cc63a073438227c3f1f5b4cf2950e15cf8bcb88b61a7a49b5779c2c1d2e25575b7286578504438331b4e1e426e7d646893252bccf13bfbead6a878a11f22ee
|
7
|
+
data.tar.gz: 01b6592c2774f379f39bb0bbfa5f65ad47d1daf21c163d7fa261e2e2c8390a811df8d8f425c9ea7f22e9f909d8539a744b09221f182466c20e0f89424bdbe5a5
|
data/README.md
CHANGED
@@ -3,7 +3,9 @@ html, body, iframe {
|
|
3
3
|
}
|
4
4
|
|
5
5
|
body {
|
6
|
+
font: 12px "Lucida Grande", sans-serif;
|
6
7
|
margin: 0;
|
8
|
+
padding: 1rem;
|
7
9
|
}
|
8
10
|
|
9
11
|
header {
|
@@ -39,11 +41,13 @@ dd:empty:before {
|
|
39
41
|
content: "\00a0"; //
|
40
42
|
}
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
.headers {
|
45
|
+
th {
|
46
|
+
font-weight: inherit;
|
47
|
+
color: #7f7f7f;
|
48
|
+
text-align: right;
|
49
|
+
white-space: nowrap;
|
50
|
+
}
|
47
51
|
}
|
48
52
|
|
49
53
|
iframe {
|
@@ -52,6 +56,42 @@ iframe {
|
|
52
56
|
}
|
53
57
|
|
54
58
|
nav {
|
55
|
-
padding:
|
59
|
+
padding-bottom: 0.5rem;
|
60
|
+
display: flex;
|
61
|
+
justify-content: space-between;
|
62
|
+
align-items: center;
|
63
|
+
}
|
64
|
+
|
65
|
+
.email-list {
|
66
|
+
border-collapse: collapse;
|
67
|
+
width: 100%;
|
68
|
+
|
69
|
+
th, td {
|
70
|
+
padding: 0.5rem;
|
71
|
+
text-align: left;
|
72
|
+
}
|
73
|
+
|
74
|
+
th {
|
75
|
+
background-color: #f8f9fa;
|
76
|
+
font-weight: bold;
|
77
|
+
color: #495057;
|
78
|
+
}
|
56
79
|
}
|
57
80
|
|
81
|
+
.btn {
|
82
|
+
border-radius: 0.25rem;
|
83
|
+
border-width: 1px;
|
84
|
+
border-style: solid;
|
85
|
+
display: inline-block;
|
86
|
+
padding-bottom: 0.125rem;
|
87
|
+
padding-left: 0.35rem;
|
88
|
+
padding-right: 0.35rem;
|
89
|
+
padding-top: 0.125rem;
|
90
|
+
background-color: white;
|
91
|
+
color: rgb(31 41 55);
|
92
|
+
border-color: rgb(156 163 175);
|
93
|
+
|
94
|
+
&:hover {
|
95
|
+
background-color: rgb(243 244 246);
|
96
|
+
}
|
97
|
+
}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
9
9
|
<%= stylesheet_link_tag "mailbin/application", "data-turbo-track": "reload" %>
|
10
|
-
<%= javascript_importmap_tags "application
|
10
|
+
<%= javascript_importmap_tags "application", importmap: Mailbin.importmap %>
|
11
11
|
</head>
|
12
12
|
<body>
|
13
13
|
<%= yield %>
|
@@ -1,14 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<h1>Sent Emails</h1>
|
4
|
-
<%=
|
1
|
+
<nav>
|
2
|
+
<%= link_to "Back to app", main_app.root_path if main_app.respond_to?(:root_path) %>
|
3
|
+
<h1>Sent Emails</h1>
|
4
|
+
<%= link_to "Mailbin on GitHub", "https://github.com/excid3/mailbin", target: :_blank %>
|
5
|
+
</nav>
|
5
6
|
|
6
7
|
<% if @emails.any? %>
|
7
|
-
<
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
8
|
+
<table class="email-list">
|
9
|
+
<thead>
|
10
|
+
<tr>
|
11
|
+
<th>Subject</th>
|
12
|
+
<th>Sent At</th>
|
13
|
+
<th>
|
14
|
+
<%= button_to "Clear all", clear_path, method: :delete, class: "btn", data: {turbo_confirm: "Are you sure?"} %>
|
15
|
+
</th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<% @emails.each do |email| %>
|
20
|
+
<tr>
|
21
|
+
<td><%= link_to email.subject, message_path(email.message_id) %></td>
|
22
|
+
<td><%= l email.date, format: :long %></td>
|
23
|
+
<td><%= button_to "Delete", message_path(email.message_id), method: :delete, data: {turbo_confirm: "Are you sure?"}, class: "btn" %></td>
|
24
|
+
</tr>
|
25
|
+
<% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
12
28
|
<% else %>
|
13
29
|
<p>You have not sent any emails.</p>
|
14
30
|
<% end %>
|
@@ -1,12 +1,11 @@
|
|
1
1
|
<nav>
|
2
2
|
<%= link_to "Back to emails", messages_path %>
|
3
|
+
<h1><%= @email.subject %></h1>
|
4
|
+
<%= button_to "Delete", message_path(@email.message_id), method: :delete, class: "btn", data: {turbo_confirm: "Are you sure?"} %>
|
3
5
|
</nav>
|
4
6
|
|
5
7
|
<header>
|
6
8
|
<dl>
|
7
|
-
<dt>Actions</dt>
|
8
|
-
<dd><%= button_to "Delete", message_path(@email.message_id), method: :delete, data: {turbo_confirm: "Are you sure?"} %> </dd>
|
9
|
-
|
10
9
|
<% if Array(@email.from) != Array(@email.smtp_envelope_from) %>
|
11
10
|
<dt>SMTP-From:</dt>
|
12
11
|
<dd id="smtp_from"><%= @email.smtp_envelope_from %></dd>
|
@@ -88,7 +87,7 @@
|
|
88
87
|
<dd>
|
89
88
|
<details>
|
90
89
|
<summary>Show all headers</summary>
|
91
|
-
<table>
|
90
|
+
<table class="headers">
|
92
91
|
<% @email.header_fields.each do |field| %>
|
93
92
|
<tr>
|
94
93
|
<th><%= field.name %>:</th>
|
data/config/importmap.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
pin "application
|
1
|
+
pin "application", to: "mailbin/application.js", preload: true
|
2
2
|
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
|
data/lib/mailbin/engine.rb
CHANGED
@@ -16,13 +16,20 @@ module Mailbin
|
|
16
16
|
end
|
17
17
|
|
18
18
|
initializer "mailbin.assets" do |app|
|
19
|
-
app.config.assets
|
20
|
-
|
19
|
+
if app.config.respond_to?(:assets)
|
20
|
+
app.config.assets.paths << root.join("app/assets/stylesheets")
|
21
|
+
app.config.assets.paths << root.join("app/javascript")
|
22
|
+
app.config.assets.precompile += %w[ mailbin_manifest ]
|
23
|
+
end
|
21
24
|
end
|
22
25
|
|
23
26
|
initializer "mailbin.importmap", before: "importmap" do |app|
|
24
|
-
|
25
|
-
|
27
|
+
Mailbin.importmap.draw root.join("config/importmap.rb")
|
28
|
+
Mailbin.importmap.cache_sweeper watches: root.join("app/javascript")
|
29
|
+
|
30
|
+
ActiveSupport.on_load(:action_controller_base) do
|
31
|
+
before_action { Mailbin.importmap.cache_sweeper.execute_if_updated }
|
32
|
+
end
|
26
33
|
end
|
27
34
|
end
|
28
35
|
end
|
data/lib/mailbin/version.rb
CHANGED
data/lib/mailbin.rb
CHANGED
@@ -5,6 +5,8 @@ module Mailbin
|
|
5
5
|
autoload :DeliveryMethod, "mailbin/delivery_method"
|
6
6
|
autoload :InlinePreviewInterceptor, "mailbin/inline_preview_interceptor"
|
7
7
|
|
8
|
+
mattr_accessor :importmap, default: Importmap::Map.new
|
9
|
+
|
8
10
|
class << self
|
9
11
|
def all
|
10
12
|
Dir.glob("*.eml", base: settings[:location]).map do |message_id|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailbin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Oliver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -78,13 +78,13 @@ files:
|
|
78
78
|
- lib/mailbin/engine.rb
|
79
79
|
- lib/mailbin/inline_preview_interceptor.rb
|
80
80
|
- lib/mailbin/version.rb
|
81
|
-
homepage: https://github.com
|
81
|
+
homepage: https://github.com/excid3/mailbin
|
82
82
|
licenses:
|
83
83
|
- MIT
|
84
84
|
metadata:
|
85
|
-
homepage_uri: https://github.com
|
86
|
-
source_code_uri: https://github.com
|
87
|
-
changelog_uri: https://github.com
|
85
|
+
homepage_uri: https://github.com/excid3/mailbin
|
86
|
+
source_code_uri: https://github.com/excid3/mailbin
|
87
|
+
changelog_uri: https://github.com/excid3/mailbin
|
88
88
|
post_install_message:
|
89
89
|
rdoc_options: []
|
90
90
|
require_paths:
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.5.
|
103
|
+
rubygems_version: 3.5.18
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Mailbin collects emails from Rails ActionMailer in development for testing.
|