allscripts_unity_client 5.1.4 → 5.1.5

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: a993add7d05fe2cffd3826d074b8f81a01e5a31e5c1614f953a9d9e1d543bb6e
4
- data.tar.gz: 90f10242dcf1aff22295dad3c2ef65a3b183e078abb30d2a729a6022ed51d220
3
+ metadata.gz: 0454a09d72702d0ead8fbfa7d39c104ada4dd52d4e9508cfe0e6468ab110e258
4
+ data.tar.gz: ec31bdc7e6d516bc268b4c3c8a2b427b23080c81ad4f06c960f26dd32cb488ef
5
5
  SHA512:
6
- metadata.gz: 5eb80f009dbbb38a4f4a037a3f7f15abe6116fe1612aa532ad1103f91ceb4e083ec6e7016d35ef5df04f85fb3ccff0345345eaf3a1c7e7ea16cf4dadefb798cb
7
- data.tar.gz: f1d76441b1418cc92239a4e5b49e961b78c2cc2283e32ee7f1a6d049d3586a423dfa1d503be3f4819068fa5f0e270a50c478ab140ee6f3263b56475681dde482
6
+ metadata.gz: 193e7cd8be77aeaee732baf2914a87d19e37ec9db30e1564e4fea0d6b264cd8a376d80e020f0c08bac2dc8df852b20de9ef39f70591947b60385b66f4446b807
7
+ data.tar.gz: 5b089f24a4529ebea228a9dbaa7b0ab1fab8caef3cc06f3d4d358d271172e3d17733dcf32ab8d2aec565ed77735a48f7dace0d68d3648eecb9fa6b226dea18b7
@@ -3,7 +3,8 @@ module AllscriptsUnityClient
3
3
  # Contains various options for Unity configuration.
4
4
  class ClientOptions
5
5
  attr_accessor :proxy, :logger, :ca_file, :ca_path, :timeout, :ehr_userid, :ehr_password
6
- attr_reader :base_unity_url, :username, :password, :appname, :timezone, :raw_dates, :use_ubiquity
6
+ attr_reader :base_unity_url, :username, :password, :appname, :timezone, :raw_dates, :use_ubiquity,
7
+ :ubiquity_id, :ubiquity_client_id
7
8
 
8
9
  # Constructor.
9
10
  #
@@ -33,6 +34,8 @@ module AllscriptsUnityClient
33
34
  @ehr_userid = options[:ehr_userid]
34
35
  @ehr_password = options[:ehr_password]
35
36
  @use_ubiquity = options[:use_ubiquity] || false
37
+ @ubiquity_id = options[:ubiquity_id]
38
+ @ubiquity_client_id = options[:ubiquity_client_id]
36
39
 
37
40
  self.timezone = options[:timezone]
38
41
  self.base_unity_url = options[:base_unity_url]
@@ -5,7 +5,7 @@ module AllscriptsUnityClient
5
5
 
6
6
  # A ClientDriver that supports Unity's JSON endpoints.
7
7
  class JSONClientDriver < ClientDriver
8
- attr_accessor :json_base_url, :connection, :security_token
8
+ attr_accessor :json_base_url, :connection, :security_token, :use_ubiquity, :ubiquity_id, :ubiquity_client_id
9
9
 
10
10
  UNITY_JSON_ENDPOINT = '/Unity/UnityService.svc/json'
11
11
  UBIQUITY_JSON_ENDPOINT = '/UnityService.svc/json'
@@ -95,7 +95,7 @@ module AllscriptsUnityClient
95
95
 
96
96
  # See Client#get_security_token!.
97
97
  def get_security_token!(parameters = {})
98
- username = parameters[:username] || @options.username
98
+ username = get_username(parameters)
99
99
  password = parameters[:password] || @options.password
100
100
  appname = parameters[:appname] || @options.appname
101
101
 
@@ -169,5 +169,13 @@ module AllscriptsUnityClient
169
169
  raise APIError, response
170
170
  end
171
171
  end
172
+
173
+ def get_username(parameters = {})
174
+ username = parameters[:username] || @options.username
175
+ if @options.use_ubiquity
176
+ username = "#{@options.ubiquity_id}:#{@options.ubiquity_client_id}:#{username}"
177
+ end
178
+ username
179
+ end
172
180
  end
173
181
  end
@@ -1,3 +1,3 @@
1
1
  module AllscriptsUnityClient
2
- VERSION = '5.1.4'.freeze
2
+ VERSION = '5.1.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allscripts_unity_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.4
4
+ version: 5.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - healthfinch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-11 00:00:00.000000000 Z
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient