dor-fetcher 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/dor-fetcher.rb +4 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2MyNDEzMjAxNjFjZWZmYzNlNmExN2Y4NzI3MTM0Njc3ODFlODJlOA==
4
+ MTk3NTQ4NDc3ZDk3ODVjNDJmNDA2OGVlNWE1ODcyNzg2ZGJkOTAzYQ==
5
5
  data.tar.gz: !binary |-
6
- Y2FhYzU1Zjk0ZTdlYjNiZTMyZDVhYjJiMGRhZmY0YzIyMTFkODBlMA==
6
+ MGZlMzQ2NDI1YTdmYTZkYWM2YjU4NjIyNDMzZjQ3MmFmN2JiYjk5Ng==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YWE3YjdjMmY2YzdiYTc0YmNiYzhkNTNlMjdiOGQ1ODdiNWE3MDgwYjE1Nzk2
10
- ZmM0OWEwNjk0Yzk0MDI4ODk5YmY0ZjNjMTcxNjljNDExZjJjYTQ0ODc4NGMz
11
- ZjE3MjVhNTdiZTdkOGQ3MThhMjRkMzBiMjQxM2Y3NzYwOTk3NWM=
9
+ MDgwYTI4NzgyNTZjMTM1ZWY0YWJmNjZiMTE0YjRmNjUxMWMwMjE3YzA5MTZm
10
+ ODQwYzUwZWFkMDk0MjgxYjU1Zjg0OWM1M2E0NDJjZDQ4ZTc5YjE4YjhiNzE1
11
+ Nzc3MTk1ZDhmMDgxMjg1ZDg5N2VlZWU4NTU0OWZmNWI0ZmU3NTA=
12
12
  data.tar.gz: !binary |-
13
- YTk0ZjZmNTIzN2EzYmIyZmJmMjJhMTgxMWI0OWNhOTE4MDQ4ZjYwZmIwYmZl
14
- Zjk3ZDNkMzQ5MDBmMDYzNzk0NjBlYTM3N2NiNjMyNDQyOTQyNDcyYTQ3Mzdk
15
- ZjViY2E2YTdiZWM5YzVhNmFmZDJlYzkyODBlOWYxZWM5ZjZlZDI=
13
+ NGJlYTU5ZTAyMGYwMWQ1ZWRiNDkxN2NmYWJjZjQ5ODNhMzhmODAyM2ZjYzZk
14
+ NjcxNGQ0ZDhmMzI1MTZkZTRiYTUyMmM1YjQ0MGQ1N2VjMzhhNTY4N2MyZDhm
15
+ YTIzNDRlYzdmMDk5NDhlYWE2ZWZlOTZiYTc1ODg5MzE5NTI4MDE=
@@ -19,7 +19,7 @@ module DorFetcher
19
19
  def initialize options = {}
20
20
  #TODO: Check for a well formed URL and a 200 from the destination before just accepting this
21
21
  @service_url = options[:service_url] || @@default_service_url
22
- @site = RestClient::Resource.new(@service_url, :timeout => nil, :open_timeout => nil)
22
+ @site = RestClient::Resource.new(@service_url)
23
23
 
24
24
  if not options[:skip_heartbeat]
25
25
  raise "DorFetcher::Client Error! No response from #{@service_url}" if not self.is_alive?
@@ -134,9 +134,10 @@ module DorFetcher
134
134
  #@return [Hash] Hash of all objects governed by the APO including
135
135
  #pid/druid, title, date last modified, and count
136
136
  def query_api(base, druid, params)
137
- url = "#{base}/#{druid}/#{add_params(params)}"
137
+ url = "#{@site}/#{base}/#{druid}/#{add_params(params)}"
138
138
  begin
139
- resp = @site[url].get
139
+ #We need to use this method here for the longer timeout option
140
+ resp = RestClient::Request.execute(:method=> :get, :url=>url, :timeout=>90000)
140
141
  rescue
141
142
  raise "Connection Error with url #{url}"
142
143
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-fetcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carrick Rogers