openurl 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,6 @@ module OpenURL
18
18
  @author_keys = ['aulast','aufirst','auinit','auinit1','auinitm','ausuffix',
19
19
  'au', 'aucorp']
20
20
  end
21
-
22
21
  def method_missing(metadata, value=nil)
23
22
  meta = metadata.to_s.sub(/=$/,'')
24
23
  raise ArgumentError, "#{meta.to_s} is not a valid #{self.class} metadata field." unless (@author_keys+@metadata_keys).index(meta)
@@ -29,16 +28,10 @@ module OpenURL
29
28
  end
30
29
  else
31
30
  return self.metadata[meta]
32
- end
33
- end
34
-
35
- def respond_to?(message)
36
- # make it match method_messing
37
- key = message.to_s.sub(/=$/,'')
38
- super || (@author_keys+@metadata_keys).index(key)
31
+ end
32
+
39
33
  end
40
34
 
41
-
42
35
  def set_metadata(key, val)
43
36
  @metadata[key] = val.to_s
44
37
  if @author_keys.index(key)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openurl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,24 +10,8 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-10-10 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: marc
17
- requirement: !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: '0'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
30
- version: '0'
13
+ date: 2011-10-10 00:00:00.000000000Z
14
+ dependencies: []
31
15
  description:
32
16
  email:
33
17
  - rochkind@jhu.edu
@@ -58,7 +42,6 @@ files:
58
42
  - test/test.yml
59
43
  - test/context_object_test.rb
60
44
  - test/encoding_test.rb
61
- - test/scholarly_common_test.rb
62
45
  - README.md
63
46
  homepage: https://github.com/openurl/openurl
64
47
  licenses: []
@@ -80,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
63
  version: '0'
81
64
  requirements: []
82
65
  rubyforge_project:
83
- rubygems_version: 1.8.24
66
+ rubygems_version: 1.8.10
84
67
  signing_key:
85
68
  specification_version: 3
86
69
  summary: a Ruby library to create, parse and use NISO Z39.88 OpenURLs
@@ -1,13 +0,0 @@
1
- class ScholarlyCommonTest < Test::Unit::TestCase
2
-
3
- def test_respond_to
4
- kev = "url_ver=Z39.88-2004&rfr_id=info:sid/library.jhu.edu%3Axerxes+%28+OmniFile+Full+Text+Mega%29&rft.genre=article&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.issn=00297917&rft.date=2012&rft.tpages=2+pages&rft.jtitle=Occupational+Health&rft.volume=64&rft.issue=5&rft.spage=14&rft.epage=15&rft.atitle=Inhalation+versus+skin+exposure+%3A+have+we+got+the+balance+right%3F+&rft.aulast=Packham&rft.aufirst=Chris+Partner%2C+EnviroDerm+Services"
5
-
6
- openurl = OpenURL::ContextObject.new_from_kev(kev)
7
-
8
- assert openurl.referent.respond_to? :jtitle
9
- assert openurl.referent.respond_to? :atitle
10
-
11
- end
12
-
13
- end