allscripts_unity_client 4.0.1 → 5.0.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/allscripts_unity_client.rb +3 -0
- data/lib/allscripts_unity_client/client.rb +1 -1
- data/lib/allscripts_unity_client/client_options.rb +7 -3
- data/lib/allscripts_unity_client/json_client_driver.rb +33 -0
- data/lib/allscripts_unity_client/version.rb +1 -1
- metadata +22 -60
- data/.gitignore +0 -21
- data/.rspec +0 -2
- data/.rubocop.yml +0 -340
- data/.travis.yml +0 -11
- data/Gemfile +0 -2
- data/LICENSE +0 -22
- data/README.md +0 -347
- data/Rakefile +0 -7
- data/allscripts_unity_client.gemspec +0 -40
- data/spec/allscripts_unity_client_spec.rb +0 -66
- data/spec/client_driver_spec.rb +0 -23
- data/spec/client_options_spec.rb +0 -185
- data/spec/client_spec.rb +0 -471
- data/spec/factories/allscripts_unity_client_parameters_factory.rb +0 -18
- data/spec/factories/client_driver_factory.rb +0 -20
- data/spec/factories/client_factory.rb +0 -9
- data/spec/factories/client_options.rb +0 -18
- data/spec/factories/magic_request_factory.rb +0 -37
- data/spec/factories/unity_request_factory.rb +0 -13
- data/spec/factories/unity_response_factory.rb +0 -12
- data/spec/fixtures/attributes_hash.yml +0 -15
- data/spec/fixtures/date_hash.yml +0 -8
- data/spec/fixtures/date_string_hash.yml +0 -8
- data/spec/fixtures/error.json +0 -3
- data/spec/fixtures/get_providers.json +0 -69
- data/spec/fixtures/get_providers.xml +0 -119
- data/spec/fixtures/get_providers_json.yml +0 -65
- data/spec/fixtures/get_providers_xml.yml +0 -270
- data/spec/fixtures/get_security_token.json +0 -1
- data/spec/fixtures/get_security_token.xml +0 -7
- data/spec/fixtures/get_server_info.json +0 -10
- data/spec/fixtures/get_server_info.xml +0 -40
- data/spec/fixtures/get_server_info_json.yml +0 -8
- data/spec/fixtures/get_server_info_xml.yml +0 -55
- data/spec/fixtures/no_attributes_hash.yml +0 -7
- data/spec/fixtures/retire_security_token.json +0 -1
- data/spec/fixtures/retire_security_token.xml +0 -5
- data/spec/fixtures/soap_fault.xml +0 -13
- data/spec/fixtures/string_keyed_hash.yml +0 -8
- data/spec/fixtures/symbol_keyed_hash.yml +0 -8
- data/spec/json_client_driver_spec.rb +0 -152
- data/spec/json_unity_request_spec.rb +0 -37
- data/spec/json_unity_response_spec.rb +0 -44
- data/spec/spec_helper.rb +0 -85
- data/spec/support/factory_bot.rb +0 -10
- data/spec/support/fixture_loader.rb +0 -20
- data/spec/support/shared_examples_for_client_driver.rb +0 -118
- data/spec/support/shared_examples_for_unity_request.rb +0 -114
- data/spec/support/shared_examples_for_unity_response.rb +0 -26
- data/spec/unity_request_spec.rb +0 -37
- data/spec/unity_response_spec.rb +0 -36
- data/spec/utilities_spec.rb +0 -144
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 96765b528b47b9361195ebb001d42ae3123f19311265f8ec323156b737ddfd1b
|
4
|
+
data.tar.gz: 3a7ee1148825675e866bfe6d023bac46dc6b9365cb0cee6b6e08408a525df136
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b954e8c0e5cb68b5a53289d105254714cf494caa9832715e03e2e5bb58598deb90156f075d0872e292925b6c53f2f52dcc021e8a487927cade16936db3cd914
|
7
|
+
data.tar.gz: 18b86b32e029f5d96759e3f660d61b8e7a80130fc72896f669ec0adf15732a1d26135a2798d769178a9b7a22416979dfd525488de868623f911fd3bac5caa70f
|
@@ -21,6 +21,9 @@ module AllscriptsUnityClient
|
|
21
21
|
class GetSecurityTokenError < RuntimeError
|
22
22
|
end
|
23
23
|
|
24
|
+
# Raised when user attempts to make unauthenticated calls.
|
25
|
+
class UnauthenticatedError < StandardError; end
|
26
|
+
|
24
27
|
# Create an instance of the Unity client.
|
25
28
|
#
|
26
29
|
# options:: See ClientOptions.
|
@@ -2,15 +2,15 @@ module AllscriptsUnityClient
|
|
2
2
|
|
3
3
|
# Contains various options for Unity configuration.
|
4
4
|
class ClientOptions
|
5
|
-
attr_accessor :proxy, :logger, :ca_file, :ca_path, :timeout
|
5
|
+
attr_accessor :proxy, :logger, :ca_file, :ca_path, :timeout, :ehr_userid, :ehr_password
|
6
6
|
attr_reader :base_unity_url, :username, :password, :appname, :timezone
|
7
7
|
|
8
8
|
# Constructor.
|
9
9
|
#
|
10
10
|
# options::
|
11
11
|
#
|
12
|
-
# - :username - Unity license username __(required)__.
|
13
|
-
# - :password - Unity license password __(required)__.
|
12
|
+
# - :username - Unity license username for security token __(required)__.
|
13
|
+
# - :password - Unity license password for security token __(required)__.
|
14
14
|
# - :appname - Unity license appname __(required)__.
|
15
15
|
# - :proxy - A string URL pointing to an HTTP proxy (optional, primarily for debugging)
|
16
16
|
# - :logger - A Ruby object that adheres to the same interface as Logger.
|
@@ -18,6 +18,8 @@ module AllscriptsUnityClient
|
|
18
18
|
# - :cs_path - A string path for a CA directory (JSON only).
|
19
19
|
# - :timeout - The number of seconds to set the HTTP response timeout and keepalive timeout (JSON only).
|
20
20
|
# - :base_unity_url - The URL where a Unity server is located (i.e. https://unity.server.com) __(required)__
|
21
|
+
# - :ehr_userid - Allscripts EHR Username for user authentication __(required)__.
|
22
|
+
# - :ehr_password - EHR Password for user authentication __(required)__.
|
21
23
|
def initialize(options = {})
|
22
24
|
@username = options[:username]
|
23
25
|
@password = options[:password]
|
@@ -27,6 +29,8 @@ module AllscriptsUnityClient
|
|
27
29
|
@ca_file = options[:ca_file]
|
28
30
|
@ca_path = options[:ca_path]
|
29
31
|
@timeout = options[:timeout]
|
32
|
+
@ehr_userid = options[:ehr_userid]
|
33
|
+
@ehr_password = options[:ehr_password]
|
30
34
|
|
31
35
|
self.timezone = options[:timezone]
|
32
36
|
self.base_unity_url = options[:base_unity_url]
|
@@ -47,6 +47,10 @@ module AllscriptsUnityClient
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def magic(parameters = {})
|
50
|
+
unless user_authenticated? || parameters[:action] == 'GetUserAuthentication'
|
51
|
+
log_info("Unauthenticated access of #{parameters[:action]} for #{@options.base_unity_url}")
|
52
|
+
end
|
53
|
+
|
50
54
|
request = JSONUnityRequest.new(parameters, @options.timezone, @options.appname, @security_token)
|
51
55
|
request_hash = request.to_hash
|
52
56
|
request_data = MultiJson.dump(request_hash)
|
@@ -70,6 +74,26 @@ module AllscriptsUnityClient
|
|
70
74
|
response.to_hash
|
71
75
|
end
|
72
76
|
|
77
|
+
# See Client#get_user_authentication.
|
78
|
+
def get_user_authentication(parameters = {})
|
79
|
+
response = magic({
|
80
|
+
action: 'GetUserAuthentication',
|
81
|
+
userid: parameters[:ehr_userid] || @options.ehr_userid,
|
82
|
+
parameter1: parameters[:ehr_password] || @options.ehr_password
|
83
|
+
})
|
84
|
+
|
85
|
+
if response[:valid_user] == 'YES'
|
86
|
+
@user_authentication = response
|
87
|
+
log_info("Successful authentication attempt for #{@options.base_unity_url}")
|
88
|
+
return true
|
89
|
+
elsif response[:valid_user] == 'NO'
|
90
|
+
log_info("Unuccessful authentication attempt for #{@options.base_unity_url}")
|
91
|
+
return false
|
92
|
+
else
|
93
|
+
raise StandardError.new('Unexpected response from the server')
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
73
97
|
# See Client#get_security_token!.
|
74
98
|
def get_security_token!(parameters = {})
|
75
99
|
username = parameters[:username] || @options.username
|
@@ -116,6 +140,15 @@ module AllscriptsUnityClient
|
|
116
140
|
log_retire_security_token
|
117
141
|
|
118
142
|
@security_token = nil
|
143
|
+
revoke_authentication
|
144
|
+
end
|
145
|
+
|
146
|
+
def user_authenticated?
|
147
|
+
@user_authentication.present?
|
148
|
+
end
|
149
|
+
|
150
|
+
def revoke_authentication
|
151
|
+
@user_authentication = nil
|
119
152
|
end
|
120
153
|
|
121
154
|
private
|
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: 5.0.0.pre.alpha
|
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: 2019-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -212,23 +212,28 @@ dependencies:
|
|
212
212
|
- - "~>"
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: '0.51'
|
215
|
+
- !ruby/object:Gem::Dependency
|
216
|
+
name: pry
|
217
|
+
requirement: !ruby/object:Gem::Requirement
|
218
|
+
requirements:
|
219
|
+
- - "~>"
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: 0.11.3
|
222
|
+
type: :development
|
223
|
+
prerelease: false
|
224
|
+
version_requirements: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - "~>"
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: 0.11.3
|
215
229
|
description: Provides a simple interface to the Allscripts Unity API using JSON. Developed
|
216
230
|
at healthfinch http://healthfinch.com
|
217
231
|
email:
|
218
|
-
-
|
232
|
+
- engineering@healthfinch.com
|
219
233
|
executables: []
|
220
234
|
extensions: []
|
221
235
|
extra_rdoc_files: []
|
222
236
|
files:
|
223
|
-
- ".gitignore"
|
224
|
-
- ".rspec"
|
225
|
-
- ".rubocop.yml"
|
226
|
-
- ".travis.yml"
|
227
|
-
- Gemfile
|
228
|
-
- LICENSE
|
229
|
-
- README.md
|
230
|
-
- Rakefile
|
231
|
-
- allscripts_unity_client.gemspec
|
232
237
|
- lib/allscripts_unity_client.rb
|
233
238
|
- lib/allscripts_unity_client/client.rb
|
234
239
|
- lib/allscripts_unity_client/client_driver.rb
|
@@ -240,49 +245,6 @@ files:
|
|
240
245
|
- lib/allscripts_unity_client/unity_response.rb
|
241
246
|
- lib/allscripts_unity_client/utilities.rb
|
242
247
|
- lib/allscripts_unity_client/version.rb
|
243
|
-
- spec/allscripts_unity_client_spec.rb
|
244
|
-
- spec/client_driver_spec.rb
|
245
|
-
- spec/client_options_spec.rb
|
246
|
-
- spec/client_spec.rb
|
247
|
-
- spec/factories/allscripts_unity_client_parameters_factory.rb
|
248
|
-
- spec/factories/client_driver_factory.rb
|
249
|
-
- spec/factories/client_factory.rb
|
250
|
-
- spec/factories/client_options.rb
|
251
|
-
- spec/factories/magic_request_factory.rb
|
252
|
-
- spec/factories/unity_request_factory.rb
|
253
|
-
- spec/factories/unity_response_factory.rb
|
254
|
-
- spec/fixtures/attributes_hash.yml
|
255
|
-
- spec/fixtures/date_hash.yml
|
256
|
-
- spec/fixtures/date_string_hash.yml
|
257
|
-
- spec/fixtures/error.json
|
258
|
-
- spec/fixtures/get_providers.json
|
259
|
-
- spec/fixtures/get_providers.xml
|
260
|
-
- spec/fixtures/get_providers_json.yml
|
261
|
-
- spec/fixtures/get_providers_xml.yml
|
262
|
-
- spec/fixtures/get_security_token.json
|
263
|
-
- spec/fixtures/get_security_token.xml
|
264
|
-
- spec/fixtures/get_server_info.json
|
265
|
-
- spec/fixtures/get_server_info.xml
|
266
|
-
- spec/fixtures/get_server_info_json.yml
|
267
|
-
- spec/fixtures/get_server_info_xml.yml
|
268
|
-
- spec/fixtures/no_attributes_hash.yml
|
269
|
-
- spec/fixtures/retire_security_token.json
|
270
|
-
- spec/fixtures/retire_security_token.xml
|
271
|
-
- spec/fixtures/soap_fault.xml
|
272
|
-
- spec/fixtures/string_keyed_hash.yml
|
273
|
-
- spec/fixtures/symbol_keyed_hash.yml
|
274
|
-
- spec/json_client_driver_spec.rb
|
275
|
-
- spec/json_unity_request_spec.rb
|
276
|
-
- spec/json_unity_response_spec.rb
|
277
|
-
- spec/spec_helper.rb
|
278
|
-
- spec/support/factory_bot.rb
|
279
|
-
- spec/support/fixture_loader.rb
|
280
|
-
- spec/support/shared_examples_for_client_driver.rb
|
281
|
-
- spec/support/shared_examples_for_unity_request.rb
|
282
|
-
- spec/support/shared_examples_for_unity_response.rb
|
283
|
-
- spec/unity_request_spec.rb
|
284
|
-
- spec/unity_response_spec.rb
|
285
|
-
- spec/utilities_spec.rb
|
286
248
|
homepage: https://github.com/healthfinch/allscripts-unity-client
|
287
249
|
licenses:
|
288
250
|
- MIT
|
@@ -293,17 +255,17 @@ require_paths:
|
|
293
255
|
- lib
|
294
256
|
required_ruby_version: !ruby/object:Gem::Requirement
|
295
257
|
requirements:
|
296
|
-
- - "
|
258
|
+
- - ">="
|
297
259
|
- !ruby/object:Gem::Version
|
298
|
-
version: 2.
|
260
|
+
version: 2.4.2
|
299
261
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
262
|
requirements:
|
301
|
-
- - "
|
263
|
+
- - ">"
|
302
264
|
- !ruby/object:Gem::Version
|
303
|
-
version:
|
265
|
+
version: 1.3.1
|
304
266
|
requirements: []
|
305
267
|
rubyforge_project:
|
306
|
-
rubygems_version: 2.
|
268
|
+
rubygems_version: 2.7.10
|
307
269
|
signing_key:
|
308
270
|
specification_version: 4
|
309
271
|
summary: Allscripts Unity API client
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,340 +0,0 @@
|
|
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
|