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 +4 -4
- data/LICENSE +10 -0
- data/lib/escapement/block.rb +2 -0
- data/lib/escapement/html.rb +1 -1
- data/lib/escapement/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a46aa47d6db1ce9a673eff7fc0eb2f8591839bcb
|
4
|
+
data.tar.gz: bcd5175cc3255aa72691ef3d49f5eb6e890e9403
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/escapement/block.rb
CHANGED
data/lib/escapement/html.rb
CHANGED
@@ -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
|
data/lib/escapement/version.rb
CHANGED
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.
|
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-
|
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.
|
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.
|