oai 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08fffc6365464c94b303662af07b8bbb2e5c9be2
4
- data.tar.gz: 359f168eb97821a941f24d6e43cec41e1b3fb517
3
+ metadata.gz: 87d0fab6e4343a4b7523ee0559687d2490862932
4
+ data.tar.gz: 69a74965ef7b9176408befe11bf4a9a9b4e49a74
5
5
  SHA512:
6
- metadata.gz: 8905ea28cd2e3975cb8563a8d4201dd1c7f03fa703185261b7c01d278c9b90dd804c3ab38ca77cddccd3bd0e3c01ec52af40ed7e9db52cebc3f71c3c4eed20e6
7
- data.tar.gz: a9996d70f6ee00a698b79c0bbb8ebf1ce5c7917ca6327e55151d5d0c03750ea9c4dada39c429444e223b17209889196d378ec0bad030fa84ecb8cc54af94f2ef
6
+ metadata.gz: cf7096a011a58d7e37d740d29e0a35195895909356d49af641f9ad80b6e9df2b496da039404371a7a8ab11943e725887b6d251ed804f81a17dd0b3ca1cefac98
7
+ data.tar.gz: bdac7716fa083f23cb622b5f6a2b64068b1047322728ce88dd40c37be6596cd12b64511a4e92ebaf8db846ff8f7f868b66f974557fe003ba07a6154bdd0b5b1c
data/README.md CHANGED
@@ -26,7 +26,7 @@ For example to initiate a ListRecords request to pubmed you can:
26
26
 
27
27
  ```ruby
28
28
  require 'oai'
29
- client = OAI::Client.new 'http://www.pubmedcentral.gov/oai/oai.cgi'
29
+ client = OAI::Client.new 'http://www.pubmedcentral.gov/oai/oai.cgi', :headers => { "From" => "oai@example.com" }
30
30
  response = client.list_records
31
31
  # Get the first page of records
32
32
  response.each do |record|
@@ -87,6 +87,7 @@ module OAI
87
87
  @base = URI.parse base_url
88
88
  @debug = options.fetch(:debug, false)
89
89
  @parser = options.fetch(:parser, 'rexml')
90
+ @headers = options.fetch(:headers, {})
90
91
 
91
92
  @http_client = options.fetch(:http) do
92
93
  Faraday.new(:url => @base.clone) do |builder|
@@ -258,7 +259,11 @@ module OAI
258
259
 
259
260
  # Do the actual HTTP get, following any temporary redirects
260
261
  def get(uri)
261
- response = @http_client.get uri
262
+ response = @http_client.get do |req|
263
+ req.url uri
264
+ req.headers.merge! @headers
265
+ end
266
+
262
267
  response.body
263
268
  end
264
269
 
@@ -9,9 +9,10 @@ module OAI
9
9
  # metadata will return a `XML::Node` object instead.
10
10
  class Record
11
11
  include OAI::XPath
12
- attr_accessor :header, :metadata, :about
12
+ attr_accessor :header, :metadata, :about, :_source
13
13
 
14
14
  def initialize(element)
15
+ @_source = element
15
16
  @header = OAI::Header.new xpath_first(element, './/header')
16
17
  @metadata = xpath_first(element, './/metadata')
17
18
  @about = xpath_first(element, './/about')
@@ -4,8 +4,8 @@ module OAI::Provider
4
4
 
5
5
  # ActiveRecord model class in support of the caching wrapper.
6
6
  class OaiToken < ActiveRecord::Base
7
- has_many :entries, :class_name => 'OaiEntry',
8
- :order => "record_id", :dependent => :destroy
7
+ has_many :entries, -> { order("record_id ASC") },
8
+ :class_name => 'OaiEntry', :dependent => :destroy
9
9
 
10
10
  validates_uniqueness_of :token
11
11
 
@@ -60,15 +60,15 @@ module OAI::Provider
60
60
  conditions = sql_conditions(options)
61
61
 
62
62
  if :all == selector
63
- total = model.count(:id, :conditions => conditions)
63
+ total = model.where(conditions).count
64
64
  if @limit && total > @limit
65
65
  select_partial(
66
66
  ResumptionToken.new(options.merge({:last => 0})))
67
67
  else
68
- model.find(:all, :conditions => conditions)
68
+ model.where(conditions)
69
69
  end
70
70
  else
71
- model.find(selector, :conditions => conditions)
71
+ model.where(conditions).find(selector)
72
72
  end
73
73
  end
74
74
 
@@ -78,7 +78,7 @@ module OAI::Provider
78
78
  raise ResumptionTokenException.new unless @limit
79
79
 
80
80
  token = ResumptionToken.parse(token_string)
81
- total = model.count(:id, :conditions => token_conditions(token))
81
+ total = model.where(token_conditions(token)).count
82
82
 
83
83
  if token.last * @limit + @limit < total
84
84
  select_partial(token)
@@ -91,7 +91,7 @@ module OAI::Provider
91
91
  # resumption token to get the next subset
92
92
  def select_partial(token)
93
93
  if 0 == token.last
94
- oaitoken = OaiToken.find_or_create_by_token(token.to_s)
94
+ oaitoken = OaiToken.find_or_create_by(token: token.to_s)
95
95
  if oaitoken.new_record_before_save?
96
96
  OaiToken.connection.execute("insert into " +
97
97
  "#{OaiEntry.table_name} (oai_token_id, record_id) " +
@@ -104,8 +104,9 @@ module OAI::Provider
104
104
  raise ResumptionTokenException.new unless oaitoken
105
105
 
106
106
  PartialResult.new(
107
- hydrate_records(oaitoken.entries.find(:all, :limit => @limit,
108
- :offset => token.last * @limit)), token.next(token.last + 1)
107
+ hydrate_records(
108
+ oaitoken.entries.limit(@limit).offset(token.last * @limit)),
109
+ token.next(token.last + 1)
109
110
  )
110
111
  end
111
112
 
@@ -25,12 +25,12 @@ module OAI::Provider
25
25
  end
26
26
 
27
27
  def earliest
28
- earliest_obj = model.find(:first, :order => "#{timestamp_field} asc")
28
+ earliest_obj = model.order("#{timestamp_field} asc").first
29
29
  earliest_obj.nil? ? Time.at(0) : earliest_obj.send(timestamp_field)
30
30
  end
31
31
 
32
32
  def latest
33
- latest_obj = model.find(:first, :order => "#{timestamp_field} desc")
33
+ latest_obj = model.order("#{timestamp_field} desc").first
34
34
  latest_obj.nil? ? Time.now : latest_obj.send(timestamp_field)
35
35
  end
36
36
  # A model class is expected to provide a method Model.sets that
@@ -46,15 +46,15 @@ module OAI::Provider
46
46
  options[:resumption_token]) if options[:resumption_token]
47
47
  conditions = sql_conditions(options)
48
48
  if :all == selector
49
- total = find_scope.count(:id, :conditions => conditions)
49
+ total = find_scope.where(conditions).count
50
50
  if @limit && total > @limit
51
51
  select_partial(find_scope,
52
52
  ResumptionToken.new(options.merge({:last => 0})))
53
53
  else
54
- find_scope.find(:all, :conditions => conditions)
54
+ find_scope.where(conditions)
55
55
  end
56
56
  else
57
- find_scope.find(selector, :conditions => conditions)
57
+ find_scope.where(conditions).find(selector)
58
58
  end
59
59
  end
60
60
 
@@ -90,19 +90,19 @@ module OAI::Provider
90
90
 
91
91
  # Find the set or return an empty scope
92
92
  set = find_set_by_spec(options[:set])
93
- return model.scoped(:limit => 0) if set.nil?
93
+ return model.limit(0) if set.nil?
94
94
 
95
95
  # If the set has a backward relationship, we'll use it
96
96
  if set.class.respond_to?(:reflect_on_all_associations)
97
97
  set.class.reflect_on_all_associations.each do |assoc|
98
- return set.send(assoc.name).scoped if assoc.klass == model
98
+ return set.send(assoc.name) if assoc.klass == model
99
99
  end
100
100
  end
101
101
 
102
102
  # Search the attributes for 'set'
103
103
  if model.column_names.include?('set')
104
104
  # Scope using the set attribute as the spec
105
- model.scoped(:conditions => {:set => options[:set]})
105
+ model.where(set: options[:set])
106
106
  else
107
107
  # Default to empty set, as we've tried everything else
108
108
  model.scoped(:limit => 0)
@@ -122,24 +122,23 @@ module OAI::Provider
122
122
  raise OAI::ResumptionTokenException.new unless @limit
123
123
 
124
124
  token = ResumptionToken.parse(token_string)
125
- total = find_scope.count(:id, :conditions => token_conditions(token))
125
+ total = find_scope.where(token_conditions(token)).count
126
126
 
127
127
  if @limit < total
128
128
  select_partial(find_scope, token)
129
129
  else # end of result set
130
- find_scope.find(:all,
131
- :conditions => token_conditions(token),
132
- :limit => @limit, :order => "#{model.primary_key} asc")
130
+ find_scope.where(token_conditions(token))
131
+ .limit(@limit)
132
+ .order("#{model.primary_key} asc")
133
133
  end
134
134
  end
135
135
 
136
136
  # select a subset of the result set, and return it with a
137
137
  # resumption token to get the next subset
138
138
  def select_partial(find_scope, token)
139
- records = find_scope.find(:all,
140
- :conditions => token_conditions(token),
141
- :limit => @limit,
142
- :order => "#{model.primary_key} asc")
139
+ records = find_scope.where(token_conditions(token))
140
+ .limit(@limit)
141
+ .order("#{model.primary_key} asc")
143
142
  raise OAI::ResumptionTokenException.new unless records
144
143
  offset = records.last.send(model.primary_key.to_sym)
145
144
 
@@ -48,7 +48,7 @@ class OaipmhTables < ActiveRecord::Migration
48
48
  t.column :description, :string
49
49
  end
50
50
 
51
- add_index :oai_tokens, [:token], :uniq => true
51
+ add_index :oai_tokens, [:token], :unique => true
52
52
  add_index :oai_tokens, :created_at
53
53
  add_index :oai_entries, [:oai_token_id]
54
54
  add_index :dc_fields, :updated_at
@@ -3,7 +3,7 @@ class SetModel < OAI::Provider::ActiveRecordWrapper
3
3
 
4
4
  # Return all available sets
5
5
  def sets
6
- DCSet.scoped
6
+ DCSet.all
7
7
  end
8
8
 
9
9
  end
@@ -21,4 +21,4 @@ class ARExclusiveSetProvider < OAI::Provider::Base
21
21
  record_prefix = 'oai:test'
22
22
  source_model OAI::Provider::ActiveRecordWrapper.new(
23
23
  ExclusiveSetDCField, :timestamp_field => 'date')
24
- end
24
+ end
@@ -1,5 +1,5 @@
1
1
  class DCField < ActiveRecord::Base
2
- inheritance_column = 'DONOTINHERIT'
2
+ self.inheritance_column = 'DONOTINHERIT'
3
3
  has_and_belongs_to_many :sets,
4
4
  :join_table => "dc_fields_dc_sets",
5
5
  :foreign_key => "dc_field_id",
@@ -1,5 +1,5 @@
1
1
  class ExclusiveSetDCField < ActiveRecord::Base
2
- inheritance_column = 'DONOTINHERIT'
2
+ self.inheritance_column = 'DONOTINHERIT'
3
3
 
4
4
  def self.sets
5
5
  klass = Struct.new(:name, :spec)
@@ -13,7 +13,7 @@ class ActiveRecordProviderTest < TransactionalTestCase
13
13
  end
14
14
 
15
15
  def test_metadata_formats_for_record
16
- record_id = DCField.find(:first).id
16
+ record_id = DCField.first.id
17
17
  assert_nothing_raised { REXML::Document.new(@provider.list_metadata_formats(:identifier => "oai:test/#{record_id}")) }
18
18
  doc = REXML::Document.new(@provider.list_metadata_formats)
19
19
  assert doc.elements['/OAI-PMH/ListMetadataFormats/metadataFormat/metadataPrefix'].text == 'oai_dc'
@@ -35,7 +35,7 @@ class ActiveRecordProviderTest < TransactionalTestCase
35
35
  end
36
36
 
37
37
  def test_get_record
38
- record_id = DCField.find(:first).id
38
+ record_id = DCField.first.id
39
39
  assert_nothing_raised do
40
40
  REXML::Document.new(@provider.get_record(
41
41
  :identifier => "oai:test/#{record_id}", :metadata_prefix => 'oai_dc'))
@@ -46,7 +46,7 @@ class ActiveRecordProviderTest < TransactionalTestCase
46
46
  end
47
47
 
48
48
  def test_deleted
49
- record = DCField.find(:first)
49
+ record = DCField.first
50
50
  record.deleted = true;
51
51
  record.save
52
52
  doc = REXML::Document.new(@provider.get_record(
@@ -56,11 +56,11 @@ class ActiveRecordProviderTest < TransactionalTestCase
56
56
  end
57
57
 
58
58
  def test_from
59
- first_id = DCField.find(:first, :order => "id asc").id
60
- DCField.update_all(['updated_at = ?', Time.parse("January 1 2005")],
61
- "id < #{first_id + 90}")
62
- DCField.update_all(['updated_at = ?', Time.parse("June 1 2005")],
63
- "id < #{first_id + 10}")
59
+ first_id = DCField.order("id asc").first.id
60
+ DCField.where("id < #{first_id + 90}").update_all(updated_at: Time.parse("January 1 2005"))
61
+
62
+ DCField.where("id < #{first_id + 10}").update_all(updated_at: Time.parse("June 1 2005"))
63
+
64
64
 
65
65
  from_param = Time.parse("January 1 2006")
66
66
 
@@ -68,7 +68,7 @@ class ActiveRecordProviderTest < TransactionalTestCase
68
68
  @provider.list_records(
69
69
  :metadata_prefix => 'oai_dc', :from => from_param)
70
70
  )
71
- assert_equal DCField.find(:all, :conditions => ["updated_at >= ?", from_param]).size,
71
+ assert_equal DCField.where(["updated_at >= ?", from_param]).size,
72
72
  doc.elements['OAI-PMH/ListRecords'].size
73
73
 
74
74
  doc = REXML::Document.new(
@@ -79,9 +79,8 @@ class ActiveRecordProviderTest < TransactionalTestCase
79
79
  end
80
80
 
81
81
  def test_until
82
- first_id = DCField.find(:first, :order => "id asc").id
83
- DCField.update_all(['updated_at = ?', Time.parse("June 1 2005")],
84
- "id < #{first_id + 10}")
82
+ first_id = DCField.order("id asc").first.id
83
+ DCField.where("id < #{first_id + 10}").update_all(updated_at: Time.parse("June 1 2005"))
85
84
 
86
85
  doc = REXML::Document.new(
87
86
  @provider.list_records(
@@ -91,12 +90,10 @@ class ActiveRecordProviderTest < TransactionalTestCase
91
90
  end
92
91
 
93
92
  def test_from_and_until
94
- first_id = DCField.find(:first, :order => "id asc").id
95
- DCField.update_all(['updated_at = ?', Time.parse("June 1 2005")])
96
- DCField.update_all(['updated_at = ?', Time.parse("June 15 2005")],
97
- "id < #{first_id + 50}")
98
- DCField.update_all(['updated_at = ?', Time.parse("June 30 2005")],
99
- "id < #{first_id + 10}")
93
+ first_id = DCField.order("id asc").first.id
94
+ DCField.update_all(updated_at: Time.parse("June 1 2005"))
95
+ DCField.where("id < #{first_id + 50}").update_all(updated_at: Time.parse("June 15 2005"))
96
+ DCField.where("id < #{first_id + 10}").update_all(updated_at: Time.parse("June 30 2005"))
100
97
 
101
98
  doc = REXML::Document.new(
102
99
  @provider.list_records(
@@ -28,7 +28,7 @@ class ActiveRecordSetProviderTest < TransactionalTestCase
28
28
  end
29
29
 
30
30
  def test_record_with_multiple_sets
31
- record = DCSet.find(:first, :conditions => "spec = 'C'").dc_fields.first
31
+ record = DCSet.where("spec = 'C'").first.dc_fields.first
32
32
  assert_equal 2, record.sets.size
33
33
  end
34
34
 
@@ -51,22 +51,22 @@ class ActiveRecordSetProviderTest < TransactionalTestCase
51
51
  set_ab = DCSet.create(:name => "Set A:B", :spec => "A:B")
52
52
 
53
53
  next_id = 0
54
- DCField.find(:all, :limit => 10, :order => "id asc").each do |record|
54
+ DCField.limit(10).order("id asc").each do |record|
55
55
  set_a.dc_fields << record
56
56
  next_id = record.id
57
57
  end
58
58
 
59
- DCField.find(:all, :limit => 10, :order => "id asc", :conditions => "id > #{next_id}").each do |record|
59
+ DCField.where("id > #{next_id}").limit(10).order("id asc").each do |record|
60
60
  set_b.dc_fields << record
61
61
  next_id = record.id
62
62
  end
63
63
 
64
- DCField.find(:all, :limit => 10, :order => "id asc", :conditions => "id > #{next_id}").each do |record|
64
+ DCField.where("id > #{next_id}").limit(10).order("id asc").each do |record|
65
65
  set_ab.dc_fields << record
66
66
  next_id = record.id
67
67
  end
68
68
 
69
- DCField.find(:all, :limit => 10, :order => "id asc", :conditions => "id > #{next_id}").each do |record|
69
+ DCField.where("id > #{next_id}").limit(10).order("id asc").each do |record|
70
70
  set_a.dc_fields << record
71
71
  set_c.dc_fields << record
72
72
  next_id = record.id
@@ -117,25 +117,25 @@ class ActiveRecordExclusiveSetsProviderTest < TransactionalTestCase
117
117
  def define_sets
118
118
  next_id = 0
119
119
 
120
- ExclusiveSetDCField.find(:all, :limit => 10, :order => "id asc").each do |record|
120
+ ExclusiveSetDCField.limit(10).order("id asc").each do |record|
121
121
  record.set = "A"
122
122
  record.save!
123
123
  next_id = record.id
124
124
  end
125
125
 
126
- ExclusiveSetDCField.find(:all, :limit => 10, :order => "id asc", :conditions => "id > #{next_id}").each do |record|
126
+ ExclusiveSetDCField.where("id > #{next_id}").limit(10).order("id asc").each do |record|
127
127
  record.set = "B"
128
128
  record.save!
129
129
  next_id = record.id
130
130
  end
131
131
 
132
- ExclusiveSetDCField.find(:all, :limit => 10, :order => "id asc", :conditions => "id > #{next_id}").each do |record|
132
+ ExclusiveSetDCField.where("id > #{next_id}").limit(10).order("id asc").each do |record|
133
133
  record.set = "A:B"
134
134
  record.save!
135
135
  next_id = record.id
136
136
  end
137
137
 
138
- ExclusiveSetDCField.find(:all, :limit => 10, :order => "id asc", :conditions => "id > #{next_id}").each do |record|
138
+ ExclusiveSetDCField.where("id > #{next_id}").limit(10).order("id asc").each do |record|
139
139
  record.set = "A"
140
140
  record.save!
141
141
  next_id = record.id
@@ -155,4 +155,4 @@ class ActiveRecordExclusiveSetsProviderTest < TransactionalTestCase
155
155
  end
156
156
  end
157
157
 
158
- end
158
+ end
@@ -22,11 +22,9 @@ class CachingPagingProviderTest < TransactionalTestCase
22
22
  end
23
23
 
24
24
  def test_from_and_until
25
- first_id = DCField.find(:first, :order => "id asc").id
26
- DCField.update_all(['updated_at = ?', Time.parse("September 15 2005")],
27
- "id <= #{first_id + 25}")
28
- DCField.update_all(['updated_at = ?', Time.parse("November 1 2005")],
29
- "id < #{first_id + 50} and id > #{first_id + 25}")
25
+ first_id = DCField.order("id asc").first.id
26
+ DCField.where("id <= #{first_id + 25}").update_all(updated_at: Time.parse("September 15 2005"))
27
+ DCField.where("id < #{first_id + 50} and id > #{first_id + 25}").update_all(updated_at: Time.parse("November 1 2005"))
30
28
 
31
29
  # Should return 50 records broken into 2 groups of 25.
32
30
  doc = Document.new(
@@ -22,13 +22,11 @@ class SimpleResumptionProviderTest < TransactionalTestCase
22
22
  end
23
23
 
24
24
  def test_from_and_until
25
- first_id = DCField.find(:first, :order => "id asc").id
26
- DCField.update_all(['updated_at = ?', Time.parse("September 15 2005")],
27
- "id < #{first_id + 25}")
28
- DCField.update_all(['updated_at = ?', Time.parse("November 1 2005")],
29
- "id <= #{first_id + 50} and id > #{first_id + 25}")
25
+ first_id = DCField.order("id asc").first.id
26
+ DCField.where("id < #{first_id + 25}").update_all(updated_at: Time.parse("September 15 2005"))
27
+ DCField.where("id <= #{first_id + 50} and id > #{first_id + 25}").update_all(updated_at: Time.parse("November 1 2005"))
30
28
 
31
- total = DCField.count(:id, :conditions => ["updated_at >= ? AND updated_at <= ?", Time.parse("September 1 2005"), Time.parse("November 30 2005")])
29
+ total = DCField.where(["updated_at >= ? AND updated_at <= ?", Time.parse("September 1 2005"), Time.parse("November 30 2005")]).count
32
30
 
33
31
  # Should return 50 records broken into 2 groups of 25.
34
32
  doc = Document.new(
@@ -7,6 +7,7 @@ class GetRecordTest < Test::Unit::TestCase
7
7
  response = client.get_record :identifier => 'oai:test/3'
8
8
  assert_kind_of OAI::GetRecordResponse, response
9
9
  assert_kind_of OAI::Record, response.record
10
+ assert_kind_of REXML::Element, response.record._source
10
11
  assert_kind_of REXML::Element, response.record.metadata
11
12
  assert_kind_of OAI::Header, response.record.header
12
13
  assert_kind_of REXML::Element, response.record.about
@@ -2,6 +2,21 @@ require 'test_helper'
2
2
  require 'webrick'
3
3
 
4
4
  class HttpClientTest < Test::Unit::TestCase
5
+ def test_user_agent_and_from_headers
6
+ faraday_stub = Faraday.new do |builder|
7
+ builder.adapter :test do |stub|
8
+ stub.get('/echo') { |env| [200, {}, Marshal.dump(env)] }
9
+ end
10
+ end
11
+
12
+ client = OAI::Client.new 'http://localhost:3333/oai', :headers => { 'From' => 'oai@example.com', 'User-Agent' => 'ruby-oai' }, :http => faraday_stub
13
+
14
+ response = client.send(:get, '/echo')
15
+ env = Marshal.load(response)
16
+
17
+ assert_equal('oai@example.com', env.request_headers['From'])
18
+ assert_equal('ruby-oai', env.request_headers['User-Agent'])
19
+ end
5
20
 
6
21
  def test_pluggable_http_client
7
22
  oai_response = <<-eos
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Summers
8
8
  autorequire: oai
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-16 00:00:00.000000000 Z
11
+ date: 2015-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
19
+ version: 3.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0
26
+ version: 3.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday_middleware
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description:
@@ -62,6 +62,49 @@ files:
62
62
  - README.md
63
63
  - Rakefile
64
64
  - bin/oai
65
+ - examples/models/file_model.rb
66
+ - examples/providers/dublin_core.rb
67
+ - lib/oai.rb
68
+ - lib/oai/client.rb
69
+ - lib/oai/client/get_record.rb
70
+ - lib/oai/client/header.rb
71
+ - lib/oai/client/identify.rb
72
+ - lib/oai/client/list_identifiers.rb
73
+ - lib/oai/client/list_metadata_formats.rb
74
+ - lib/oai/client/list_records.rb
75
+ - lib/oai/client/list_sets.rb
76
+ - lib/oai/client/metadata_format.rb
77
+ - lib/oai/client/record.rb
78
+ - lib/oai/client/response.rb
79
+ - lib/oai/client/resumable.rb
80
+ - lib/oai/constants.rb
81
+ - lib/oai/exception.rb
82
+ - lib/oai/harvester.rb
83
+ - lib/oai/harvester/config.rb
84
+ - lib/oai/harvester/harvest.rb
85
+ - lib/oai/harvester/logging.rb
86
+ - lib/oai/harvester/mailer.rb
87
+ - lib/oai/harvester/shell.rb
88
+ - lib/oai/provider.rb
89
+ - lib/oai/provider/metadata_format.rb
90
+ - lib/oai/provider/metadata_format/oai_dc.rb
91
+ - lib/oai/provider/model.rb
92
+ - lib/oai/provider/model/activerecord_caching_wrapper.rb
93
+ - lib/oai/provider/model/activerecord_wrapper.rb
94
+ - lib/oai/provider/partial_result.rb
95
+ - lib/oai/provider/response.rb
96
+ - lib/oai/provider/response/error.rb
97
+ - lib/oai/provider/response/get_record.rb
98
+ - lib/oai/provider/response/identify.rb
99
+ - lib/oai/provider/response/list_identifiers.rb
100
+ - lib/oai/provider/response/list_metadata_formats.rb
101
+ - lib/oai/provider/response/list_records.rb
102
+ - lib/oai/provider/response/list_sets.rb
103
+ - lib/oai/provider/response/record_response.rb
104
+ - lib/oai/provider/resumption_token.rb
105
+ - lib/oai/set.rb
106
+ - lib/oai/xpath.rb
107
+ - lib/test.rb
65
108
  - test/activerecord_provider/config/connection.rb
66
109
  - test/activerecord_provider/database/0001_oaipmh_tables.rb
67
110
  - test/activerecord_provider/fixtures/dc.yml
@@ -100,49 +143,6 @@ files:
100
143
  - test/provider/tc_simple_provider.rb
101
144
  - test/provider/test_helper.rb
102
145
  - test/test.xml
103
- - lib/oai/client/get_record.rb
104
- - lib/oai/client/header.rb
105
- - lib/oai/client/identify.rb
106
- - lib/oai/client/list_identifiers.rb
107
- - lib/oai/client/list_metadata_formats.rb
108
- - lib/oai/client/list_records.rb
109
- - lib/oai/client/list_sets.rb
110
- - lib/oai/client/metadata_format.rb
111
- - lib/oai/client/record.rb
112
- - lib/oai/client/response.rb
113
- - lib/oai/client/resumable.rb
114
- - lib/oai/client.rb
115
- - lib/oai/constants.rb
116
- - lib/oai/exception.rb
117
- - lib/oai/harvester/config.rb
118
- - lib/oai/harvester/harvest.rb
119
- - lib/oai/harvester/logging.rb
120
- - lib/oai/harvester/mailer.rb
121
- - lib/oai/harvester/shell.rb
122
- - lib/oai/harvester.rb
123
- - lib/oai/provider/metadata_format/oai_dc.rb
124
- - lib/oai/provider/metadata_format.rb
125
- - lib/oai/provider/model/activerecord_caching_wrapper.rb
126
- - lib/oai/provider/model/activerecord_wrapper.rb
127
- - lib/oai/provider/model.rb
128
- - lib/oai/provider/partial_result.rb
129
- - lib/oai/provider/response/error.rb
130
- - lib/oai/provider/response/get_record.rb
131
- - lib/oai/provider/response/identify.rb
132
- - lib/oai/provider/response/list_identifiers.rb
133
- - lib/oai/provider/response/list_metadata_formats.rb
134
- - lib/oai/provider/response/list_records.rb
135
- - lib/oai/provider/response/list_sets.rb
136
- - lib/oai/provider/response/record_response.rb
137
- - lib/oai/provider/response.rb
138
- - lib/oai/provider/resumption_token.rb
139
- - lib/oai/provider.rb
140
- - lib/oai/set.rb
141
- - lib/oai/xpath.rb
142
- - lib/oai.rb
143
- - lib/test.rb
144
- - examples/models/file_model.rb
145
- - examples/providers/dublin_core.rb
146
146
  homepage: http://github.com/code4lib/ruby-oai
147
147
  licenses: []
148
148
  metadata: {}
@@ -152,17 +152,17 @@ require_paths:
152
152
  - lib
153
153
  required_ruby_version: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - '>='
155
+ - - ">="
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  requirements:
160
- - - '>='
160
+ - - ">="
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
164
  rubyforge_project:
165
- rubygems_version: 2.0.3
165
+ rubygems_version: 2.2.1
166
166
  signing_key:
167
167
  specification_version: 4
168
168
  summary: A ruby library for working with the Open Archive Initiative Protocol for