oai 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -0
- data/Rakefile +1 -1
- data/lib/oai/client/response.rb +5 -1
- data/lib/oai/xpath.rb +7 -1
- metadata +2 -2
data/README
CHANGED
data/Rakefile
CHANGED
data/lib/oai/client/response.rb
CHANGED
@@ -21,7 +21,11 @@ module OAI
|
|
21
21
|
if defined?(error.property) == nil
|
22
22
|
code = error.attributes['code']
|
23
23
|
else
|
24
|
-
|
24
|
+
begin
|
25
|
+
code = error["code"]
|
26
|
+
rescue
|
27
|
+
code = error.property('code')
|
28
|
+
end
|
25
29
|
end
|
26
30
|
end
|
27
31
|
raise OAI::Exception.new(message, code)
|
data/lib/oai/xpath.rb
CHANGED
@@ -42,7 +42,13 @@ module OAI
|
|
42
42
|
if defined?(node.property) == nil
|
43
43
|
return node.attributes[attr_name]
|
44
44
|
else
|
45
|
-
|
45
|
+
#node.property is being deprecated. We'll eventually remove
|
46
|
+
#this trap
|
47
|
+
begin
|
48
|
+
return node[attr_name]
|
49
|
+
rescue
|
50
|
+
return node.property(attr_name)
|
51
|
+
end
|
46
52
|
end
|
47
53
|
end
|
48
54
|
return nil
|
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.
|
7
|
-
date: 2008-
|
6
|
+
version: 0.0.12
|
7
|
+
date: 2008-12-22 00:00:00 -08: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
|