roda-component 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/lib/roda/component.rb +5 -1
- data/lib/roda/component/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 215bb6602958dc06a8502a62335096657a0850c3
|
4
|
+
data.tar.gz: b4371617ad7f91ed5e77f2aa359ce97f3f4526b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c93adfa28fff329aeda042c96cecdda13275eb5adb842040cf378d82aea9a2961f972cbae996c908a99182431fe19242628dbcc6199c32614f4d174c4e51b0f
|
7
|
+
data.tar.gz: 0a0816a7b3eb6f3f554be124073e7bc8d3dd5eb9e271562b305d7435d2e6ef3bcdd9b3d6cd749aacb74ddb9b6eaaa8080ae7631299fc2d4af17f1e81ec45b0fd
|
data/lib/roda/component.rb
CHANGED
@@ -154,7 +154,11 @@ class Roda
|
|
154
154
|
if defined? Oga
|
155
155
|
Oga.parse_html(raw_html)
|
156
156
|
elsif defined? Nokogiri
|
157
|
-
|
157
|
+
if raw_html[/\A<!DOCTYPE/]
|
158
|
+
Nokogiri::HTML(raw_html)
|
159
|
+
else
|
160
|
+
Nokogiri::HTML.fragment(raw_html)
|
161
|
+
end
|
158
162
|
else
|
159
163
|
warn 'No HTML parsing lib loaded. Please require Nokogiri or Oga'
|
160
164
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roda-component
|
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
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|