README.md in yasuri-2.0.13 vs README.md in yasuri-3.0.0

- old
+ new

@@ -1,6 +1,7 @@ -# Yasuri [![Build Status](https://travis-ci.org/tac0x2a/yasuri.svg?branch=master)](https://travis-ci.org/tac0x2a/yasuri) [![Coverage Status](https://coveralls.io/repos/tac0x2a/yasuri/badge.svg?branch=master)](https://coveralls.io/r/tac0x2a/yasuri?branch=master) [![Code Climate](https://codeclimate.com/github/tac0x2a/yasuri/badges/gpa.svg)](https://codeclimate.com/github/tac0x2a/yasuri) +# Yasuri +[![Build Status](https://travis-ci.org/tac0x2a/yasuri.svg?branch=master)](https://travis-ci.org/tac0x2a/yasuri) [![Coverage Status](https://coveralls.io/repos/tac0x2a/yasuri/badge.svg?branch=master)](https://coveralls.io/r/tac0x2a/yasuri?branch=master) [![Maintainability](https://api.codeclimate.com/v1/badges/c29480fea1305afe999f/maintainability)](https://codeclimate.com/github/tac0x2a/yasuri/maintainability) Yasuri (鑢) is an easy web-scraping library for supporting "[Mechanize](https://github.com/sparklemotion/mechanize)". Yasuri can reduce frequently processes in Scraping. @@ -57,16 +58,12 @@ src = <<-EOYAML root: node: links path: "//*[@id='menu']/ul/li/a" children: - - title: - node: text - path: "//*[@id='contents']/h2" - - content: - node: text - path: "//*[@id='contents']/p[1]" + - title: { node: text, path: "//*[@id='contents']/h2" } + - content: { node: text, path: "//*[@id='contents']/p[1]" } EOYAML root = Yasuri.yaml2tree(src) # Node tree constructing by JSON @@ -93,9 +90,20 @@ result = root.inject(agent, root_page) # => [ {"title" => "PageTitle", "content" => "Page Contents" }, ... ] ``` +## Dev +```sh +$ gem install bundler +$ bundle install +``` +### Test +```sh +$ rake +# or +$ rspec spec/*spec.rb +``` ## Contributing 1. Fork it ( https://github.com/tac0x2a/yasuri/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`)