uc3-dmp-external-api 0.0.12 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0edfb07e1460800c788ed117c767cc191b8f8f656e0be25d5792f5f94ae29ca
4
- data.tar.gz: 1d73ba86dff8d7fdbb09008bd0273c45eee518024235b2e3cdb1f5e91aea2af6
3
+ metadata.gz: 498c63c494595d50e7dcb8f2a964055da8360cd859e97e92600f1373f735b4fc
4
+ data.tar.gz: 528b3e4859e1e95fe45f57445a291f795571f04e18bc5b5f287fcd6c1c402127
5
5
  SHA512:
6
- metadata.gz: ddcfa593839ecf393d03b220eb02fbd5ad2c518b59188eec50863a66491a5d904ca483938a3f7fef481b75607975593da4d57df9a2f14dcdabaa1c4eb1829ada
7
- data.tar.gz: d8c05d20454f3ae694fe7dd237712903a1c80bcf829f59486691c3192a9672c1da11628c2ed48e7abaa2354132856f95b2f179876a57d2f95b9c4f17c8dc5d56
6
+ metadata.gz: 469f685ec4aaccdc4f794e4d70a1b484e3083ed5f3fa0e76d1ec1d5a7d846ab95fb1b715345b236d0874163d7c880654cd0b22e69eaac25124595e3a28a96548
7
+ data.tar.gz: 037ebb2f986862e5746756d51a994e046fe8742436a4d86e6de20111054818068404bfa3ff37c4bd235d4c95b8aedec65c5cbb0065a960053672e3e844463260
@@ -56,7 +56,7 @@ module Uc3DmpExternalApi
56
56
  base = {
57
57
  'Content-Type': 'application/json',
58
58
  Accept: 'application/json',
59
- 'User-Agent': "DMPTool #{ENV.fetch('LAMBDA_ENV', nil)} - #{domain} (mailto:#{email})"
59
+ 'User-Agent': "California Digital Library - #{domain} (mailto:#{email})"
60
60
  }
61
61
  base.merge(additional_headers)
62
62
  end
@@ -69,7 +69,7 @@ module Uc3DmpExternalApi
69
69
  follow_redirects: true,
70
70
  limit: 6
71
71
  }
72
- opts[:basic_auth] = basic_auth if basic_auth.is_a?(Hash)
72
+ opts[:basic_auth] = basic_auth if basic_auth.is_a?(Hash) && basic_auth.keys.any?
73
73
  # If the body is not already JSON and we intend to send JSON, convert it
74
74
  opts[:body] = body.is_a?(Hash) && hdrs['Content-Type'] == 'application/json' ? body.to_json : body
75
75
  # If debug is enabled then tap into the HTTParty gem's debug option
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpExternalApi
4
- VERSION = '0.0.12'
4
+ VERSION = '0.0.15'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-external-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley