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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e436785734a1ee52e8ccc8d655f5d9ba003cd19
4
- data.tar.gz: 77f0e9294f7297982be7a1cd3f129047da7d7594
3
+ metadata.gz: c4f16c16cf3941681ec81b3076b87b2aafc71cbe
4
+ data.tar.gz: 32458709121f16a7f3e83a04414c0724eafa3b37
5
5
  SHA512:
6
- metadata.gz: 4d923b10b99c612df79731366765266894604681b598e60b0b9275cf1ee446b233dc0f10f2c47ed2004325cf581f20863ce8fba64f6eb6961720a186b9731996
7
- data.tar.gz: b7afe1275d327cd3cca404da8265d1beab61f97374333b27f8ca2506f3a604e71a5790162aabb891b8d7841e846d984334f5c0fb362361aaf9e46e63f06a4e06
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
- url = image_node.attribute('src').to_s
33
- ACTV::AssetImage.new imageUrlAdr: url
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
@@ -1,3 +1,3 @@
1
1
  module ACTV
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
@@ -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.2
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-26 00:00:00.000000000 Z
11
+ date: 2015-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday