allscripts_unity_client 3.4.1 → 4.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 +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +340 -0
- data/Gemfile +1 -1
- data/Rakefile +1 -1
- data/allscripts_unity_client.gemspec +13 -12
- data/lib/allscripts_unity_client/client_driver.rb +3 -3
- data/lib/allscripts_unity_client/client_options.rb +5 -5
- data/lib/allscripts_unity_client/json_unity_request.rb +1 -1
- data/lib/allscripts_unity_client/json_unity_response.rb +1 -1
- data/lib/allscripts_unity_client/unity_request.rb +1 -1
- data/lib/allscripts_unity_client/unity_response.rb +1 -1
- data/lib/allscripts_unity_client/version.rb +1 -1
- data/spec/client_spec.rb +12 -12
- data/spec/factories/allscripts_unity_client_parameters_factory.rb +4 -2
- data/spec/factories/client_driver_factory.rb +3 -1
- data/spec/factories/client_factory.rb +4 -2
- data/spec/factories/client_options.rb +3 -1
- data/spec/factories/magic_request_factory.rb +6 -2
- data/spec/factories/unity_request_factory.rb +4 -2
- data/spec/factories/unity_response_factory.rb +4 -2
- data/spec/json_unity_request_spec.rb +1 -1
- data/spec/json_unity_response_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/factory_bot.rb +10 -0
- data/spec/support/fixture_loader.rb +1 -3
- data/spec/support/shared_examples_for_unity_response.rb +1 -1
- data/spec/unity_request_spec.rb +1 -1
- data/spec/unity_response_spec.rb +1 -1
- metadata +44 -29
- data/spec/support/factory_girl.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37f39f6c94937da70a53192060bb913051b67197
|
4
|
+
data.tar.gz: ea1f2091395c1fde998e0eb599cddd9f37822c39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d769e28f027e5bed0601ed9614c517a619966dfcb2b7c89fb93211d5819492fcde6811f1f6893e2c1c29ef6fa04da7a017a51c60a68d8404d37cf791ae392b53
|
7
|
+
data.tar.gz: 7a04ede9be73ddd21c15d441c3669969ca4474e595da7ded59d266ee2a07e3264c66b654d44073c3fcd4f0b8ef0bf045dce547dd5ef34d97c42a7cdbdc093214
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,340 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisabledByDefault: true
|
3
|
+
DisplayCopNames: true
|
4
|
+
Exclude:
|
5
|
+
- 'bin/**/*'
|
6
|
+
|
7
|
+
|
8
|
+
Style/AndOr:
|
9
|
+
Description: 'Use &&/|| instead of and/or.'
|
10
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
|
11
|
+
Enabled: true
|
12
|
+
Exclude:
|
13
|
+
- 'lib/healthfinch/service/controller_base.rb'
|
14
|
+
|
15
|
+
Style/DefWithParentheses:
|
16
|
+
Description: 'Use def with parentheses when there are arguments.'
|
17
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
18
|
+
Enabled: true
|
19
|
+
|
20
|
+
Style/PreferredHashMethods:
|
21
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
22
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
23
|
+
Enabled: true
|
24
|
+
|
25
|
+
Style/DoubleNegation:
|
26
|
+
Description: 'Checks for uses of double negation (!!).'
|
27
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
28
|
+
Enabled: true
|
29
|
+
Exclude:
|
30
|
+
- 'lib/healthfinch/service/rspec/process_service_acceptance.rb'
|
31
|
+
|
32
|
+
Layout/ElseAlignment:
|
33
|
+
Description: 'Align elses and elsifs correctly.'
|
34
|
+
Enabled: true
|
35
|
+
|
36
|
+
Style/EmptyElse:
|
37
|
+
Description: 'Avoid empty else-clauses.'
|
38
|
+
Enabled: true
|
39
|
+
|
40
|
+
Layout/EmptyLineBetweenDefs:
|
41
|
+
Description: 'Use empty lines between defs.'
|
42
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
Layout/EmptyLines:
|
46
|
+
Description: "Don't use several empty lines in a row."
|
47
|
+
Enabled: true
|
48
|
+
|
49
|
+
Layout/EndOfLine:
|
50
|
+
Description: 'Use Unix-style line endings.'
|
51
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
Layout/ExtraSpacing:
|
55
|
+
Description: 'Do not use unnecessary spacing.'
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
Naming/FileName:
|
59
|
+
Description: 'Use snake_case for source file names.'
|
60
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
61
|
+
Enabled: true
|
62
|
+
|
63
|
+
Layout/IndentationConsistency:
|
64
|
+
Description: 'Keep indentation straight.'
|
65
|
+
Enabled: true
|
66
|
+
|
67
|
+
Layout/IndentationWidth:
|
68
|
+
Description: 'Use 2 spaces for indentation.'
|
69
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Style/MethodCallWithoutArgsParentheses:
|
73
|
+
Description: 'Do not use parentheses for method calls with no arguments.'
|
74
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
|
75
|
+
Enabled: true
|
76
|
+
|
77
|
+
Style/MethodDefParentheses:
|
78
|
+
Description: >-
|
79
|
+
Checks if the method definitions have or don't have
|
80
|
+
parentheses.
|
81
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Naming/MethodName:
|
85
|
+
Description: 'Use the configured style when naming methods.'
|
86
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
Style/NestedTernaryOperator:
|
90
|
+
Description: 'Use one expression per branch in a ternary operator.'
|
91
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
|
92
|
+
Enabled: true
|
93
|
+
|
94
|
+
Style/NilComparison:
|
95
|
+
Description: 'Prefer x.nil? to x == nil.'
|
96
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
Style/NonNilCheck:
|
100
|
+
Description: 'Checks for redundant nil checks.'
|
101
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
|
102
|
+
Enabled: true
|
103
|
+
|
104
|
+
Layout/SpaceAroundKeyword:
|
105
|
+
Description: 'Put a space before the modifier keyword.'
|
106
|
+
Enabled: true
|
107
|
+
|
108
|
+
Layout/Tab:
|
109
|
+
Description: 'No hard tabs.'
|
110
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
111
|
+
Enabled: true
|
112
|
+
|
113
|
+
Layout/TrailingBlankLines:
|
114
|
+
Description: 'Checks trailing blank lines and final newline.'
|
115
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
Layout/TrailingWhitespace:
|
119
|
+
Description: 'Avoid trailing whitespace.'
|
120
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
|
121
|
+
Enabled: true
|
122
|
+
|
123
|
+
Style/UnlessElse:
|
124
|
+
Description: >-
|
125
|
+
Do not use unless with else. Rewrite these with the positive
|
126
|
+
case first.
|
127
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
|
128
|
+
Enabled: true
|
129
|
+
|
130
|
+
Naming/VariableName:
|
131
|
+
Description: 'Use the configured style when naming variables.'
|
132
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
#################### Lint ################################
|
136
|
+
### Warnings
|
137
|
+
|
138
|
+
Lint/AmbiguousOperator:
|
139
|
+
Description: >-
|
140
|
+
Checks for ambiguous operators in the first argument of a
|
141
|
+
method invocation without parentheses.
|
142
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
143
|
+
Enabled: true
|
144
|
+
|
145
|
+
Lint/AmbiguousRegexpLiteral:
|
146
|
+
Description: >-
|
147
|
+
Checks for ambiguous regexp literals in the first argument of
|
148
|
+
a method invocation without parenthesis.
|
149
|
+
Enabled: true
|
150
|
+
|
151
|
+
Lint/AssignmentInCondition:
|
152
|
+
Description: "Don't use assignment in conditions."
|
153
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
154
|
+
Enabled: true
|
155
|
+
|
156
|
+
Lint/BlockAlignment:
|
157
|
+
Description: 'Align block ends correctly.'
|
158
|
+
Enabled: true
|
159
|
+
|
160
|
+
Lint/CircularArgumentReference:
|
161
|
+
Description: "Don't refer to the keyword argument in the default value."
|
162
|
+
Enabled: true
|
163
|
+
|
164
|
+
Lint/ConditionPosition:
|
165
|
+
Description: >-
|
166
|
+
Checks for condition placed in a confusing position relative to
|
167
|
+
the keyword.
|
168
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
169
|
+
Enabled: true
|
170
|
+
|
171
|
+
Lint/Debugger:
|
172
|
+
Description: 'Check for debugger calls.'
|
173
|
+
Enabled: true
|
174
|
+
|
175
|
+
Lint/DefEndAlignment:
|
176
|
+
Description: 'Align ends corresponding to defs correctly.'
|
177
|
+
Enabled: true
|
178
|
+
|
179
|
+
Lint/DeprecatedClassMethods:
|
180
|
+
Description: 'Check for deprecated class method calls.'
|
181
|
+
Enabled: true
|
182
|
+
|
183
|
+
Lint/DuplicateMethods:
|
184
|
+
Description: 'Check for duplicate methods calls.'
|
185
|
+
Enabled: true
|
186
|
+
|
187
|
+
Lint/DuplicatedKey:
|
188
|
+
Description: 'Check for duplicate keys in hash literals.'
|
189
|
+
Enabled: true
|
190
|
+
|
191
|
+
Lint/EachWithObjectArgument:
|
192
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
193
|
+
Enabled: true
|
194
|
+
|
195
|
+
Lint/ElseLayout:
|
196
|
+
Description: 'Check for odd code arrangement in an else block.'
|
197
|
+
Enabled: true
|
198
|
+
|
199
|
+
Lint/EmptyEnsure:
|
200
|
+
Description: 'Checks for empty ensure block.'
|
201
|
+
Enabled: true
|
202
|
+
|
203
|
+
Lint/EmptyInterpolation:
|
204
|
+
Description: 'Checks for empty string interpolation.'
|
205
|
+
Enabled: true
|
206
|
+
|
207
|
+
Lint/EndAlignment:
|
208
|
+
Description: 'Align ends correctly.'
|
209
|
+
Enabled: true
|
210
|
+
|
211
|
+
Lint/EndInMethod:
|
212
|
+
Description: 'END blocks should not be placed inside method definitions.'
|
213
|
+
Enabled: true
|
214
|
+
|
215
|
+
Lint/EnsureReturn:
|
216
|
+
Description: 'Do not use return in an ensure block.'
|
217
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
218
|
+
Enabled: true
|
219
|
+
|
220
|
+
Security/Eval:
|
221
|
+
Description: 'The use of eval represents a serious security risk.'
|
222
|
+
Enabled: true
|
223
|
+
|
224
|
+
Lint/FormatParameterMismatch:
|
225
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
226
|
+
Enabled: true
|
227
|
+
|
228
|
+
Lint/HandleExceptions:
|
229
|
+
Description: "Don't suppress exception."
|
230
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
231
|
+
Enabled: true
|
232
|
+
|
233
|
+
Lint/LiteralInCondition:
|
234
|
+
Description: 'Checks of literals used in conditions.'
|
235
|
+
Enabled: true
|
236
|
+
|
237
|
+
Lint/LiteralInInterpolation:
|
238
|
+
Description: 'Checks for literals used in interpolation.'
|
239
|
+
Enabled: true
|
240
|
+
|
241
|
+
Lint/Loop:
|
242
|
+
Description: >-
|
243
|
+
Use Kernel#loop with break rather than begin/end/until or
|
244
|
+
begin/end/while for post-loop tests.
|
245
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
246
|
+
Enabled: true
|
247
|
+
|
248
|
+
Lint/NestedMethodDefinition:
|
249
|
+
Description: 'Do not use nested method definitions.'
|
250
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
251
|
+
Enabled: true
|
252
|
+
|
253
|
+
Lint/NonLocalExitFromIterator:
|
254
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
255
|
+
Enabled: true
|
256
|
+
|
257
|
+
Lint/ParenthesesAsGroupedExpression:
|
258
|
+
Description: >-
|
259
|
+
Checks for method calls with a space before the opening
|
260
|
+
parenthesis.
|
261
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
262
|
+
Enabled: true
|
263
|
+
|
264
|
+
Lint/RequireParentheses:
|
265
|
+
Description: >-
|
266
|
+
Use parentheses in the method call to avoid confusion
|
267
|
+
about precedence.
|
268
|
+
Enabled: true
|
269
|
+
|
270
|
+
Lint/RescueException:
|
271
|
+
Description: 'Avoid rescuing the Exception class.'
|
272
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
273
|
+
Enabled: true
|
274
|
+
|
275
|
+
Lint/ShadowingOuterLocalVariable:
|
276
|
+
Description: >-
|
277
|
+
Do not use the same name as outer local variable
|
278
|
+
for block arguments or block local variables.
|
279
|
+
Enabled: true
|
280
|
+
|
281
|
+
Layout/SpaceBeforeFirstArg:
|
282
|
+
Description: >-
|
283
|
+
Put a space between a method name and the first argument
|
284
|
+
in a method call without parentheses.
|
285
|
+
Enabled: true
|
286
|
+
|
287
|
+
Lint/StringConversionInInterpolation:
|
288
|
+
Description: 'Checks for Object#to_s usage in string interpolation.'
|
289
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
|
290
|
+
Enabled: true
|
291
|
+
|
292
|
+
Lint/UnderscorePrefixedVariableName:
|
293
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
294
|
+
Enabled: true
|
295
|
+
|
296
|
+
Lint/UnneededDisable:
|
297
|
+
Description: >-
|
298
|
+
Checks for rubocop:disable comments that can be removed.
|
299
|
+
Note: this cop is not disabled when disabling all cops.
|
300
|
+
It must be explicitly disabled.
|
301
|
+
Enabled: true
|
302
|
+
|
303
|
+
Lint/UnusedBlockArgument:
|
304
|
+
Description: 'Checks for unused block arguments.'
|
305
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
306
|
+
Enabled: true
|
307
|
+
|
308
|
+
Lint/UnusedMethodArgument:
|
309
|
+
Description: 'Checks for unused method arguments.'
|
310
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
311
|
+
Enabled: true
|
312
|
+
|
313
|
+
Lint/UnreachableCode:
|
314
|
+
Description: 'Unreachable code.'
|
315
|
+
Enabled: true
|
316
|
+
|
317
|
+
Lint/UselessAccessModifier:
|
318
|
+
Description: 'Checks for useless access modifiers.'
|
319
|
+
Enabled: true
|
320
|
+
|
321
|
+
Lint/UselessAssignment:
|
322
|
+
Description: 'Checks for useless assignment to a local variable.'
|
323
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
324
|
+
Enabled: true
|
325
|
+
|
326
|
+
Lint/UselessComparison:
|
327
|
+
Description: 'Checks for comparison of something with itself.'
|
328
|
+
Enabled: true
|
329
|
+
|
330
|
+
Lint/UselessElseWithoutRescue:
|
331
|
+
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
332
|
+
Enabled: true
|
333
|
+
|
334
|
+
Lint/UselessSetterCall:
|
335
|
+
Description: 'Checks for useless setter call to a local variable.'
|
336
|
+
Enabled: true
|
337
|
+
|
338
|
+
Lint/Void:
|
339
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
340
|
+
Enabled: true
|
data/Gemfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
-
gemspec
|
2
|
+
gemspec
|
data/Rakefile
CHANGED
@@ -22,18 +22,19 @@ Gem::Specification.new do |gem|
|
|
22
22
|
|
23
23
|
gem.files = `git ls-files`.split("\n").delete_if { |file| /^\.ruby-version$/.match(file) }
|
24
24
|
|
25
|
-
gem.add_dependency 'httpclient', '~> 2.
|
26
|
-
gem.add_dependency 'activesupport', '>=
|
25
|
+
gem.add_dependency 'httpclient', '~> 2.8'
|
26
|
+
gem.add_dependency 'activesupport', '>= 4', '< 5.0'
|
27
27
|
gem.add_dependency 'nokogiri', '>= 1.4.0'
|
28
|
-
gem.add_dependency 'nori', '~> 2.
|
28
|
+
gem.add_dependency 'nori', '~> 2.6.0'
|
29
29
|
gem.add_dependency 'american_date', '~> 1.1.0'
|
30
|
-
gem.add_dependency 'multi_json', '~> 1.
|
31
|
-
gem.add_dependency 'rubyntlm', '~> 0.
|
32
|
-
|
33
|
-
gem.add_development_dependency '
|
34
|
-
gem.add_development_dependency 'rake', '~>
|
35
|
-
gem.add_development_dependency 'faker', '~> 1.4
|
36
|
-
gem.add_development_dependency 'rspec', '~> 3.
|
37
|
-
gem.add_development_dependency 'webmock', '~> 1.
|
38
|
-
gem.add_development_dependency 'simplecov', '~> 0.
|
30
|
+
gem.add_dependency 'multi_json', '~> 1.12'
|
31
|
+
gem.add_dependency 'rubyntlm', '~> 0.6.2'
|
32
|
+
|
33
|
+
gem.add_development_dependency 'factory_bot', '~> 4.8.0'
|
34
|
+
gem.add_development_dependency 'rake', '~> 12.2.1'
|
35
|
+
gem.add_development_dependency 'faker', '~> 1.8.4'
|
36
|
+
gem.add_development_dependency 'rspec', '~> 3.7.0'
|
37
|
+
gem.add_development_dependency 'webmock', '~> 3.1.0'
|
38
|
+
gem.add_development_dependency 'simplecov', '~> 0.15.1'
|
39
|
+
gem.add_development_dependency 'rubocop', '~> 0.51'
|
39
40
|
end
|
@@ -27,17 +27,17 @@ module AllscriptsUnityClient
|
|
27
27
|
end
|
28
28
|
|
29
29
|
# See Client#magic.
|
30
|
-
def magic(
|
30
|
+
def magic(_parameters = {})
|
31
31
|
raise NotImplementedError, 'magic not implemented'
|
32
32
|
end
|
33
33
|
|
34
34
|
# See Client#get_security_token!.
|
35
|
-
def get_security_token!(
|
35
|
+
def get_security_token!(_parameters = {})
|
36
36
|
raise NotImplementedError, 'get_security_token! not implemented'
|
37
37
|
end
|
38
38
|
|
39
39
|
# See Client#retire_security_token!.
|
40
|
-
def retire_security_token!(
|
40
|
+
def retire_security_token!(_parameters = {})
|
41
41
|
raise NotImplementedError, 'retire_security_token! not implemented'
|
42
42
|
end
|
43
43
|
|
@@ -38,10 +38,10 @@ module AllscriptsUnityClient
|
|
38
38
|
#
|
39
39
|
# See #initialize.
|
40
40
|
def validate_options(options = {})
|
41
|
-
base_unity_url = options.
|
42
|
-
username = options.
|
43
|
-
password = options.
|
44
|
-
appname = options.
|
41
|
+
base_unity_url = options.fetch(:base_unity_url, @base_unity_url)
|
42
|
+
username = options.fetch(:username, @username)
|
43
|
+
password = options.fetch(:password, @password)
|
44
|
+
appname = options.fetch(:appname, @appname)
|
45
45
|
|
46
46
|
raise ArgumentError, 'base_unity_url can not be nil' if base_unity_url.nil?
|
47
47
|
raise ArgumentError, 'username can not be nil' if username.nil?
|
@@ -54,7 +54,7 @@ module AllscriptsUnityClient
|
|
54
54
|
# Strips trailing slash for URL.
|
55
55
|
def base_unity_url=(base_unity_url)
|
56
56
|
validate_options(base_unity_url: base_unity_url)
|
57
|
-
@base_unity_url = base_unity_url.gsub
|
57
|
+
@base_unity_url = base_unity_url.gsub(/\/$/, '')
|
58
58
|
end
|
59
59
|
|
60
60
|
# Mutator for username.
|
data/spec/client_spec.rb
CHANGED
@@ -51,18 +51,18 @@ describe AllscriptsUnityClient::Client do
|
|
51
51
|
|
52
52
|
describe '#get_task_list' do
|
53
53
|
it 'does stuff' do
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
54
|
+
subject.client_driver = double(magic: 'magic')
|
55
|
+
subject.get_task_list(123, Date.yesterday.strftime("%m/%d/%Y"),
|
56
|
+
'Y', 'Something|okj', 'Ready|go')
|
57
|
+
magicified_parameters = {
|
58
|
+
action: 'GetTaskList',
|
59
|
+
userid: 123,
|
60
|
+
parameter1: Date.yesterday.strftime("%m/%d/%Y"),
|
61
|
+
parameter2: 'Something|okj',
|
62
|
+
parameter3: 'Ready|go',
|
63
|
+
parameter4: 'Y'
|
64
|
+
}
|
65
|
+
expect(subject.client_driver).to have_received(:magic).with(magicified_parameters)
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :allscripts_unity_client_parameters, class: Hash do
|
3
3
|
initialize_with { attributes }
|
4
4
|
|
@@ -12,5 +12,7 @@ FactoryGirl.define do
|
|
12
12
|
ca_file nil
|
13
13
|
ca_path nil
|
14
14
|
timeout nil
|
15
|
+
|
16
|
+
skip_create
|
15
17
|
end
|
16
|
-
end
|
18
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :client_driver, class: AllscriptsUnityClient::ClientDriver do
|
3
3
|
initialize_with { new(attributes) }
|
4
4
|
|
@@ -14,5 +14,7 @@ FactoryGirl.define do
|
|
14
14
|
timeout nil
|
15
15
|
|
16
16
|
factory :json_client_driver, class: AllscriptsUnityClient::JSONClientDriver
|
17
|
+
|
18
|
+
skip_create
|
17
19
|
end
|
18
20
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :client_options, class: AllscriptsUnityClient::ClientOptions do
|
3
3
|
initialize_with { new(attributes) }
|
4
4
|
|
@@ -12,5 +12,7 @@ FactoryGirl.define do
|
|
12
12
|
ca_file nil
|
13
13
|
ca_path nil
|
14
14
|
timeout nil
|
15
|
+
|
16
|
+
skip_create
|
15
17
|
end
|
16
18
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :magic_request, class: Hash do
|
3
3
|
initialize_with { attributes }
|
4
4
|
|
@@ -14,6 +14,8 @@ FactoryGirl.define do
|
|
14
14
|
parameter5 nil
|
15
15
|
parameter6 nil
|
16
16
|
data nil
|
17
|
+
|
18
|
+
skip_create
|
17
19
|
end
|
18
20
|
|
19
21
|
factory :populated_magic_request, parent: :magic_request do
|
@@ -29,5 +31,7 @@ FactoryGirl.define do
|
|
29
31
|
parameter5 Faker::Internet.domain_word
|
30
32
|
parameter6 Faker::Internet.domain_word
|
31
33
|
data Faker::Internet.domain_word
|
34
|
+
|
35
|
+
skip_create
|
32
36
|
end
|
33
|
-
end
|
37
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :unity_request, class: AllscriptsUnityClient::UnityRequest do
|
3
3
|
initialize_with { new(parameters, timezone, appname, security_token) }
|
4
4
|
|
@@ -7,5 +7,7 @@ FactoryGirl.define do
|
|
7
7
|
appname Faker::Name.name
|
8
8
|
security_token SecureRandom.uuid
|
9
9
|
factory :json_unity_request, class: AllscriptsUnityClient::JSONUnityRequest
|
10
|
+
|
11
|
+
skip_create
|
10
12
|
end
|
11
|
-
end
|
13
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
FactoryBot.define do
|
2
2
|
factory :unity_response, class: AllscriptsUnityClient::UnityResponse do
|
3
3
|
initialize_with { new(response, timezone) }
|
4
4
|
|
@@ -6,5 +6,7 @@ FactoryGirl.define do
|
|
6
6
|
timezone ActiveSupport::TimeZone['Etc/UTC']
|
7
7
|
|
8
8
|
factory :json_unity_response, class: AllscriptsUnityClient::JSONUnityResponse
|
9
|
+
|
10
|
+
skip_create
|
9
11
|
end
|
10
|
-
end
|
12
|
+
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/unity_request_spec.rb
CHANGED
data/spec/unity_response_spec.rb
CHANGED
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:
|
4
|
+
version: 4.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:
|
11
|
+
date: 2018-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -16,34 +16,34 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.8'
|
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: '2.
|
26
|
+
version: '2.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '4'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '5'
|
36
|
+
version: '5.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '4'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '5'
|
46
|
+
version: '5.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: nokogiri
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 2.
|
67
|
+
version: 2.6.0
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 2.
|
74
|
+
version: 2.6.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: american_date
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,112 +92,126 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '1.
|
95
|
+
version: '1.12'
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '1.
|
102
|
+
version: '1.12'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rubyntlm
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0.
|
109
|
+
version: 0.6.2
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 0.
|
116
|
+
version: 0.6.2
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
118
|
+
name: factory_bot
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 4.
|
123
|
+
version: 4.8.0
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 4.
|
130
|
+
version: 4.8.0
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: rake
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
137
|
+
version: 12.2.1
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
144
|
+
version: 12.2.1
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: faker
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: 1.4
|
151
|
+
version: 1.8.4
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 1.4
|
158
|
+
version: 1.8.4
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: rspec
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - "~>"
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: 3.
|
165
|
+
version: 3.7.0
|
166
166
|
type: :development
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
170
|
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: 3.
|
172
|
+
version: 3.7.0
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: webmock
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
177
|
- - "~>"
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version: 1.
|
179
|
+
version: 3.1.0
|
180
180
|
type: :development
|
181
181
|
prerelease: false
|
182
182
|
version_requirements: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
184
|
- - "~>"
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version: 1.
|
186
|
+
version: 3.1.0
|
187
187
|
- !ruby/object:Gem::Dependency
|
188
188
|
name: simplecov
|
189
189
|
requirement: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
191
|
- - "~>"
|
192
192
|
- !ruby/object:Gem::Version
|
193
|
-
version: 0.
|
193
|
+
version: 0.15.1
|
194
194
|
type: :development
|
195
195
|
prerelease: false
|
196
196
|
version_requirements: !ruby/object:Gem::Requirement
|
197
197
|
requirements:
|
198
198
|
- - "~>"
|
199
199
|
- !ruby/object:Gem::Version
|
200
|
-
version: 0.
|
200
|
+
version: 0.15.1
|
201
|
+
- !ruby/object:Gem::Dependency
|
202
|
+
name: rubocop
|
203
|
+
requirement: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - "~>"
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0.51'
|
208
|
+
type: :development
|
209
|
+
prerelease: false
|
210
|
+
version_requirements: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - "~>"
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '0.51'
|
201
215
|
description: Provides a simple interface to the Allscripts Unity API using JSON. Developed
|
202
216
|
at healthfinch http://healthfinch.com
|
203
217
|
email:
|
@@ -208,6 +222,7 @@ extra_rdoc_files: []
|
|
208
222
|
files:
|
209
223
|
- ".gitignore"
|
210
224
|
- ".rspec"
|
225
|
+
- ".rubocop.yml"
|
211
226
|
- ".travis.yml"
|
212
227
|
- Gemfile
|
213
228
|
- LICENSE
|
@@ -260,7 +275,7 @@ files:
|
|
260
275
|
- spec/json_unity_request_spec.rb
|
261
276
|
- spec/json_unity_response_spec.rb
|
262
277
|
- spec/spec_helper.rb
|
263
|
-
- spec/support/
|
278
|
+
- spec/support/factory_bot.rb
|
264
279
|
- spec/support/fixture_loader.rb
|
265
280
|
- spec/support/shared_examples_for_client_driver.rb
|
266
281
|
- spec/support/shared_examples_for_unity_request.rb
|
@@ -288,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
303
|
version: '0'
|
289
304
|
requirements: []
|
290
305
|
rubyforge_project:
|
291
|
-
rubygems_version: 2.2.
|
306
|
+
rubygems_version: 2.5.2.1
|
292
307
|
signing_key:
|
293
308
|
specification_version: 4
|
294
309
|
summary: Allscripts Unity API client
|