fhir_client 4.0.3 → 4.0.4

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
  SHA256:
3
- metadata.gz: d385c9e64810e036607e1da44bf1331df35398b1f9e43aedea8c7bb80e080ff0
4
- data.tar.gz: 866d5929b2f4235976ed635a7ab0e795c2fe10903d7e13bfdf6f8a78d9ddc968
3
+ metadata.gz: c0f74ff0812b021eac3244300451f4970bf4eb12b81fc647a7abd8f6d270c310
4
+ data.tar.gz: 10f8902a26af03ed539b80631621210d9bbdae5664ef37abcc41a59054d4b55d
5
5
  SHA512:
6
- metadata.gz: 2796ea338218119eb621b10122d2390abfc3447b384303a49eed9df8d45ab137561640c3bda7fd1ab7d8760866dc82f383640bb1dad83ad72dd893443d711400
7
- data.tar.gz: 0b25a370025e1618bb00e508850d0f926d0544a0da1a392a2ecceea834ac6b59d38b32365e0328de503fbbd9b79e8f10bd0447d6c14bbeea34f3c77797ac79dd
6
+ metadata.gz: 824e2cf15a2387215ddf7d21ce1b03be870700f9eec697850360579d4405351d94b7710e3146baad5150c3b9ccf4ffe79d0a0f990c42e80663213b459bd3281b
7
+ data.tar.gz: c57df2cd3af870ec55470ee8536947b2601c2328ac7e1c41071ae8bda12d107e3cac96edf94ee6f8f8c2bf9e10c947e7373336dedccee036615c782518461f6c
@@ -337,7 +337,6 @@ module FHIR
337
337
  end
338
338
  end
339
339
  res.client = self unless res.nil?
340
- FHIR.logger.warn "Expected #{klass} but got #{res.class}" if res.class != klass
341
340
  rescue => e
342
341
  FHIR.logger.error "Failed to parse #{format} as resource #{klass}: #{e.message}"
343
342
  res = nil
@@ -433,7 +432,7 @@ module FHIR
433
432
  begin
434
433
  response = @client.get(url, headers: headers)
435
434
  rescue => e
436
- unless e.response
435
+ if !e.respond_to?(:response) || e.response.nil?
437
436
  # Re-raise the client error if there's no response. Otherwise, logging
438
437
  # and other things break below!
439
438
  FHIR.logger.error "GET - Request: #{url} failed! No response from server: #{e}"
@@ -480,7 +479,7 @@ module FHIR
480
479
  @reply = FHIR::ClientReply.new(req, res, self)
481
480
  return @reply
482
481
  rescue => e
483
- unless e.response
482
+ if !e.respond_to?(:response) || e.response.nil?
484
483
  # Re-raise the client error if there's no response. Otherwise, logging
485
484
  # and other things break below!
486
485
  FHIR.logger.error "GET - Request: #{url} failed! No response from server: #{e}"
@@ -515,7 +514,7 @@ module FHIR
515
514
  begin
516
515
  response = @client.post(url, headers: headers, body: payload)
517
516
  rescue => e
518
- unless e.response
517
+ if !e.respond_to?(:response) || e.response.nil?
519
518
  # Re-raise the client error if there's no response. Otherwise, logging
520
519
  # and other things break below!
521
520
  FHIR.logger.error "POST - Request: #{url} failed! No response from server: #{e}"
@@ -562,7 +561,7 @@ module FHIR
562
561
  begin
563
562
  response = @client.put(url, headers: headers, body: payload)
564
563
  rescue => e
565
- unless e.response
564
+ if !e.respond_to?(:response) || e.response.nil?
566
565
  # Re-raise the client error if there's no response. Otherwise, logging
567
566
  # and other things break below!
568
567
  FHIR.logger.error "PUT - Request: #{url} failed! No response from server: #{e}"
@@ -609,7 +608,7 @@ module FHIR
609
608
  begin
610
609
  response = @client.patch(url, headers: headers, body: payload)
611
610
  rescue => e
612
- unless e.response
611
+ if !e.respond_to?(:response) || e.response.nil?
613
612
  # Re-raise the client error if there's no response. Otherwise, logging
614
613
  # and other things break below!
615
614
  FHIR.logger.error "PATCH - Request: #{url} failed! No response from server: #{e}"
@@ -645,7 +644,7 @@ module FHIR
645
644
  @reply = FHIR::ClientReply.new(request.args, res, self)
646
645
  end
647
646
  rescue => e
648
- unless e.response
647
+ if !e.respond_to?(:response) || e.response.nil?
649
648
  # Re-raise the client error if there's no response. Otherwise, logging
650
649
  # and other things break below!
651
650
  FHIR.logger.error "PATCH - Request: #{url} failed! No response from server: #{e}"
@@ -677,7 +676,7 @@ module FHIR
677
676
  begin
678
677
  response = @client.delete(url, headers: headers)
679
678
  rescue => e
680
- unless e.response
679
+ if !e.respond_to?(:response) || e.response.nil?
681
680
  # Re-raise the client error if there's no response. Otherwise, logging
682
681
  # and other things break below!
683
682
  FHIR.logger.error "DELETE - Request: #{url} failed! No response from server: #{e}"
@@ -1,5 +1,5 @@
1
1
  module FHIR
2
2
  class Client
3
- VERSION = '4.0.3'
3
+ VERSION = '4.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fhir_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andre Quina
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-09-30 00:00:00.000000000 Z
13
+ date: 2020-02-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -300,7 +300,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  - !ruby/object:Gem::Version
301
301
  version: '0'
302
302
  requirements: []
303
- rubygems_version: 3.0.2
303
+ rubyforge_project:
304
+ rubygems_version: 2.7.6.2
304
305
  signing_key:
305
306
  specification_version: 4
306
307
  summary: A Gem for handling FHIR client requests in ruby