nilclass-maildir 0.4.2 → 0.4.3

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -14,9 +14,10 @@ module Maildir::Subdirs
14
14
  end
15
15
 
16
16
  def subdir_by_path(sd_path)
17
+ return self if sd_path == ROOT_NAME
17
18
  if(File.directory?(p = File.join(path, ".#{sd_path}")))
18
19
  Maildir.new(p, false)
19
- elsif(File.directory?(p = File.join(path, ".INBOX.#{sd_path}")))
20
+ elsif(File.directory?(p = File.join(path, ".#{ROOT_NAME}.#{sd_path}")))
20
21
  Maildir.new(p, false)
21
22
  else
22
23
  raise MaildirNotFound
data/test/test_subdirs.rb CHANGED
@@ -42,6 +42,10 @@ class TestSubdirs < Test::Unit::TestCase
42
42
  @maildir.subdir_by_path('a.b.c')
43
43
  end
44
44
  end
45
+
46
+ should "return the mailbox itself" do
47
+ assert @maildir.subdir_by_path('INBOX') == @maildir
48
+ end
45
49
  end
46
50
 
47
51
  context "A subdir" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nilclass-maildir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Suggs