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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df0f2e65e3c7ea23827c6c4dcf350027aeffd11b
4
- data.tar.gz: 041b2f6d439b71684abf5f67852db5d76614306c
3
+ metadata.gz: 13683a9c7ec6109131989e5717ff34615b43b50f
4
+ data.tar.gz: ffdb73b2ac5a73f746987623261c059c0faf9bd9
5
5
  SHA512:
6
- metadata.gz: f1f3509cacb7368af1a518d022e90745bca466dff2adb2312cccb935c1201693c1069f64cf13a81654009e039385824c505882399b5bd94ae1b5c4b1ed21cf29
7
- data.tar.gz: c7587934ccac4c1b3955ab51f3c1116ed10d92347200990943ad6c692ed1fbb25748422d0d7baa86717ca058c87c12ca6c09c7d67972df63cb3f3d2a8b54e093
6
+ metadata.gz: 4b4fdd461cc450689780927f4d4db370ec147eb877d2ea49d4a5504741f6e3b730d9d124a88a0785a91ffe8406864e55330ada740ccd7a8b256824a7e96b338c
7
+ data.tar.gz: 15ef1105ee23da4adf259ac1de0c50f35545320e387c586c2e6195ef71e9bc9ce2abf97a793af9b50f8772e75c08bc9520831eb445fcf4bc1927c9ab31a76cad
@@ -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
- def root_path
31
- "#{env['SCRIPT_NAME']}/"
35
+ def title
36
+ [ settings.environment, Goatmail.name ].join("::")
37
+ end
32
38
  end
33
39
 
34
40
  get '/' do
@@ -104,6 +104,7 @@ iframe {
104
104
  li.message input[type="checkbox"] + label {
105
105
  position: absolute;
106
106
  top: 20px;
107
+ color: #424242;
107
108
  }
108
109
  li.message input[type="checkbox"]:checked + label:after {
109
110
  content: "X";
@@ -51,6 +51,10 @@ module Goatmail
51
51
  end
52
52
  end
53
53
 
54
+ def path
55
+ File.exist?(File.join(base_dir, "rich.html")) ? "#{id}.html" : id
56
+ end
57
+
54
58
  private
55
59
 
56
60
  def base_dir
@@ -1,5 +1,5 @@
1
1
  module Goatmail
2
- VERSION = "1.1.0" unless defined? Goatmail::VERSION
2
+ VERSION = "1.1.1" unless defined? Goatmail::VERSION
3
3
 
4
4
  def self.version
5
5
  VERSION
@@ -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 %>">Goatmail</a>
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.id %>" target='mail'>
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>Goatmail</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>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goatmail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takeshi Yabe