decoration_mail 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{decoration_mail}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dai Akatsuka"]
12
- s.date = %q{2011-03-10}
12
+ s.date = %q{2011-03-22}
13
13
  s.description = %q{Decoration Mail Parser}
14
14
  s.email = %q{d.akatsuka@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
43
43
  ]
44
44
  s.homepage = %q{https://github.com/dakatsuka/decoration_mail}
45
45
  s.require_paths = ["lib"]
46
- s.rubygems_version = %q{1.5.2}
46
+ s.rubygems_version = %q{1.6.2}
47
47
  s.summary = %q{Decoration Mail Parser}
48
48
  s.test_files = [
49
49
  "spec/spec_helper.rb",
@@ -6,7 +6,7 @@ module DecorationMail
6
6
 
7
7
  def initialize(mail)
8
8
  each_attachments(mail)
9
- @subject = mail.subject.encode("UTF-8")
9
+ @subject = mail.subject.blank? ? nil : mail.subject.encode("UTF-8")
10
10
  @body_text = parse_text(mail.text_part)
11
11
  @body_html = parse_html(mail.html_part)
12
12
  end
@@ -2,6 +2,15 @@
2
2
  require File.expand_path('../../spec_helper', __FILE__)
3
3
 
4
4
  describe DecorationMail::Base do
5
+ context "when subject is blank" do
6
+ before do
7
+ @mail = Mail.read(File.expand_path('../../resources/docomo_decoration_with_attachment.eml', __FILE__))
8
+ @mail.subject = nil
9
+ end
10
+ subject { @mail.decoration }
11
+ its(:subject) { should be_nil }
12
+ end
13
+
5
14
  context "received DoCoMo" do
6
15
  before do
7
16
  @mail = Mail.read(File.expand_path('../../resources/docomo_decoration_with_attachment.eml', __FILE__))
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: decoration_mail
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.2
5
+ version: 0.2.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dai Akatsuka
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-10 00:00:00 +09:00
13
+ date: 2011-03-22 00:00:00 +09:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  requirements: []
115
115
 
116
116
  rubyforge_project:
117
- rubygems_version: 1.5.2
117
+ rubygems_version: 1.6.2
118
118
  signing_key:
119
119
  specification_version: 3
120
120
  summary: Decoration Mail Parser