code4lib / ruby-oai

a Ruby library for building OAI-PMH clients and servers
MIT License
62 stars 43 forks source link

fixed minor bugs #2

Closed pechase closed 12 years ago

pechase commented 12 years ago

Hi,

I am using the ruby-oai Provider, and ran into a couple of minor problems, which I fixed in this fork. The valid? method in OAI::Provider::Response had a nil array error when the verb has no valid arguments, but an argument has been mistakenly included in the request. For example -- when an identifier argument is included with the verb Identify. I added a line so it will raise an ArgumentException in that case.

The ResumptionToken class raises a ResumptionTokenException, which I changed to OAI::ResumptionTokenException. Even though this is not caught by the tests, it prevented my application from finding the ResumptionTokenException.

I also made a slight change in test/provider/models.rb, because the tests would not run otherwise.