Skip to content

Commit 357c213

Browse files
committed
mention how to run tests in README
1 parent 95b0462 commit 357c213

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ ruby-oai
22
========
33

44
ruby-oai is a Open Archives Protocol for Metadata Harvesting (OAI-PMH)
5-
library for Ruby. [OAI-PMH](http://openarchives.org) is a somewhat
6-
archaic protocol for sharing metadata between digital library repositories.
5+
library for Ruby. [OAI-PMH](http://openarchives.org) is a somewhat
6+
archaic protocol for sharing metadata between digital library repositories.
77
If you are looking to share metadata on the web you are probably better off
8-
using a feed format like [RSS](http://www.rssboard.org/rss-specification) or
9-
[Atom](http://www.atomenabled.org/). If have to work with a backwards
10-
digital repository that only offers OAI-PMH access then ruby-oai is your
8+
using a feed format like [RSS](http://www.rssboard.org/rss-specification) or
9+
[Atom](http://www.atomenabled.org/). If have to work with a backwards
10+
digital repository that only offers OAI-PMH access then ruby-oai is your
1111
friend.
1212

13-
The [OAI-PMH](http://openarchives.org) spec defines six verbs
14-
(`Identify`, `ListIdentifiers`, `ListRecords`,
13+
The [OAI-PMH](http://openarchives.org) spec defines six verbs
14+
(`Identify`, `ListIdentifiers`, `ListRecords`,
1515
`GetRecords`, `ListSets`, `ListMetadataFormat`) used for discovery and sharing of
1616
metadata.
1717

@@ -21,15 +21,15 @@ a interactive harvesting shell.
2121
Client
2222
------
2323

24-
The OAI client library is used for harvesting metadata from repositories.
24+
The OAI client library is used for harvesting metadata from repositories.
2525
For example to initiate a ListRecords request to pubmed you can:
2626

2727
```ruby
2828
require 'oai'
2929
client = OAI::Client.new 'http://www.pubmedcentral.gov/oai/oai.cgi', :headers => { "From" => "[email protected]" }
3030
response = client.list_records
3131
# Get the first page of records
32-
response.each do |record|
32+
response.each do |record|
3333
puts record.metadata
3434
end
3535
# Get the second page of records
@@ -81,6 +81,15 @@ Alternately it can be installed globally using RubyGems:
8181

8282
$ gem install oai
8383

84+
Running tests
85+
-------------
86+
87+
Tests are with Test::Unit, in a somewhat archaic/legacy style. Test setup especially is not how we would do things today. Run all tests with:
88+
89+
$ bundle exec rake test
90+
91+
There are also convenience tasks to run subsets of tests.
92+
8493
License
8594
-------
8695

0 commit comments

Comments
 (0)