richurls 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 708ee687cae619b4181d746a5654be2d3e7113b8d52494fa2211a5085b89f52b
4
- data.tar.gz: 237bb78f3e46d26298944560bbbe02283998f8044eb0216e0de4fdcd3dc70c62
3
+ metadata.gz: 2dbdaf4f9df0bf062450ca64a1957cc50c0dfe50e634385d5eb0de5e0d851eb9
4
+ data.tar.gz: 297cdeede9eef0a557edaa3c628597beeaeb8508e79bb22f23dc96de0dbdcc54
5
5
  SHA512:
6
- metadata.gz: 68815be064f5b4dbda9af5d7d9030dca75c323debe384a22871671a9092194888e2b102524f58b1082083b59b3fa9605d570d50f7b83e3ba1fec42100d6b5fec
7
- data.tar.gz: 852e95350f1f3de6ce7f7e3366450626c355c514ec63ba302b545fc1b9fadefd68f9f0f2741802df3c798afe1ab486a940c5d8e20a800cddc5002ff79a4c4bb4
6
+ metadata.gz: 6d04c4edf4dfdbfb04898200a1b159cf6bb2db1a510389842c9cf53f56396bb980fe4984c144b152bde6af63f586fe4df8414ea1dae04b736ae099b18dec5ce0
7
+ data.tar.gz: 03d4333c1d937006a1e0295e31bc919108a6765d8a42710ad50b20650ddb0bd669fa8fb6f0c1fb1b6564f70c37fe574ea26359bc47ca771cdb2ec7a864d77372
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- richurls (0.1.6)
4
+ richurls (0.1.7)
5
5
  oj (~> 3)
6
6
  ox (~> 2)
7
7
  patron (~> 0.13)
data/lib/xml_handler.rb CHANGED
@@ -48,12 +48,18 @@ module RichUrls
48
48
  el = @elements.last
49
49
  el.attributes[name] = str
50
50
 
51
- raise StopParsingError if name == WHITELISTED_ATTRS.last
51
+ raise StopParsingError if stop?(name, el)
52
52
  end
53
53
 
54
54
  def text(str)
55
55
  el = @elements.last
56
56
  el && el.attributes[:text].nil? && el.attributes[:text] = str
57
57
  end
58
+
59
+ private
60
+
61
+ def stop?(name, elem)
62
+ name == WHITELISTED_ATTRS.last && elem.name == :img
63
+ end
58
64
  end
59
65
  end
data/richurls.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'richurls'
6
- spec.version = '0.1.6'
6
+ spec.version = '0.1.7'
7
7
  spec.authors = ['grdw']
8
8
  spec.email = ['gerard@wetransfer.com']
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: richurls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - grdw