wriggler 1.2.2 → 1.3.0

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: d68d40f54b7e9d53d5099d37da64231319ddfed2
4
- data.tar.gz: 5166053c1ec6f2410306833736fdef4c3e01f4e0
3
+ metadata.gz: 92e026f6d129cad6ba890e1c23e98ad8a48a2918
4
+ data.tar.gz: 5f759a905eec16613eec0cdcf8e1f0d8e19b4e1c
5
5
  SHA512:
6
- metadata.gz: 545d2f915f9bdab1573b531e470deffbe7bed29746c119d0b5d8a5a6ba0289471f0305bd62b3bd736ed6be06a9aacc3a722934ccb6f3321a3db2c37f77dce907
7
- data.tar.gz: 5b8ae8bdf717135417ec0aa6814f5bd6f0d6bb8a615b656d6979b5541a36890e1fec76aff273f895c3f6111247e9b48e501af2f2e489361109fef7909e22ddd6
6
+ metadata.gz: ca9c5e3a15dc0b0422522b241d01b5b7ac10de666d114a8b87a5114fc4439328323f9a04628022e02d2376a40f83a98a3da20b9921425f1f49a39ce4bda431e0
7
+ data.tar.gz: 03d25bae580a894d6251b5cc3c19057971414715ca6f6a3e61561723e8242a1048d0ed81f3665f6892b5911ea5b49cab7374dbc7ba42deaa445519c0cd4007f5
@@ -1,3 +1,3 @@
1
1
  module Wriggler
2
- VERSION = "1.2.2"
2
+ VERSION = "1.3.0"
3
3
  end
data/lib/wriggler.rb CHANGED
@@ -67,6 +67,8 @@ module Wriggler
67
67
  arr = []
68
68
  if !doc.xpath("//#{key}").empty? #Returns an empty array if tag is not present
69
69
  doc.xpath("//#{key}").map{ |tag| arr << sanitize(tag.text) }
70
+ else
71
+ doc.xpath("//#{key}").map{ |_| arr << "" }
70
72
  end
71
73
  @content.fetch(key) << arr
72
74
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wriggler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliott Young
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-09 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler