Clean up README

And remove Guard command
This commit is contained in:
Shane Becker 2015-12-23 12:28:22 -08:00
parent dc884bdc2b
commit 7647446ea8

View file

@ -42,24 +42,30 @@ Not Implemented:
## Requirements ## Requirements
* "nokogiri" * [nokogiri](https://github.com/sparklemotion/nokogiri)
* "json" * [json](https://github.com/flori/json)
* "activesupport" * [activesupport](https://github.com/rails/rails/tree/master/activesupport)
## Installation ## Installation
Add this line to your application's Gemfile: Add this line to your application's Gemfile:
gem 'microformats2' ```ruby
gem "microformats2"
```
And then execute: And then execute:
$ bundle ```
bundle
```
Or install it yourself as: Or install it yourself as:
$ gem install microformats2 ```
gem install microformats2
```
## Usage ## Usage
@ -67,17 +73,17 @@ Or install it yourself as:
```ruby ```ruby
require "microformats2" require "microformats2"
source = '<div class="h-card"><p class="p-name">Jessica Lynn Suttles</p></div>' source = "<div class='h-card'><p class='p-name'>Jessica Lynn Suttles</p></div>"
collection = Microformats2.parse(source) collection = Microformats2.parse(source)
# using singular accessors # using singular accessors
collection.card.name.to_s #=> "Jessica Lynn Suttles" collection.card.name.to_s #=> "Jessica Lynn Suttles"
# using plural accessors # using plural accessors
collection.cards.first.names.first.to_s #=> "Jessica Lynn Suttles" collection.cards.first.names.first.to_s #=> "Jessica Lynn Suttles"
source = '<article class="h-entry"> source = "<article class='h-entry'>
<h1 class="p-name">Microformats 2</h1> <h1 class='p-name'>Microformats 2</h1>
<div class="h-card p-author"><p class="p-name">Jessica Lynn Suttles</p></div> <div class='h-card p-author'><p class='p-name'>Jessica Lynn Suttles</p></div>
</article>' </article>"
collection = Microformats2.parse(source) collection = Microformats2.parse(source)
collection.entry.name.to_s #=> "Microformats 2" collection.entry.name.to_s #=> "Microformats 2"
# accessing nested microformats # accessing nested microformats
@ -100,6 +106,7 @@ collection.to_json
* Michael Mitchell / [@variousred](https://github.com/variousred) * Michael Mitchell / [@variousred](https://github.com/variousred)
* Jessica Dillon / [@jessicard](https://github.com/jessicard) * Jessica Dillon / [@jessicard](https://github.com/jessicard)
## Contributions ## Contributions
1. Fork it 1. Fork it
@ -118,18 +125,13 @@ If you find bugs, have feature requests or questions, please
To update spec cases that are scraped from other sites. To update spec cases that are scraped from other sites.
**Warning:** This could break specs. **Warning:** This could break specs.
```bash ```
rake specs:update rake specs:update
``` ```
To run specs To run specs
```bash
rake spec
``` ```
rake spec
To keep specs running
```bash
guard
``` ```