dor-services 6.1.12 → 6.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dor/config.rb +14 -2
  3. data/lib/dor/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dddb5f9dca0484c2a3fdc2e70baf034f9bd944b3c9aa633fbd9ec2a5ca14a5c
4
- data.tar.gz: af9c8137cda9a4accd45708ada0f8860f81e4b180cda7c111b5d5b5a19ed1f50
3
+ metadata.gz: bb09163ebcee46966592628dd44eabc78126d5ca5e720b1c798f68e3f9dd7521
4
+ data.tar.gz: a3c14829d0ea6ee884e2f78a636b90380299ab77aed7f23be401e1b4cfe5ca2c
5
5
  SHA512:
6
- metadata.gz: 28c1a31b613718d15b366d1c7d6c9834784295794044511ac75d8265dbfddaeebed384c2adf3eab441bfe613b82a4309eb546f48d3ac62a75c05af60a97c355e
7
- data.tar.gz: 44793812fa22d163a39fdda26c68df84075cc537f6e62a3df435b8046d55810b66caf9d1a026a6d69df8e123420e65675fd66b9ca290302906c239c778c494ae
6
+ metadata.gz: 4a6eafdb2aef57dfbdb0e669f68ebf1fb0932144aad24c85fdba61ddf629815e2ef900cbb91485b9f0ee6aebef54fba22d17109a276269c427d437edbcc1fdb7
7
+ data.tar.gz: e5795abc37dcd1255c603e31ec7e45180a5590a97f7eeeac8cc1eb6a68be0f37825f55f140739c8a2f26274aa746172716cc8321a2247a16037d38626a4bb21d
data/lib/dor/config.rb CHANGED
@@ -99,7 +99,7 @@ module Dor
99
99
  end
100
100
 
101
101
  set_callback :configure, :after do |config|
102
- Dor::Services::Client.configure(url: config.dor_services.url) if config.dor_services
102
+ configure_client!(config)
103
103
 
104
104
  if config.solrizer.present?
105
105
  stack = Kernel.caller.dup
@@ -117,8 +117,20 @@ module Dor
117
117
  end
118
118
  end
119
119
 
120
- # Act like an ActiveFedora.configurator
120
+ def configure_client!(config)
121
+ # Do not configure client if URL not specified
122
+ return if config.dor_services&.url.blank?
123
+
124
+ params = {
125
+ url: config.dor_services.url
126
+ }
127
+ params[:username] = config.dor_services.user if config.dor_services&.user.present?
128
+ params[:password] = config.dor_services.pass if config.dor_services&.pass.present?
121
129
 
130
+ Dor::Services::Client.configure(params)
131
+ end
132
+
133
+ # Act like an ActiveFedora.configurator
122
134
  def init(*args); end
123
135
 
124
136
  def fedora_config
data/lib/dor/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dor
4
- VERSION = '6.1.12'
4
+ VERSION = '6.1.13'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.12
4
+ version: 6.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klein
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2019-01-14 00:00:00.000000000 Z
17
+ date: 2019-01-16 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: active-fedora