oai 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- RUBY_OAI_VERSION = '0.0.10'
1
+ RUBY_OAI_VERSION = '0.0.11'
2
2
 
3
3
  require 'rubygems'
4
4
  require 'rake'
@@ -7,7 +7,7 @@ module OAI
7
7
  @status = get_attribute(element, 'status')
8
8
  @identifier = xpath(element, './/identifier')
9
9
  @datestamp = xpath(element, './/datestamp')
10
- @set_spec = xpath(element, './/setSpec')
10
+ @set_spec = xpath_all(element, './/setSpec')
11
11
  end
12
12
 
13
13
  def deleted?
@@ -22,7 +22,7 @@ module OAI
22
22
 
23
23
  # returns REXML::Element nodes for each description section
24
24
  # if the OAI::Client was configured to use libxml then you will
25
- # instead get a XML::Node object.
25
+ # instead get a LibXML::XML::Node object.
26
26
  def descriptions
27
27
  return xpath_all(doc, './/Identify/description')
28
28
  end
@@ -15,9 +15,14 @@ module OAI
15
15
  when 'REXML::Element'
16
16
  message = error.text
17
17
  code = error.attributes['code']
18
- when 'XML::Node'
18
+ when 'LibXML::XML::Node'
19
19
  message = error.content
20
- code = error.property('code')
20
+ code = ""
21
+ if defined?(error.property) == nil
22
+ code = error.attributes['code']
23
+ else
24
+ code.property('code')
25
+ end
21
26
  end
22
27
  raise OAI::Exception.new(message, code)
23
28
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: oai
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.10
7
- date: 2008-09-12 00:00:00 -07:00
6
+ version: 0.0.11
7
+ date: 2008-09-19 00:00:00 -07:00
8
8
  summary: A ruby library for working with the Open Archive Initiative Protocol for Metadata Harvesting (OAI-PMH)
9
9
  require_paths:
10
10
  - lib