wovnrb 0.1.30 → 0.1.31

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
  SHA1:
3
- metadata.gz: e9d85b179558f48b293acb37c4ef287f20f17005
4
- data.tar.gz: e2ba0fc876f8fcd4707af5cb8bef31825144dd2f
3
+ metadata.gz: daed02abb68cc7f4a52ce07accf99dc89ab1f122
4
+ data.tar.gz: dccbd85844f57f2e0f78503a6b0a43eee294a122
5
5
  SHA512:
6
- metadata.gz: 7d9e1a58c4f142f6db7100569723a3e52d9415cada7c2eda78348367410cd63b6bbb31dc8ea5f84925b67a148d1ff63008139147ffa648dd63c36631ecfed1bd
7
- data.tar.gz: 57d320cbe3b9ece00a8693505b694f182cec08a7abad36afcbb8cfe20e929adcb2e4781a0872e5e9c340260b37c03ae7c21f12319a2e43a06b17f85f7182d3ad
6
+ metadata.gz: d256451b6cff5e74d908e316fd9c9147a1062d60d9a9f4f1ecbcd2956c5c5d883f656d3f9eac0fb37f0459f5e9806205a4ac8a37e5bca82319fc7b579e001a84
7
+ data.tar.gz: 500b3823f814f4fee2e6881ab84688b9364900247e15f4fcc364c1f12fb0aa1204b03f72db660efba5f50601f980f338bb2cb4d08b1991c811b711c4efcbb0aa
data/lib/wovnrb.rb CHANGED
@@ -85,7 +85,9 @@ module Wovnrb
85
85
  d.xpath('//img').each do |node|
86
86
  # use regular expressions to support case insensitivity (right?)
87
87
  if node.to_html =~ /src=['"][^'"]*['"]/i
88
- src = node.to_html.match(/src=['"]([^&'"]*)['"]/i)[1]
88
+ src = node.to_html.match(/src=['"]([^&'"]*)['"]/i)
89
+ return if src.length < 2
90
+ src = src[1]
89
91
  # THIS SRC CORRECTION DOES NOT HANDLE ONE IMPORTANT CASE
90
92
  # 1) "../path/with/ellipse"
91
93
  # if this is not an absolute src
@@ -1,3 +1,3 @@
1
1
  module Wovnrb
2
- VERSION = "0.1.30"
2
+ VERSION = "0.1.31"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wovnrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Sandford