allscripts_unity_client 3.2.1 → 3.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93d6a293357813026811d3ac5218a18f6670891f
|
4
|
+
data.tar.gz: 31e812dd2336a1365a453b5156e8caeed5f8f508
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 106616676750288be5c91e4ca7a8c45137e8b05d63601a7bc4274bc474afde5e624c4a55f08134a519f0a0e0423cec299955c981f249bad74a3cd0f18dc0b30f
|
7
|
+
data.tar.gz: 016876031b97295407002e4fb1a61e78dec615855c944cd0f8433eb4c847923b165835cb45dee4509308a968b3820e823ef8525086d849ce2ef58f25c07231eb
|
data/.travis.yml
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
|
|
23
23
|
gem.files = `git ls-files`.split("\n").delete_if { |file| /^\.ruby-version$/.match(file) }
|
24
24
|
|
25
25
|
gem.add_dependency 'httpclient', '~> 2.6'
|
26
|
-
gem.add_dependency 'activesupport', '>=
|
26
|
+
gem.add_dependency 'activesupport', '>=3', '< 5'
|
27
27
|
gem.add_dependency 'nokogiri', '>= 1.4.0'
|
28
28
|
gem.add_dependency 'nori', '~> 2.4.0'
|
29
29
|
gem.add_dependency 'american_date', '~> 1.1.0'
|
@@ -48,16 +48,20 @@ module AllscriptsUnityClient
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def magic(parameters = {})
|
51
|
-
|
51
|
+
request = JSONUnityRequest.new(parameters, @options.timezone, @options.appname, @security_token)
|
52
|
+
log_magic(request)
|
53
|
+
|
54
|
+
request_hash = request.to_hash
|
55
|
+
log_info("Request Data: #{request_hash}")
|
56
|
+
request_data = MultiJson.dump(request_hash)
|
52
57
|
|
53
58
|
start_timer
|
54
|
-
response = @connection.post(build_uri('MagicJson'),
|
59
|
+
response = @connection.post(build_uri('MagicJson'), request_data)
|
60
|
+
log_info("Response Status: #{response.status}")
|
55
61
|
end_timer
|
56
62
|
|
57
63
|
response = MultiJson.load(response.body)
|
58
|
-
|
59
64
|
raise_if_response_error(response)
|
60
|
-
log_magic(request_data)
|
61
65
|
|
62
66
|
response = JSONUnityResponse.new(response, @options.timezone)
|
63
67
|
response.to_hash
|
@@ -46,6 +46,7 @@ describe AllscriptsUnityClient::JSONClientDriver do
|
|
46
46
|
allow(subject).to receive(:start_timer)
|
47
47
|
allow(subject).to receive(:end_timer)
|
48
48
|
allow(subject).to receive(:log_magic)
|
49
|
+
allow(subject).to receive(:log_info).twice
|
49
50
|
end
|
50
51
|
|
51
52
|
it 'should POST to /Unity/UnityService.svc/json/MagicJson' do
|
@@ -78,6 +79,11 @@ describe AllscriptsUnityClient::JSONClientDriver do
|
|
78
79
|
subject.magic
|
79
80
|
expect(subject).to have_received(:log_magic)
|
80
81
|
end
|
82
|
+
|
83
|
+
it 'should call log_info for recording request data and response status' do
|
84
|
+
subject.magic
|
85
|
+
expect(subject).to have_received(:log_info).twice
|
86
|
+
end
|
81
87
|
end
|
82
88
|
|
83
89
|
describe '#get_security_token!' do
|
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: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- healthfinch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -31,6 +31,9 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '5'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +41,9 @@ dependencies:
|
|
38
41
|
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '3'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '5'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: nokogiri
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -282,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
282
288
|
version: '0'
|
283
289
|
requirements: []
|
284
290
|
rubyforge_project:
|
285
|
-
rubygems_version: 2.
|
291
|
+
rubygems_version: 2.2.2
|
286
292
|
signing_key:
|
287
293
|
specification_version: 4
|
288
294
|
summary: Allscripts Unity API client
|