actv 1.4.2 → 1.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.
- checksums.yaml +4 -4
- data/lib/actv/author.rb +4 -2
- data/lib/actv/version.rb +1 -1
- data/spec/actv/author_spec.rb +12 -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: c4f16c16cf3941681ec81b3076b87b2aafc71cbe
|
4
|
+
data.tar.gz: 32458709121f16a7f3e83a04414c0724eafa3b37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f13614057c057d6e516e3145a80cf9a6005b5ff5dad0d9d685993ff57aa9b7caa41e0352be81872f5dd235fc921f7ab731d16fffb562929b2e867aa28fbc6716
|
7
|
+
data.tar.gz: bfa6374476458da0209ec4abbb6617b9a00f30ce106d8a9058988f3f7dd93bc7ec151f0cb496092b0cc327e57371007f12ef75c572cd972f17da70ab43596793
|
data/lib/actv/author.rb
CHANGED
@@ -29,8 +29,10 @@ module ACTV
|
|
29
29
|
def photo
|
30
30
|
@photo ||= begin
|
31
31
|
image_node = from_footer 'div.signature-block-photo img'
|
32
|
-
|
33
|
-
|
32
|
+
if image_node
|
33
|
+
url = image_node.attribute('src').to_s
|
34
|
+
ACTV::AssetImage.new imageUrlAdr: url
|
35
|
+
end
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
data/lib/actv/version.rb
CHANGED
data/spec/actv/author_spec.rb
CHANGED
@@ -32,6 +32,18 @@ describe ACTV::Author do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
describe '#photo' do
|
36
|
+
context 'when the footer has an image' do
|
37
|
+
its(:photo) { should be_a ACTV::AssetImage }
|
38
|
+
end
|
39
|
+
context 'when the footer does not have an image' do
|
40
|
+
before do
|
41
|
+
allow(author).to receive(:from_footer).with("div.signature-block-photo img").and_return nil
|
42
|
+
end
|
43
|
+
its(:photo) { should be_nil }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
35
47
|
describe '#image_url' do
|
36
48
|
context 'when photo url is a fully qualified url' do
|
37
49
|
it 'returns the photo url' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathaniel Barnes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|