readme and version bump
This commit is contained in:
parent
06d175b525
commit
c8123de14b
4 changed files with 28 additions and 21 deletions
|
@ -14,7 +14,7 @@ Generic Microformats 2 Extractor
|
||||||
|
|
||||||
## SYNOPSIS
|
## SYNOPSIS
|
||||||
|
|
||||||
Microformats2.parse(File.open("http://iamshane.html"))
|
Microformats2.parse(File.open("example.html"))
|
||||||
|
|
||||||
## REQUIREMENTS
|
## REQUIREMENTS
|
||||||
|
|
||||||
|
@ -36,6 +36,6 @@ run the tests/specs, and generate the RDoc.
|
||||||
|
|
||||||
## LICENSE
|
## LICENSE
|
||||||
|
|
||||||
PUBLIC DOMAIN.
|
**PUBLIC DOMAIN.**
|
||||||
Your heart is as free as the air you breathe.
|
Your heart is as free as the air you breathe.
|
||||||
The ground you stand on is liberated territory.
|
The ground you stand on is liberated territory.
|
1
Rakefile
1
Rakefile
|
@ -6,6 +6,7 @@ require 'hoe'
|
||||||
Hoe.spec 'microformats2' do
|
Hoe.spec 'microformats2' do
|
||||||
developer('Shane Becker', 'veganstraightedge@gmail.com')
|
developer('Shane Becker', 'veganstraightedge@gmail.com')
|
||||||
extra_deps << ['nokogiri', ">= 0"]
|
extra_deps << ['nokogiri', ">= 0"]
|
||||||
|
self.readme_file = "README.md"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ require 'time'
|
||||||
require 'date'
|
require 'date'
|
||||||
|
|
||||||
module Microformats2
|
module Microformats2
|
||||||
VERSION = "1.0.0"
|
VERSION = "1.0.1"
|
||||||
|
|
||||||
class LoadError < StandardError; end
|
class LoadError < StandardError; end
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,12 @@ class TestMicroformats2 < Test::Unit::TestCase
|
||||||
assert_equal "Chris", result[:hcard].first.given_name
|
assert_equal "Chris", result[:hcard].first.given_name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_extracts_hcalendar_from_an_html_file
|
||||||
|
result = Microformats2.parse(File.open(File.join(File.dirname(__FILE__), "IndieWebCamp.html")))
|
||||||
|
assert_equal 1, result[:hevent].length
|
||||||
|
assert result[:hcard].map { |h| h.name }.include?("Urban Airship")
|
||||||
|
end
|
||||||
|
|
||||||
def test_extracts_hcard_from_html
|
def test_extracts_hcard_from_html
|
||||||
hcard = <<-END
|
hcard = <<-END
|
||||||
<html>
|
<html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue