escapement 0.1.0 → 0.1.1

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: 7756a2e57d00b9d7842a0f09fb4396755144b620
4
- data.tar.gz: e04508786e9c91d6778f4f1e97a4386c79025f33
3
+ metadata.gz: a46aa47d6db1ce9a673eff7fc0eb2f8591839bcb
4
+ data.tar.gz: bcd5175cc3255aa72691ef3d49f5eb6e890e9403
5
5
  SHA512:
6
- metadata.gz: 65e3b2b84fb12da56c5f979764776b65aac28e992246b4ff601603fe51624d9623dc0287ffeb94f8993ecc531f2a2974bc41bbabf2f0538aa8e5cd9c1e753d2b
7
- data.tar.gz: 744c837d2c0477c353fe604e0b192f31df63894ee2403b70a6e28323d7253699bc02613fb841e4700457dc02c4e2b0e11102957f163986181533c7542cfdaee3
6
+ metadata.gz: 0e043beaf9b7c2f73e09106c0284798ab76ec8755f7e3464955e12b4957bfbe120a33454352c033599e86b47fbd1d501c6b7c036acf3daa64ef5503f2e09ce8b
7
+ data.tar.gz: cc512ee00507e899cf8623aef6049d7cbfd44b2de54c120ec2e99f8f255e53592c6601da57dc237bb5b5d3705e20f638ea4cbe9c53f1ee9ec6543d71cf5c044f
data/LICENSE ADDED
@@ -0,0 +1,10 @@
1
+ Copyright (c) 2010-2014, HODINKEE
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+ * Neither the name of Ryan LeFevre nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
+
10
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -14,6 +14,8 @@ module Escapement
14
14
  end
15
15
 
16
16
  def process!
17
+ return if node.text.strip.empty?
18
+
17
19
  process_children
18
20
 
19
21
  @result = {
@@ -14,7 +14,7 @@ module Escapement
14
14
  # Extracts all of the entities for each paragraph/block.
15
15
  def extract!
16
16
  @blocks = doc.css('body').children.map { |child| Block.new(child).tap(&:process!) }
17
- @results = @blocks.map(&:result)
17
+ @results = @blocks.reject { |b| b.result.nil? }.map(&:result)
18
18
  end
19
19
  end
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module Escapement
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: escapement
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan LeFevre
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -78,6 +78,7 @@ files:
78
78
  - ".gitignore"
79
79
  - ".rspec"
80
80
  - Gemfile
81
+ - LICENSE
81
82
  - README.md
82
83
  - Rakefile
83
84
  - bin/console
@@ -109,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
110
  version: '0'
110
111
  requirements: []
111
112
  rubyforge_project:
112
- rubygems_version: 2.4.6
113
+ rubygems_version: 2.4.5
113
114
  signing_key:
114
115
  specification_version: 4
115
116
  summary: Extract child entities from an HTML string.