goatmail 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/goatmail/app.rb +15 -9
- data/lib/goatmail/assets/stylesheets/application.css +1 -0
- data/lib/goatmail/message.rb +4 -0
- data/lib/goatmail/version.rb +1 -1
- data/lib/goatmail/views/index.erb +2 -2
- data/lib/goatmail/views/layout.erb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13683a9c7ec6109131989e5717ff34615b43b50f
|
4
|
+
data.tar.gz: ffdb73b2ac5a73f746987623261c059c0faf9bd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b4fdd461cc450689780927f4d4db370ec147eb877d2ea49d4a5504741f6e3b730d9d124a88a0785a91ffe8406864e55330ada740ccd7a8b256824a7e96b338c
|
7
|
+
data.tar.gz: 15ef1105ee23da4adf259ac1de0c50f35545320e387c586c2e6195ef71e9bc9ce2abf97a793af9b50f8772e75c08bc9520831eb445fcf4bc1927c9ab31a76cad
|
data/lib/goatmail/app.rb
CHANGED
@@ -5,12 +5,6 @@ require 'goatmail/message'
|
|
5
5
|
module Goatmail
|
6
6
|
class App < Sinatra::Base
|
7
7
|
|
8
|
-
set :root, File.expand_path(File.dirname(__FILE__))
|
9
|
-
set :public_folder, Proc.new { "#{root}/assets" }
|
10
|
-
set :views, Proc.new { "#{root}/views" }
|
11
|
-
|
12
|
-
enable :method_override
|
13
|
-
|
14
8
|
if defined?(Padrino) && Padrino.version < '0.13.0'
|
15
9
|
def self.setup_application!; end
|
16
10
|
def self.dependencies; []; end
|
@@ -21,14 +15,26 @@ module Goatmail
|
|
21
15
|
end
|
22
16
|
end
|
23
17
|
|
18
|
+
configure do
|
19
|
+
set :root, File.expand_path(File.dirname(__FILE__))
|
20
|
+
set :public_folder, Proc.new { "#{root}/assets" }
|
21
|
+
set :views, Proc.new { "#{root}/views" }
|
22
|
+
|
23
|
+
enable :method_override
|
24
|
+
end
|
25
|
+
|
24
26
|
helpers do
|
27
|
+
def root_path
|
28
|
+
"#{env['SCRIPT_NAME']}/"
|
29
|
+
end
|
30
|
+
|
25
31
|
def h(text)
|
26
32
|
Rack::Utils.escape_html(text)
|
27
33
|
end
|
28
|
-
end
|
29
34
|
|
30
|
-
|
31
|
-
|
35
|
+
def title
|
36
|
+
[ settings.environment, Goatmail.name ].join("::")
|
37
|
+
end
|
32
38
|
end
|
33
39
|
|
34
40
|
get '/' do
|
data/lib/goatmail/message.rb
CHANGED
data/lib/goatmail/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class='navbar navbar-fixed-top header'>
|
2
2
|
<div class='container'>
|
3
3
|
<div class='navbar-header'>
|
4
|
-
<a class='navbar-brand' href="<%= root_path %>"
|
4
|
+
<a class='navbar-brand' href="<%= root_path %>"><%= title %></a>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
</div>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<li class="list-group-item message">
|
40
40
|
<input id="message_<%= message.id %>" name="message_ids[]" type="checkbox" value="<%= message.id %>" />
|
41
41
|
<label for="message_<%= message.id %>"></label>
|
42
|
-
<a href="<%= root_path + message.
|
42
|
+
<a href="<%= root_path + message.path %>" target='mail'>
|
43
43
|
<dl>
|
44
44
|
<dt><%=h message.meta[:subject] || message.id %></dt>
|
45
45
|
<dd class="text-right"><small><%= message.sent_at %></small></dd>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
7
|
-
<title
|
7
|
+
<title><%= title %></title>
|
8
8
|
<link href="<%= root_path %>stylesheets/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
|
9
9
|
<link href="<%= root_path %>stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />
|
10
10
|
</head>
|