allscripts_unity_client 2.1.0 → 2.1.1

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
  SHA1:
3
- metadata.gz: 88cc45a2484b53948ae52a7175a9c633b8cf8108
4
- data.tar.gz: c792e3083d2727be7872e47e932348699ceb416f
3
+ metadata.gz: 4c922415ede669a67b8aaeca965cc57255876148
4
+ data.tar.gz: 1fd6a6104626ae99644f1f401fad660abf6203a2
5
5
  SHA512:
6
- metadata.gz: 20d968b2549340bd6fc496e95bab512970db94bae8f3637d0609c0859fdf1b33f640164eee30e77da9c9f3e223c0c7de428565285a6f9d5245900e7b8e56be61
7
- data.tar.gz: 01714c07e5f1568d03b15e27f653d7c4efa8b3571b053bb5f9ebdb2b6473e651ca9116534b6a319e1106e5035ee66635fcc7d3cc6efe3ad41e1c7eec464d2090
6
+ metadata.gz: f47a0208fee44b5004174d1ee0a10e0fb6bebc3929bc508586b3b82ed0041f1ee8e1ec59fea27f2a622ad9335c71c70150cd4d96253de6e0352bf8f4569c947a
7
+ data.tar.gz: 4357b82d41a3bdc9fbead4803379408ab988285773e6178a1b66684c56f24b372e5fa5ac4430bfed4dc1842686b28172578abd07efef493cc84628eedd359e3d
@@ -15,6 +15,8 @@ module AllscriptsUnityClient
15
15
 
16
16
  class << self
17
17
  add_method_tracer :magic
18
+ add_method_tracer :get_security_token!
19
+ add_method_tracer :retire_security_token!
18
20
  end
19
21
  end
20
22
  end
@@ -32,8 +32,8 @@ module AllscriptsUnityClient
32
32
 
33
33
  start_timer
34
34
  end
35
+ end_timer
35
36
  end
36
- end_timer
37
37
 
38
38
  response = Oj.load(response.body, mode: :strict)
39
39
 
@@ -55,15 +55,18 @@ module AllscriptsUnityClient
55
55
  'Appname' => appname
56
56
  }
57
57
 
58
- response = @connection.post do |request|
59
- request.url "#{UNITY_JSON_ENDPOINT}/GetToken"
60
- request.headers['Content-Type'] = 'application/json'
61
- request.body = Oj.dump(request_data, mode: :compat)
62
- set_request_timeout(request)
58
+ response = nil
59
+ NewRelicSupport.trace_execution_scoped_if_available(JSONClientDriver, ["Custom/UnityJSON/GetToken"]) do
60
+ response = @connection.post do |request|
61
+ request.url "#{UNITY_JSON_ENDPOINT}/GetToken"
62
+ request.headers['Content-Type'] = 'application/json'
63
+ request.body = Oj.dump(request_data, mode: :compat)
64
+ set_request_timeout(request)
63
65
 
64
- start_timer
66
+ start_timer
67
+ end
68
+ end_timer
65
69
  end
66
- end_timer
67
70
 
68
71
  raise_if_response_error(response.body)
69
72
  log_get_security_token
@@ -80,15 +83,18 @@ module AllscriptsUnityClient
80
83
  'Appname' => appname
81
84
  }
82
85
 
83
- response = @connection.post do |request|
84
- request.url "#{UNITY_JSON_ENDPOINT}/RetireSecurityToken"
85
- request.headers['Content-Type'] = 'application/json'
86
- request.body = Oj.dump(request_data, mode: :compat)
87
- set_request_timeout(request)
86
+ response = nil
87
+ NewRelicSupport.trace_execution_scoped_if_available(JSONClientDriver, ["Custom/UnityJSON/RetireSecurityToken"]) do
88
+ response = @connection.post do |request|
89
+ request.url "#{UNITY_JSON_ENDPOINT}/RetireSecurityToken"
90
+ request.headers['Content-Type'] = 'application/json'
91
+ request.body = Oj.dump(request_data, mode: :compat)
92
+ set_request_timeout(request)
88
93
 
89
- start_timer
94
+ start_timer
95
+ end
96
+ end_timer
90
97
  end
91
- end_timer
92
98
 
93
99
  raise_if_response_error(response.body)
94
100
  log_retire_security_token
@@ -92,8 +92,11 @@ module AllscriptsUnityClient
92
92
 
93
93
  begin
94
94
  start_timer
95
- response = @savon_client.call('GetSecurityToken', call_data)
96
- end_timer
95
+ response = nil
96
+ NewRelicSupport.trace_execution_scoped_if_available(JSONClientDriver, ["Custom/UnitySOAP/GetToken"]) do
97
+ response = @savon_client.call('GetSecurityToken', call_data)
98
+ end_timer
99
+ end
97
100
  rescue Savon::SOAPFault => e
98
101
  raise APIError, e.message
99
102
  end
@@ -117,8 +120,10 @@ module AllscriptsUnityClient
117
120
 
118
121
  begin
119
122
  start_timer
120
- @savon_client.call('RetireSecurityToken', call_data)
121
- end_timer
123
+ NewRelicSupport.trace_execution_scoped_if_available(JSONClientDriver, ["Custom/UnitySOAP/RetireSecurityToken"]) do
124
+ @savon_client.call('RetireSecurityToken', call_data)
125
+ end_timer
126
+ end
122
127
  rescue Savon::SOAPFault => e
123
128
  raise APIError, e.message
124
129
  end
@@ -1,3 +1,3 @@
1
1
  module AllscriptsUnityClient
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
@@ -7,6 +7,8 @@ shared_examples 'a client driver' do
7
7
  new_relic_client_driver
8
8
  expect(AllscriptsUnityClient::NewRelicSupport).to have_received(:enable_method_tracer).with(new_relic_client_driver)
9
9
  expect(described_class).to have_received(:add_method_tracer).with(:magic)
10
+ expect(described_class).to have_received(:add_method_tracer).with(:get_security_token!)
11
+ expect(described_class).to have_received(:add_method_tracer).with(:retire_security_token!)
10
12
  end
11
13
  end
12
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allscripts_unity_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ash Gupta