mails_viewer 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.
@@ -5,10 +5,14 @@ module MailsViewer
5
5
  before_filter :find_absolute_filename, only: [:raw, :html, :attachment, :plain]
6
6
 
7
7
  def index
8
- Dir.chdir(mails_path) do
9
- @mails = Dir["**/*"]
10
- .select{|f| File.file?(f)}
11
- .map{|f| [Mail.read(f), f]}
8
+ if File.exist?(mails_path)
9
+ Dir.chdir(mails_path) do
10
+ @mails = Dir["**/*"]
11
+ .select{|f| File.file?(f)}
12
+ .map{|f| [Mail.read(f), f]}
13
+ end
14
+ else
15
+ @mails = []
12
16
  end
13
17
  end
14
18
 
@@ -1,3 +1,3 @@
1
1
  module MailsViewer
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: mails_viewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-03-21 00:00:00.000000000 Z
13
+ date: 2013-03-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails