microby 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/microby/h_feed.rb +3 -5
- data/lib/microby/version.rb +1 -1
- data/spec/support/example.html +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Microby
|
2
2
|
|
3
|
-
A Ruby gem to parse HTML containing
|
3
|
+
A Ruby gem to parse HTML containing one or more Microformat 2 h-entry elements, returning an a collection of
|
4
4
|
serialized h-entry objects. The returned Object structure looks something like this:
|
5
5
|
|
6
6
|
- HFeed
|
@@ -21,7 +21,7 @@ serialized h-entry objects. The returned Object structure looks something like t
|
|
21
21
|
|
22
22
|
## Current Version
|
23
23
|
|
24
|
-
0.0.
|
24
|
+
0.0.3
|
25
25
|
|
26
26
|
|
27
27
|
## Requirements
|
data/lib/microby/h_feed.rb
CHANGED
@@ -8,11 +8,9 @@ module Microby
|
|
8
8
|
|
9
9
|
def parse_html(html)
|
10
10
|
doc = Nokogiri::HTML(open html)
|
11
|
-
doc.css("
|
12
|
-
|
13
|
-
|
14
|
-
self.entries << entry
|
15
|
-
end
|
11
|
+
doc.css(".h-entry").each do |mf_entry|
|
12
|
+
entry = HEntry.new(mf_entry)
|
13
|
+
self.entries << entry
|
16
14
|
end
|
17
15
|
end
|
18
16
|
|
data/lib/microby/version.rb
CHANGED
data/spec/support/example.html
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|