capybara-email 2.2.0 → 2.2.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/driver.rb +4 -1
- data/lib/capybara/email/node.rb +5 -0
- data/lib/capybara/email/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34013a7a32169cf2e6623ee3233f726eae1c7637
|
4
|
+
data.tar.gz: 058a077ec6feadaad0c6d4851a1ecdbe1d214770
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62bcce3d61139980e3151a536ade50be359b197af06002a781cdf37bc9866cb4f6f459aee5d93092fe6868ad13ff23f4f6ce784893a7be2ede204cc68af009a9
|
7
|
+
data.tar.gz: 4c233885ff5e0b439763169001221fef849ddfe2ddde823ae4e09ed20a10f8c6e5918bd33748dd86b5f0ea15de89fa3a16e7f2d3a66d618abed8e134bcc47dd8
|
@@ -7,7 +7,10 @@ class Capybara::Email::Driver < Capybara::Driver::Base
|
|
7
7
|
|
8
8
|
def follow(url)
|
9
9
|
url = URI.parse(url)
|
10
|
-
|
10
|
+
host = "#{url.scheme}://#{url.host}"
|
11
|
+
host << ":#{url.port}" unless url.port == url.default_port
|
12
|
+
host_with_path = File.join(host, url.path)
|
13
|
+
Capybara.current_session.visit([host_with_path, url.query].compact.join('?'))
|
11
14
|
end
|
12
15
|
|
13
16
|
def body
|
data/lib/capybara/email/node.rb
CHANGED
@@ -15,6 +15,10 @@ class Capybara::Email::Node < Capybara::Driver::Node
|
|
15
15
|
Capybara::Helpers.normalize_whitespace(unnormalized_text)
|
16
16
|
end
|
17
17
|
|
18
|
+
def all_text
|
19
|
+
Capybara::Helpers.normalize_whitespace(text)
|
20
|
+
end
|
21
|
+
|
18
22
|
def click
|
19
23
|
driver.follow(self[:href].to_s)
|
20
24
|
end
|
@@ -30,6 +34,7 @@ class Capybara::Email::Node < Capybara::Driver::Node
|
|
30
34
|
def find(locator)
|
31
35
|
native.xpath(locator).map { |node| self.class.new(driver, node) }
|
32
36
|
end
|
37
|
+
alias :find_xpath :find
|
33
38
|
|
34
39
|
protected
|
35
40
|
|
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.2.
|
4
|
+
version: 2.2.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:
|
11
|
+
date: 2014-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
33
|
+
version: 2.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
40
|
+
version: 2.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: actionmailer
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.0.3
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Test your ActionMailer and Mailer messages in Capybara
|