capybara-email 2.1.0 → 2.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/capybara-email.rb +9 -0
- data/lib/capybara/email/driver.rb +1 -1
- data/lib/capybara/email/version.rb +1 -1
- data/lib/capybara/node/email.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0626f3d08e976f8048f7a6e341f19c7a4e4eb3d7
|
4
|
+
data.tar.gz: efe919321728e942554b529b3be6c405ed24259f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b89abafa9a39479af75c5ff83eb2dc9893cac456eaec5eecd3d24bfa84f5e619713749020b5f7545c364c9190a31c4d9165d442e625d2682b2a74d4bca9844a
|
7
|
+
data.tar.gz: 848e3b4338d6039ca518649fcdc7d3bb718de3b45cf3862259e6adf34d97be57c21a0ddb9bb460eb9c48d90998148b67c900bcf96c4b6e10688db34a03e201a9
|
data/lib/capybara-email.rb
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
require 'capybara'
|
2
2
|
require 'mail'
|
3
|
+
|
4
|
+
if defined?(ActionMailer)
|
5
|
+
# Rails 4's ActionMailer::Base is autoloaded
|
6
|
+
# so in the test suite the Mail constant is not
|
7
|
+
# available untl ActionMailer::Base is eval'd
|
8
|
+
# So we must eager-load it
|
9
|
+
ActionMailer::Base
|
10
|
+
end
|
11
|
+
|
3
12
|
module Capybara
|
4
13
|
autoload :Email, 'capybara/email'
|
5
14
|
end
|
@@ -75,7 +75,7 @@ class Capybara::Email::Driver < Capybara::Driver::Base
|
|
75
75
|
#
|
76
76
|
# @return String
|
77
77
|
def raw
|
78
|
-
if email.mime_type
|
78
|
+
if email.mime_type =~ /\Amultipart\/(alternative|related)\Z/
|
79
79
|
if email.html_part
|
80
80
|
return email.html_part.body.to_s
|
81
81
|
elsif email.text_part
|
data/lib/capybara/node/email.rb
CHANGED
@@ -21,6 +21,13 @@ class Capybara::Node::Email < Capybara::Node::Document
|
|
21
21
|
base.to
|
22
22
|
end
|
23
23
|
|
24
|
+
# Delegate to the email reply_to
|
25
|
+
#
|
26
|
+
# @return [Mail::Message#reply_to]
|
27
|
+
def reply_to
|
28
|
+
base.email.reply_to
|
29
|
+
end
|
30
|
+
|
24
31
|
# Delegate to the email from
|
25
32
|
#
|
26
33
|
# @return [Mail::Message#from]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Cardarella
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|