allscripts_unity_client 5.1.4 → 6.0.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15063864b86d6ee4b600250f7c593ec695e5483e97389b19fd4441880829077d
|
4
|
+
data.tar.gz: 8c7623b827e5880d0e52b0c998678632de9f57bf0c882ed7a611b51354b45033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cd757580de6e749389231034ae911e36b2eddb734c775f082ae7199eddf2b1b0dd18da341bb02e0ecb1c69e1c062b7842ea2bb8dea22ede8ccd5290bb509715
|
7
|
+
data.tar.gz: 9f521855e3f67495ec4d2f7c361d040a7ca9d28cc88cbf74dc2275b98d907677090ec5c133106ca96ebedf043152dc1c42856d8dd4d0e383a39d152b06c71cc9
|
@@ -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]
|
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'multi_json'
|
2
|
-
require '
|
2
|
+
require 'faraday'
|
3
3
|
|
4
4
|
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'
|
@@ -14,30 +14,13 @@ module AllscriptsUnityClient
|
|
14
14
|
def initialize(options)
|
15
15
|
super
|
16
16
|
|
17
|
-
@connection =
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
def set_http_client_timeouts
|
27
|
-
@connection.connect_timeout = @options.timeout || 90
|
28
|
-
@connection.send_timeout = @options.timeout || 90
|
29
|
-
@connection.receive_timeout = @options.timeout || 90
|
30
|
-
end
|
31
|
-
|
32
|
-
def set_http_client_ssl_config
|
33
|
-
ssl_options = OpenSSL::SSL::OP_ALL
|
34
|
-
ssl_options &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
|
35
|
-
ssl_options |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
|
36
|
-
ssl_options |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2)
|
37
|
-
ssl_options |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3)
|
38
|
-
|
39
|
-
@connection.ssl_config.options = ssl_options
|
40
|
-
@connection.ssl_config.ciphers = "ALL:!aNULL:!eNULL:!SSLv2"
|
17
|
+
@connection = Faraday.new do |conn|
|
18
|
+
conn.request :json
|
19
|
+
conn.adapter Faraday.default_adapter
|
20
|
+
conn.options.timeout = @options.timeout || 90
|
21
|
+
conn.options.open_timeout = @options.timeout || 90
|
22
|
+
conn.proxy = @options.proxy if @options.proxy
|
23
|
+
end
|
41
24
|
end
|
42
25
|
|
43
26
|
def build_uri(request_location)
|
@@ -95,7 +78,7 @@ module AllscriptsUnityClient
|
|
95
78
|
|
96
79
|
# See Client#get_security_token!.
|
97
80
|
def get_security_token!(parameters = {})
|
98
|
-
username = parameters
|
81
|
+
username = get_username(parameters)
|
99
82
|
password = parameters[:password] || @options.password
|
100
83
|
appname = parameters[:appname] || @options.appname
|
101
84
|
|
@@ -169,5 +152,13 @@ module AllscriptsUnityClient
|
|
169
152
|
raise APIError, response
|
170
153
|
end
|
171
154
|
end
|
155
|
+
|
156
|
+
def get_username(parameters = {})
|
157
|
+
username = parameters[:username] || @options.username
|
158
|
+
if @options.use_ubiquity
|
159
|
+
username = "#{@options.ubiquity_id}:#{@options.ubiquity_client_id}:#{username}"
|
160
|
+
end
|
161
|
+
username
|
162
|
+
end
|
172
163
|
end
|
173
164
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allscripts_unity_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- healthfinch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|