net-ssh 5.2.0 → 6.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +7 -4
  6. data/.rubocop_todo.yml +389 -379
  7. data/.travis.yml +13 -14
  8. data/CHANGES.txt +7 -0
  9. data/README.md +286 -0
  10. data/Rakefile +1 -2
  11. data/appveyor.yml +4 -2
  12. data/lib/net/ssh/authentication/key_manager.rb +7 -3
  13. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +3 -1
  14. data/lib/net/ssh/authentication/pub_key_fingerprint.rb +0 -1
  15. data/lib/net/ssh/authentication/session.rb +2 -6
  16. data/lib/net/ssh/buffer.rb +1 -9
  17. data/lib/net/ssh/config.rb +25 -10
  18. data/lib/net/ssh/connection/channel.rb +7 -3
  19. data/lib/net/ssh/connection/session.rb +7 -3
  20. data/lib/net/ssh/key_factory.rb +6 -8
  21. data/lib/net/ssh/known_hosts.rb +26 -29
  22. data/lib/net/ssh/service/forward.rb +2 -1
  23. data/lib/net/ssh/test.rb +3 -2
  24. data/lib/net/ssh/transport/algorithms.rb +67 -42
  25. data/lib/net/ssh/transport/cipher_factory.rb +11 -27
  26. data/lib/net/ssh/transport/constants.rb +10 -6
  27. data/lib/net/ssh/transport/ctr.rb +1 -7
  28. data/lib/net/ssh/transport/hmac.rb +15 -13
  29. data/lib/net/ssh/transport/hmac/abstract.rb +16 -0
  30. data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
  31. data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
  32. data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
  33. data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
  34. data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
  35. data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
  36. data/lib/net/ssh/transport/kex.rb +13 -11
  37. data/lib/net/ssh/transport/kex/abstract.rb +123 -0
  38. data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
  39. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +38 -0
  40. data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
  41. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +1 -15
  42. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +9 -118
  43. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +0 -6
  44. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
  45. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +18 -79
  46. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +5 -4
  47. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +5 -4
  48. data/lib/net/ssh/transport/openssl.rb +104 -107
  49. data/lib/net/ssh/transport/packet_stream.rb +44 -10
  50. data/lib/net/ssh/transport/state.rb +1 -1
  51. data/lib/net/ssh/version.rb +3 -3
  52. data/net-ssh.gemspec +8 -6
  53. metadata +35 -16
  54. metadata.gz.sig +0 -0
  55. data/Gemfile.noed25519.lock +0 -41
  56. data/README.rdoc +0 -194
  57. data/support/arcfour_check.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bb9cafa5bb69001f6ac6c303a18369ea759d93a
4
- data.tar.gz: d2cb338177e2ce3abc7755c4b5e3f163048a56e0
3
+ metadata.gz: 16c438c23a0dc7ead21778dea22cff5dcb8c4ffa
4
+ data.tar.gz: 19f4f5a5e082b1dbdd39aac4c1e90144e2b56540
5
5
  SHA512:
6
- metadata.gz: 4c3a4b65a0ac623b3567d04d79f50cf081286dd4aa74ea0f97fae2edb1f3c70bb470b9511c18530c241e5ad4956828df434f12d29655e11e8f934992aeb0d13e
7
- data.tar.gz: c69a452a092f2f3077db5b7c6249e20b143fe9161f53b078f99375e45f815b04d716cf4bee53447ba28189126cc889db423891f4fb1e3d1a5f965f5bdc484c7f
6
+ metadata.gz: 593269d7a4788bb428ee0a2131d53bc87f4051b929da404eb6c8d7e560deedd35bd5ae0d6948b9463210efd2ec87d813bfcdd60ac017cee914253f5389130dbd
7
+ data.tar.gz: c5548d70f356434795f87371c0be1638ec468b1b170207dec738d48af37d45ba2d9dced66c7d0b74f42f8d8bd640d1676dfc6d8b41590d89860c79be3d0578f5
Binary file
data.tar.gz.sig CHANGED
Binary file
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  /Gemfile.lock
2
+ /Gemfile.noed25519.lock
2
3
  doc
3
4
  rdoc
4
5
  ri
@@ -1,8 +1,11 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
- AllCops:
3
+ Style/DoubleNegation:
4
4
  Exclude:
5
- - 'tryout/**/*'
5
+ - 'lib/net/ssh/key_factory.rb'
6
6
 
7
- Style/DoubleNegation:
8
- Enabled: false
7
+ Metrics/LineLength:
8
+ Max: 150
9
+ Exclude:
10
+ - 'test/**/*.rb'
11
+ - 'net-ssh.gemspec'
@@ -1,113 +1,155 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-12-11 13:27:14 +0100 using RuboCop version 0.46.0.
3
+ # on 2019-09-10 17:13:26 +0200 using RuboCop version 0.74.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 4
10
- # Configuration parameters: AllowSafeAssignment.
11
- Lint/AssignmentInCondition:
12
- Exclude:
13
- - 'lib/net/ssh/connection/channel.rb'
14
- - 'lib/net/ssh/connection/session.rb'
15
- - 'lib/net/ssh/proxy/command.rb'
9
+ # Offense count: 76
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
12
+ # SupportedStyles: with_first_argument, with_fixed_indentation
13
+ Layout/AlignArguments:
14
+ Enabled: false
16
15
 
17
- # Offense count: 1
18
- Lint/EmptyWhen:
16
+ # Offense count: 57
17
+ # Cop supports --auto-correct.
18
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
19
+ # SupportedHashRocketStyles: key, separator, table
20
+ # SupportedColonStyles: key, separator, table
21
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
22
+ Layout/AlignHash:
19
23
  Exclude:
20
- - 'lib/net/ssh/config.rb'
24
+ - 'lib/net/ssh/key_factory.rb'
25
+ - 'lib/net/ssh/transport/cipher_factory.rb'
26
+ - 'lib/net/ssh/transport/hmac.rb'
27
+ - 'lib/net/ssh/transport/kex.rb'
28
+ - 'test/test_config.rb'
21
29
 
22
- # Layout/EndAlignment:
23
- # Enabled: false
30
+ # Offense count: 70
31
+ # Cop supports --auto-correct.
32
+ Layout/EmptyLineAfterGuardClause:
33
+ Enabled: false
24
34
 
25
- # Offense count: 23
26
- # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
27
- # AllowedNames: io, id, to
28
- Naming/UncommunicativeMethodParamName:
29
- Exclude:
30
- - 'lib/net/ssh/authentication/certificate.rb'
31
- - 'lib/net/ssh/authentication/ed25519.rb'
32
- - 'lib/net/ssh/authentication/key_manager.rb'
33
- - 'lib/net/ssh/authentication/pageant.rb'
34
- - 'lib/net/ssh/buffer.rb'
35
- - 'lib/net/ssh/buffered_io.rb'
36
- - 'lib/net/ssh/ruby_compat.rb'
37
- - 'lib/net/ssh/test/socket.rb'
38
- - 'lib/net/ssh/transport/ctr.rb'
39
- - 'lib/net/ssh/transport/hmac/abstract.rb'
40
- - 'lib/net/ssh/transport/identity_cipher.rb'
41
- - 'test/connection/test_session.rb'
35
+ # Offense count: 170
36
+ # Cop supports --auto-correct.
37
+ # Configuration parameters: EnforcedStyle.
38
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
39
+ Layout/EmptyLinesAroundModuleBody:
40
+ Enabled: false
42
41
 
43
42
  # Offense count: 2
44
- Naming/BinaryOperatorParameterName:
43
+ # Cop supports --auto-correct.
44
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
45
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
46
+ Layout/IndentFirstArrayElement:
45
47
  Exclude:
46
- - 'lib/net/ssh/buffer.rb'
47
- - 'lib/net/ssh/version.rb'
48
+ - 'lib/net/ssh/transport/openssl.rb'
48
49
 
49
- # Offense count: 4
50
- Naming/MemoizedInstanceVariableName:
50
+ # Offense count: 3
51
+ # Cop supports --auto-correct.
52
+ Layout/LeadingBlankLines:
51
53
  Exclude:
52
- - 'lib/net/ssh/transport/openssl.rb'
53
- - 'test/authentication/test_key_manager.rb'
54
+ - 'Rakefile'
55
+ - 'lib/net/ssh/authentication/pub_key_fingerprint.rb'
56
+ - 'support/arcfour_check.rb'
54
57
 
55
- # Offense count: 1
56
- Lint/LiteralAsCondition:
58
+ # Offense count: 14
59
+ # Cop supports --auto-correct.
60
+ # Configuration parameters: AllowDoxygenCommentStyle.
61
+ Layout/LeadingCommentSpace:
57
62
  Exclude:
58
- - 'lib/net/ssh/authentication/pageant.rb'
63
+ - 'test/integration/test_ed25519_pkeys.rb'
64
+ - 'test/integration/test_forward.rb'
65
+ - 'test/integration/test_id_rsa_keys.rb'
66
+ - 'test/integration/test_proxy.rb'
59
67
 
60
- # Offense count: 3
61
- Style/MultipleComparison:
68
+ # Offense count: 23
69
+ # Cop supports --auto-correct.
70
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
71
+ # SupportedStyles: aligned, indented
72
+ Layout/MultilineOperationIndentation:
62
73
  Exclude:
63
74
  - 'lib/net/ssh/authentication/pageant.rb'
64
- - 'lib/net/ssh/known_hosts.rb'
75
+ - 'lib/net/ssh/proxy/https.rb'
76
+ - 'lib/net/ssh/transport/algorithms.rb'
77
+ - 'lib/net/ssh/transport/state.rb'
78
+ - 'lib/net/ssh/verifiers/always.rb'
79
+ - 'test/authentication/methods/test_hostbased.rb'
80
+ - 'test/authentication/methods/test_publickey.rb'
65
81
 
66
- # Offense count: 1
67
- # Configuration parameters: EnforcedStyle.
68
- # SupportedStyles: annotated, template, unannotated
69
- Style/FormatStringToken:
82
+ # Offense count: 16
83
+ # Cop supports --auto-correct.
84
+ Layout/SpaceAfterColon:
70
85
  Exclude:
71
- - 'lib/net/ssh/loggable.rb'
86
+ - 'lib/net/ssh/authentication/ed25519.rb'
87
+ - 'test/integration/test_ed25519_pkeys.rb'
88
+ - 'test/verifiers/test_always.rb'
72
89
 
73
- # Offense count: 7
74
- # Configuration parameters: Blacklist.
75
- # Blacklist: END, (?-mix:EO[A-Z]{1})
76
- Naming/HeredocDelimiterNaming:
90
+ # Offense count: 281
91
+ # Cop supports --auto-correct.
92
+ Layout/SpaceAfterComma:
77
93
  Enabled: false
78
94
 
79
- # Offense count: 3
80
- # Configuration parameters: MaximumRangeSize.
81
- Lint/MissingCopEnableDirective:
95
+ # Offense count: 136
96
+ # Cop supports --auto-correct.
97
+ # Configuration parameters: EnforcedStyle.
98
+ # SupportedStyles: space, no_space
99
+ Layout/SpaceAroundEqualsInParameterDefault:
100
+ Enabled: false
101
+
102
+ # Offense count: 10
103
+ # Cop supports --auto-correct.
104
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
105
+ # SupportedStyles: space, no_space
106
+ # SupportedStylesForEmptyBraces: space, no_space
107
+ Layout/SpaceInsideBlockBraces:
82
108
  Exclude:
109
+ - 'lib/net/ssh/authentication/session.rb'
110
+ - 'lib/net/ssh/transport/ctr.rb'
111
+ - 'support/ssh_tunnel_bug.rb'
83
112
  - 'test/authentication/test_agent.rb'
84
- - 'test/authentication/test_certificate.rb'
85
- - 'test/integration/test_agent.rb'
113
+ - 'test/authentication/test_key_manager.rb'
114
+ - 'test/start/test_user_nil.rb'
86
115
 
116
+ # Offense count: 6
117
+ # Cop supports --auto-correct.
118
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
119
+ # SupportedStyles: space, no_space
120
+ # SupportedStylesForEmptyBrackets: space, no_space
121
+ Layout/SpaceInsideReferenceBrackets:
122
+ Exclude:
123
+ - 'lib/net/ssh/transport/algorithms.rb'
87
124
 
88
- # Offense count: 7
125
+ # Offense count: 17
89
126
  # Cop supports --auto-correct.
90
127
  # Configuration parameters: EnforcedStyle.
91
- # SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
92
- Layout/IndentHeredoc:
128
+ # SupportedStyles: final_newline, final_blank_line
129
+ Layout/TrailingBlankLines:
93
130
  Enabled: false
94
131
 
95
- # Offense count: 2
132
+ # Offense count: 739
96
133
  # Cop supports --auto-correct.
97
- # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
98
- # SupportedStylesAlignWith: start_of_line, def
99
- Layout/DefEndAlignment:
134
+ # Configuration parameters: AllowInHeredoc.
135
+ Layout/TrailingWhitespace:
136
+ Enabled: false
137
+
138
+ # Offense count: 4
139
+ # Configuration parameters: AllowSafeAssignment.
140
+ Lint/AssignmentInCondition:
100
141
  Exclude:
101
- - 'test/transport/hmac/test_sha2_256.rb'
102
- - 'test/transport/hmac/test_sha2_512.rb'
142
+ - 'lib/net/ssh/connection/channel.rb'
143
+ - 'lib/net/ssh/connection/session.rb'
144
+ - 'lib/net/ssh/proxy/command.rb'
103
145
 
104
- # Offense count: 3
105
- Style/CommentedKeyword:
146
+ # Offense count: 1
147
+ Lint/EmptyWhen:
106
148
  Exclude:
107
- - 'test/connection/test_session.rb'
108
- - 'test/integration/test_forward.rb'
149
+ - 'lib/net/ssh/config.rb'
109
150
 
110
- # Offense count: 8
151
+ # Offense count: 9
152
+ # Configuration parameters: AllowComments.
111
153
  Lint/HandleExceptions:
112
154
  Exclude:
113
155
  - 'lib/net/ssh/authentication/session.rb'
@@ -124,28 +166,35 @@ Lint/ImplicitStringConcatenation:
124
166
  - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
125
167
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
126
168
 
169
+ # Offense count: 1
170
+ Lint/LiteralAsCondition:
171
+ Exclude:
172
+ - 'lib/net/ssh/authentication/pageant.rb'
173
+
127
174
  # Offense count: 2
128
175
  Lint/Loop:
129
176
  Exclude:
130
177
  - 'lib/net/ssh/authentication/methods/password.rb'
131
178
  - 'lib/net/ssh/key_factory.rb'
132
179
 
133
- # Offense count: 1
134
- Lint/NextWithoutAccumulator:
180
+ # Offense count: 3
181
+ # Configuration parameters: MaximumRangeSize.
182
+ Lint/MissingCopEnableDirective:
135
183
  Exclude:
136
- - 'lib/net/ssh/connection/session.rb'
184
+ - 'test/authentication/test_agent.rb'
185
+ - 'test/authentication/test_certificate.rb'
186
+ - 'test/integration/test_agent.rb'
137
187
 
138
188
  # Offense count: 1
139
189
  Lint/NonLocalExitFromIterator:
140
190
  Exclude:
141
191
  - 'lib/net/ssh/known_hosts.rb'
142
192
 
143
- # Offense count: 4
193
+ # Offense count: 3
144
194
  Lint/RescueException:
145
195
  Exclude:
146
196
  - 'lib/net/ssh/authentication/key_manager.rb'
147
197
  - 'lib/net/ssh/service/forward.rb'
148
- - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
149
198
 
150
199
  # Offense count: 2
151
200
  Lint/ShadowedException:
@@ -153,11 +202,18 @@ Lint/ShadowedException:
153
202
  - 'lib/net/ssh/authentication/key_manager.rb'
154
203
 
155
204
  # Offense count: 1
205
+ # Configuration parameters: AllowKeywordBlockArguments.
156
206
  Lint/UnderscorePrefixedVariableName:
157
207
  Exclude:
158
208
  - 'lib/net/ssh/test/local_packet.rb'
159
209
 
160
- # Offense count: 52
210
+ # Offense count: 1
211
+ # Cop supports --auto-correct.
212
+ Lint/UnneededRequireStatement:
213
+ Exclude:
214
+ - 'lib/net/ssh/ruby_compat.rb'
215
+
216
+ # Offense count: 60
161
217
  # Cop supports --auto-correct.
162
218
  # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
163
219
  Lint/UnusedBlockArgument:
@@ -173,14 +229,14 @@ Lint/UnusedBlockArgument:
173
229
  - 'test/transport/test_algorithms.rb'
174
230
  - 'test/transport/test_hmac.rb'
175
231
 
176
- # Offense count: 50
232
+ # Offense count: 62
177
233
  # Cop supports --auto-correct.
178
234
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
179
235
  Lint/UnusedMethodArgument:
180
236
  Enabled: false
181
237
 
182
238
  # Offense count: 3
183
- # Configuration parameters: ContextCreatingMethods.
239
+ # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
184
240
  Lint/UselessAccessModifier:
185
241
  Exclude:
186
242
  - 'lib/net/ssh/buffered_io.rb'
@@ -195,110 +251,180 @@ Lint/UselessAssignment:
195
251
  - 'test/integration/common.rb'
196
252
  - 'test/integration/test_forward.rb'
197
253
 
198
- # Offense count: 196
254
+ # Offense count: 229
199
255
  Metrics/AbcSize:
200
- Max: 76
256
+ Max: 89
201
257
 
202
- # Offense count: 14
203
- # Configuration parameters: CountComments.
258
+ # Offense count: 15
259
+ # Configuration parameters: CountComments, ExcludedMethods.
260
+ # ExcludedMethods: refine
204
261
  Metrics/BlockLength:
205
- Max: 88
262
+ Max: 59
206
263
 
207
264
  # Offense count: 1
265
+ # Configuration parameters: CountBlocks.
208
266
  Metrics/BlockNesting:
209
267
  Max: 4
210
268
 
211
- # Offense count: 27
269
+ # Offense count: 31
212
270
  # Configuration parameters: CountComments.
213
271
  Metrics/ClassLength:
214
- Max: 548
272
+ Max: 488
215
273
 
216
- # Offense count: 34
274
+ # Offense count: 38
217
275
  Metrics/CyclomaticComplexity:
218
- Max: 39
219
-
220
- # Offense count: 1341
221
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
222
- # URISchemes: http, https
223
- Metrics/LineLength:
224
- Max: 934
276
+ Max: 27
225
277
 
226
- # Offense count: 164
227
- # Configuration parameters: CountComments.
278
+ # Offense count: 211
279
+ # Configuration parameters: CountComments, ExcludedMethods.
228
280
  Metrics/MethodLength:
229
- Max: 93
281
+ Max: 82
230
282
 
231
- # Offense count: 1
283
+ # Offense count: 2
232
284
  # Configuration parameters: CountComments.
233
285
  Metrics/ModuleLength:
234
- Max: 142
286
+ Max: 160
235
287
 
236
288
  # Offense count: 1
237
289
  # Configuration parameters: CountKeywordArgs.
238
290
  Metrics/ParameterLists:
239
291
  Max: 6
240
292
 
241
- # Offense count: 27
293
+ # Offense count: 30
242
294
  Metrics/PerceivedComplexity:
243
- Max: 23
295
+ Max: 20
244
296
 
245
- # Offense count: 3
246
- # Cop supports --auto-correct.
247
- Performance/RangeInclude:
297
+ # Offense count: 9
298
+ Naming/AccessorMethodName:
248
299
  Exclude:
249
- - 'lib/net/ssh/transport/algorithms.rb'
300
+ - 'lib/net/ssh/authentication/methods/password.rb'
301
+ - 'lib/net/ssh/authentication/pageant.rb'
302
+ - 'lib/net/ssh/connection/session.rb'
303
+ - 'lib/net/ssh/transport/kex/abstract5656.rb'
304
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
305
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
250
306
 
251
- # Offense count: 3
252
- # Cop supports --auto-correct.
253
- Performance/RedundantBlockCall:
307
+ # Offense count: 2
308
+ Naming/BinaryOperatorParameterName:
254
309
  Exclude:
255
- - 'lib/net/ssh/connection/session.rb'
310
+ - 'lib/net/ssh/buffer.rb'
311
+ - 'lib/net/ssh/version.rb'
312
+
313
+ # Offense count: 12
314
+ Naming/ClassAndModuleCamelCase:
315
+ Exclude:
316
+ - 'lib/net/ssh/transport/hmac/md5_96.rb'
317
+ - 'lib/net/ssh/transport/hmac/sha1_96.rb'
318
+ - 'lib/net/ssh/transport/hmac/sha2_256.rb'
319
+ - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
320
+ - 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
321
+ - 'lib/net/ssh/transport/hmac/sha2_512.rb'
322
+ - 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
323
+ - 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
324
+ - 'test/transport/hmac/test_md5_96.rb'
325
+ - 'test/transport/hmac/test_sha1_96.rb'
326
+ - 'test/transport/hmac/test_sha2_256.rb'
327
+ - 'test/transport/hmac/test_sha2_256_96.rb'
328
+ - 'test/transport/hmac/test_sha2_256_etm.rb'
329
+ - 'test/transport/hmac/test_sha2_512.rb'
330
+ - 'test/transport/hmac/test_sha2_512_96.rb'
331
+ - 'test/transport/hmac/test_sha2_512_etm.rb'
332
+
333
+ # Offense count: 4
334
+ Naming/ConstantName:
335
+ Exclude:
336
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
337
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
338
+ - 'lib/net/ssh/transport/openssl.rb'
339
+
340
+ # Offense count: 11
341
+ # Configuration parameters: Blacklist.
342
+ # Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
343
+ Naming/HeredocDelimiterNaming:
344
+ Exclude:
345
+ - 'test/authentication/test_agent.rb'
346
+ - 'test/authentication/test_certificate.rb'
347
+ - 'test/authentication/test_ed25519.rb'
348
+ - 'test/authentication/test_session.rb'
349
+ - 'test/integration/test_agent.rb'
350
+ - 'test/test_key_factory.rb'
351
+
352
+ # Offense count: 4
353
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
354
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
355
+ Naming/MemoizedInstanceVariableName:
356
+ Exclude:
357
+ - 'lib/net/ssh/transport/openssl.rb'
358
+ - 'test/authentication/test_key_manager.rb'
359
+
360
+ # Offense count: 32
361
+ # Configuration parameters: EnforcedStyle.
362
+ # SupportedStyles: snake_case, camelCase
363
+ Naming/MethodName:
364
+ Exclude:
365
+ - 'lib/net/ssh/authentication/ed25519_loader.rb'
366
+ - 'lib/net/ssh/transport/kex/curve25519_sha256_loader.rb'
367
+ - 'test/authentication/test_agent.rb'
368
+ - 'test/authentication/test_session.rb'
369
+ - 'test/common.rb'
256
370
  - 'test/connection/test_channel.rb'
371
+ - 'test/test_config.rb'
372
+ - 'test/test_key_factory.rb'
257
373
 
258
- # Offense count: 6
374
+ # Offense count: 4
259
375
  # Cop supports --auto-correct.
260
- Performance/RedundantMatch:
376
+ # Configuration parameters: PreferredName.
377
+ Naming/RescuedExceptionsVariableName:
261
378
  Exclude:
262
- - 'lib/net/ssh/key_factory.rb'
263
- - 'lib/net/ssh/transport/server_version.rb'
379
+ - 'lib/net/ssh/connection/session.rb'
380
+ - 'lib/net/ssh/service/forward.rb'
381
+ - 'lib/net/ssh/verifiers/accept_new.rb'
264
382
 
265
- # Offense count: 13
266
- Naming/AccessorMethodName:
383
+ # Offense count: 23
384
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
385
+ # AllowedNames: io, id, to, by, on, in, at, ip, db
386
+ Naming/UncommunicativeMethodParamName:
267
387
  Exclude:
268
- - 'lib/net/ssh/authentication/methods/password.rb'
388
+ - 'lib/net/ssh/authentication/certificate.rb'
389
+ - 'lib/net/ssh/authentication/ed25519.rb'
390
+ - 'lib/net/ssh/authentication/key_manager.rb'
269
391
  - 'lib/net/ssh/authentication/pageant.rb'
270
- - 'lib/net/ssh/connection/session.rb'
271
- - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
272
- - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
273
- - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
274
- - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb'
392
+ - 'lib/net/ssh/buffer.rb'
393
+ - 'lib/net/ssh/buffered_io.rb'
394
+ - 'lib/net/ssh/ruby_compat.rb'
395
+ - 'lib/net/ssh/test/socket.rb'
396
+ - 'lib/net/ssh/transport/ctr.rb'
397
+ - 'lib/net/ssh/transport/hmac/abstract.rb'
398
+ - 'lib/net/ssh/transport/identity_cipher.rb'
399
+ - 'test/connection/test_session.rb'
400
+
401
+ # Offense count: 8
402
+ # Configuration parameters: EnforcedStyle.
403
+ # SupportedStyles: inline, group
404
+ Style/AccessModifierDeclarations:
405
+ Exclude:
406
+ - 'lib/net/ssh/authentication/pageant.rb'
407
+ - 'lib/net/ssh/transport/openssl.rb'
408
+ - 'test/test_key_factory.rb'
275
409
 
276
410
  # Offense count: 2
277
411
  # Cop supports --auto-correct.
278
- # Configuration parameters: EnforcedStyle, SupportedStyles.
412
+ # Configuration parameters: EnforcedStyle.
279
413
  # SupportedStyles: prefer_alias, prefer_alias_method
280
414
  Style/Alias:
281
415
  Exclude:
282
416
  - 'lib/net/ssh/connection/session.rb'
283
417
  - 'lib/net/ssh/service/forward.rb'
284
418
 
285
- # Offense count: 72
286
- # Cop supports --auto-correct.
287
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
288
- # SupportedStyles: with_first_parameter, with_fixed_indentation
289
- Layout/AlignParameters:
290
- Enabled: false
291
-
292
- # Offense count: 33
419
+ # Offense count: 31
293
420
  # Cop supports --auto-correct.
294
- # Configuration parameters: EnforcedStyle, SupportedStyles.
421
+ # Configuration parameters: EnforcedStyle.
295
422
  # SupportedStyles: always, conditionals
296
423
  Style/AndOr:
297
424
  Exclude:
298
425
  - 'lib/net/ssh/authentication/key_manager.rb'
299
426
  - 'lib/net/ssh/buffer.rb'
300
427
  - 'lib/net/ssh/buffered_io.rb'
301
- - 'lib/net/ssh/config.rb'
302
428
  - 'lib/net/ssh/connection/channel.rb'
303
429
  - 'lib/net/ssh/connection/session.rb'
304
430
  - 'lib/net/ssh/key_factory.rb'
@@ -308,19 +434,19 @@ Style/AndOr:
308
434
  - 'lib/net/ssh/transport/cipher_factory.rb'
309
435
  - 'lib/net/ssh/transport/hmac.rb'
310
436
  - 'lib/net/ssh/transport/key_expander.rb'
311
- - 'lib/net/ssh/transport/packet_stream.rb'
312
437
  - 'test/common.rb'
313
438
 
314
439
  # Offense count: 2
440
+ # Configuration parameters: AllowedChars.
315
441
  Style/AsciiComments:
316
442
  Exclude:
317
443
  - 'lib/net/ssh/authentication/pageant.rb'
318
444
  - 'lib/net/ssh/buffered_io.rb'
319
445
 
320
- # Offense count: 11
446
+ # Offense count: 8
321
447
  # Cop supports --auto-correct.
322
- # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
323
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
448
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
449
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
324
450
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
325
451
  # FunctionalMethods: let, let!, subject, watch
326
452
  # IgnoredMethods: lambda, proc, it
@@ -332,12 +458,11 @@ Style/BlockDelimiters:
332
458
  - 'lib/net/ssh/connection/keepalive.rb'
333
459
  - 'lib/net/ssh/proxy/command.rb'
334
460
  - 'lib/net/ssh/transport/ctr.rb'
335
- - 'test/test_buffer.rb'
336
461
  - 'test/verifiers/test_always.rb'
337
462
 
338
- # Offense count: 8
463
+ # Offense count: 7
339
464
  # Cop supports --auto-correct.
340
- # Configuration parameters: EnforcedStyle, SupportedStyles.
465
+ # Configuration parameters: EnforcedStyle.
341
466
  # SupportedStyles: braces, no_braces, context_dependent
342
467
  Style/BracesAroundHashParameters:
343
468
  Exclude:
@@ -346,7 +471,6 @@ Style/BracesAroundHashParameters:
346
471
  - 'test/integration/test_id_rsa_keys.rb'
347
472
  - 'test/transport/test_hmac.rb'
348
473
  - 'test/transport/test_session.rb'
349
- - 'test_kerberos_client2.rb'
350
474
 
351
475
  # Offense count: 2
352
476
  Style/CaseEquality:
@@ -360,35 +484,29 @@ Style/CharacterLiteral:
360
484
  Exclude:
361
485
  - 'test/test_buffer.rb'
362
486
 
363
- # Offense count: 12
364
- Naming/ClassAndModuleCamelCase:
487
+ # Offense count: 15
488
+ # Cop supports --auto-correct.
489
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
490
+ # SupportedStyles: nested, compact
491
+ Style/ClassAndModuleChildren:
365
492
  Exclude:
493
+ - 'lib/net/ssh/transport/ctr.rb'
494
+ - 'lib/net/ssh/transport/hmac.rb'
495
+ - 'lib/net/ssh/transport/hmac/md5.rb'
366
496
  - 'lib/net/ssh/transport/hmac/md5_96.rb'
497
+ - 'lib/net/ssh/transport/hmac/none.rb'
498
+ - 'lib/net/ssh/transport/hmac/ripemd160.rb'
499
+ - 'lib/net/ssh/transport/hmac/sha1.rb'
367
500
  - 'lib/net/ssh/transport/hmac/sha1_96.rb'
368
501
  - 'lib/net/ssh/transport/hmac/sha2_256.rb'
369
502
  - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
503
+ - 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
370
504
  - 'lib/net/ssh/transport/hmac/sha2_512.rb'
371
505
  - 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
372
- - 'test/transport/hmac/test_md5_96.rb'
373
- - 'test/transport/hmac/test_sha1_96.rb'
374
- - 'test/transport/hmac/test_sha2_256.rb'
375
- - 'test/transport/hmac/test_sha2_256_96.rb'
376
- - 'test/transport/hmac/test_sha2_512.rb'
377
- - 'test/transport/hmac/test_sha2_512_96.rb'
378
-
379
- # Offense count: 16
380
- # Configuration parameters: EnforcedStyle, SupportedStyles.
381
- # SupportedStyles: nested, compact
382
- Style/ClassAndModuleChildren:
383
- Enabled: false
384
-
385
- # Offense count: 1
386
- # Cop supports --auto-correct.
387
- # Configuration parameters: EnforcedStyle, SupportedStyles.
388
- # SupportedStyles: is_a?, kind_of?
389
- Style/ClassCheck:
390
- Exclude:
391
- - 'test/authentication/test_key_manager.rb'
506
+ - 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
507
+ - 'lib/net/ssh/transport/kex.rb'
508
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
509
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb'
392
510
 
393
511
  # Offense count: 7
394
512
  Style/ClassVars:
@@ -415,27 +533,23 @@ Style/CommentAnnotation:
415
533
  - 'lib/net/ssh/buffer.rb'
416
534
  - 'lib/net/ssh/config.rb'
417
535
 
418
- # Offense count: 4
536
+ # Offense count: 3
537
+ Style/CommentedKeyword:
538
+ Exclude:
539
+ - 'test/connection/test_session.rb'
540
+ - 'test/integration/test_forward.rb'
541
+
542
+ # Offense count: 7
419
543
  # Cop supports --auto-correct.
420
- # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
544
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
421
545
  # SupportedStyles: assign_to_condition, assign_inside_condition
422
546
  Style/ConditionalAssignment:
423
547
  Exclude:
424
- - 'lib/net/ssh/transport/ctr.rb'
425
- - 'lib/net/ssh/transport/state.rb'
426
- - 'test/test_key_factory.rb'
427
548
  - 'lib/net/ssh/config.rb'
428
- - 'lib/net/ssh/known_hosts.rb'
429
549
  - 'lib/net/ssh/proxy/socks5.rb'
430
550
  - 'lib/net/ssh/test/script.rb'
431
-
432
- # Offense count: 5
433
- Naming/ConstantName:
434
- Exclude:
435
- - 'lib/net/ssh/authentication/pageant.rb'
436
- - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
437
- - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
438
- - 'lib/net/ssh/transport/openssl.rb'
551
+ - 'lib/net/ssh/transport/state.rb'
552
+ - 'test/test_key_factory.rb'
439
553
 
440
554
  # Offense count: 1
441
555
  # Cop supports --auto-correct.
@@ -443,7 +557,7 @@ Style/DefWithParentheses:
443
557
  Exclude:
444
558
  - 'test/integration/test_forward.rb'
445
559
 
446
- # Offense count: 16
560
+ # Offense count: 14
447
561
  Style/Documentation:
448
562
  Exclude:
449
563
  - 'spec/**/*'
@@ -453,27 +567,15 @@ Style/Documentation:
453
567
  - 'lib/net/ssh/connection/session.rb'
454
568
  - 'lib/net/ssh/ruby_compat.rb'
455
569
  - 'lib/net/ssh/test/extensions.rb'
456
- - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
457
- - 'lib/net/ssh/transport/hmac/sha2_512.rb'
458
- - 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
459
570
  - 'lib/net/ssh/transport/kex.rb'
460
- - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb'
461
571
  - 'lib/net/ssh/transport/key_expander.rb'
462
572
  - 'lib/net/ssh/transport/openssl.rb'
463
573
 
464
- # Offense count: 209
465
- # Cop supports --auto-correct.
466
- # Configuration parameters: EnforcedStyle, SupportedStyles.
467
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
468
- Layout/EmptyLinesAroundModuleBody:
469
- Enabled: false
470
-
471
- # Offense count: 2
574
+ # Offense count: 1
472
575
  # Cop supports --auto-correct.
473
576
  Style/EmptyLiteral:
474
577
  Exclude:
475
578
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
476
- - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb'
477
579
 
478
580
  # Offense count: 1
479
581
  # Cop supports --auto-correct.
@@ -482,26 +584,41 @@ Style/EvenOdd:
482
584
  - 'lib/net/ssh/buffer.rb'
483
585
 
484
586
  # Offense count: 2
485
- # Configuration parameters: EnforcedStyle, SupportedStyles.
587
+ # Cop supports --auto-correct.
588
+ # Configuration parameters: EnforcedStyle.
486
589
  # SupportedStyles: format, sprintf, percent
487
590
  Style/FormatString:
488
591
  Exclude:
489
592
  - 'lib/net/ssh/authentication/pageant.rb'
490
593
  - 'lib/net/ssh/loggable.rb'
491
594
 
492
- # Offense count: 35
595
+ # Offense count: 1
596
+ # Configuration parameters: EnforcedStyle.
597
+ # SupportedStyles: annotated, template, unannotated
598
+ Style/FormatStringToken:
599
+ Exclude:
600
+ - 'lib/net/ssh/loggable.rb'
601
+
602
+ # Offense count: 166
603
+ # Cop supports --auto-correct.
604
+ # Configuration parameters: EnforcedStyle.
605
+ # SupportedStyles: always, never
606
+ Style/FrozenStringLiteralComment:
607
+ Enabled: false
608
+
609
+ # Offense count: 34
493
610
  # Configuration parameters: MinBodyLength.
494
611
  Style/GuardClause:
495
612
  Enabled: false
496
613
 
497
614
  # Offense count: 1
615
+ # Configuration parameters: AllowIfModifier.
498
616
  Style/IfInsideElse:
499
617
  Exclude:
500
618
  - 'lib/net/ssh/connection/session.rb'
501
619
 
502
- # Offense count: 9
620
+ # Offense count: 16
503
621
  # Cop supports --auto-correct.
504
- # Configuration parameters: MaxLineLength.
505
622
  Style/IfUnlessModifier:
506
623
  Exclude:
507
624
  - 'lib/net/ssh.rb'
@@ -509,43 +626,18 @@ Style/IfUnlessModifier:
509
626
  - 'lib/net/ssh/proxy/command.rb'
510
627
  - 'lib/net/ssh/service/forward.rb'
511
628
  - 'lib/net/ssh/transport/ctr.rb'
629
+ - 'lib/net/ssh/transport/kex.rb'
630
+ - 'lib/net/ssh/transport/kex/abstract5656.rb'
512
631
  - 'lib/net/ssh/transport/key_expander.rb'
513
632
  - 'test/integration/test_proxy.rb'
514
633
  - 'test/test_key_factory.rb'
515
634
 
516
- # Offense count: 4
517
- # Cop supports --auto-correct.
518
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
519
- # SupportedStyles: special_inside_parentheses, consistent, align_brackets
520
- Layout/IndentArray:
521
- Exclude:
522
- - 'lib/net/ssh/transport/openssl.rb'
523
-
524
- # Offense count: 4
525
- # Cop supports --auto-correct.
526
- # Configuration parameters: IndentationWidth.
527
- Layout/IndentAssignment:
528
- Exclude:
529
- - 'test/transport/kex/test_diffie_hellman_group1_sha1.rb'
530
- - 'test/transport/kex/test_ecdh_sha2_nistp256.rb'
531
- - 'test/transport/kex/test_ecdh_sha2_nistp384.rb'
532
- - 'test/transport/kex/test_ecdh_sha2_nistp521.rb'
533
-
534
635
  # Offense count: 1
535
636
  # Cop supports --auto-correct.
536
637
  Style/InfiniteLoop:
537
638
  Exclude:
538
639
  - 'lib/net/ssh/authentication/pageant.rb'
539
640
 
540
- # Offense count: 17
541
- # Cop supports --auto-correct.
542
- Layout/LeadingCommentSpace:
543
- Exclude:
544
- - 'test/integration/test_ed25519_pkeys.rb'
545
- - 'test/integration/test_forward.rb'
546
- - 'test/integration/test_id_rsa_keys.rb'
547
- - 'test/integration/test_proxy.rb'
548
-
549
641
  # Offense count: 27
550
642
  # Cop supports --auto-correct.
551
643
  Style/LineEndConcatenation:
@@ -553,44 +645,17 @@ Style/LineEndConcatenation:
553
645
  - 'lib/net/ssh/authentication/pageant.rb'
554
646
  - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
555
647
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
556
- - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb'
557
648
  - 'lib/net/ssh/verifiers/always.rb'
558
649
 
559
- # Offense count: 12
560
- # Cop supports --auto-correct.
561
- Style/MethodCallWithoutArgsParentheses:
562
- Exclude:
563
- - 'test/authentication/test_key_manager.rb'
564
- - 'test/connection/test_session.rb'
565
- - 'test/integration/test_forward.rb'
566
- - 'test/start/test_user_nil.rb'
567
-
568
- # Offense count: 2
569
- # Cop supports --auto-correct.
570
- # Configuration parameters: EnforcedStyle, SupportedStyles.
571
- # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
572
- Style/MethodDefParentheses:
573
- Exclude:
574
- - 'test/common.rb'
575
- - 'test/integration/common.rb'
576
-
577
650
  # Offense count: 1
578
- Style/MethodMissing:
651
+ Style/MethodMissingSuper:
579
652
  Exclude:
580
653
  - 'lib/net/ssh/connection/session.rb'
581
654
 
582
- # Offense count: 24
583
- # Configuration parameters: EnforcedStyle, SupportedStyles.
584
- # SupportedStyles: snake_case, camelCase
585
- Naming/MethodName:
655
+ # Offense count: 1
656
+ Style/MissingRespondToMissing:
586
657
  Exclude:
587
- - 'lib/net/ssh/authentication/ed25519_loader.rb'
588
- - 'test/authentication/test_agent.rb'
589
- - 'test/authentication/test_session.rb'
590
- - 'test/common.rb'
591
- - 'test/connection/test_channel.rb'
592
- - 'test/test_config.rb'
593
- - 'test/test_key_factory.rb'
658
+ - 'lib/net/ssh/connection/session.rb'
594
659
 
595
660
  # Offense count: 3
596
661
  # Cop supports --auto-correct.
@@ -599,29 +664,33 @@ Style/MultilineIfThen:
599
664
  - 'lib/net/ssh/buffered_io.rb'
600
665
  - 'lib/net/ssh/service/forward.rb'
601
666
 
602
- # Offense count: 23
667
+ # Offense count: 6
603
668
  # Cop supports --auto-correct.
604
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
605
- # SupportedStyles: aligned, indented
606
- Layout/MultilineOperationIndentation:
669
+ Style/MultilineWhenThen:
670
+ Exclude:
671
+ - 'lib/net/ssh/test/packet.rb'
672
+ - 'lib/net/ssh/transport/packet_stream.rb'
673
+ - 'lib/net/ssh/transport/session.rb'
674
+
675
+ # Offense count: 5
676
+ Style/MultipleComparison:
607
677
  Exclude:
678
+ - 'lib/net/ssh/authentication/agent.rb'
608
679
  - 'lib/net/ssh/authentication/pageant.rb'
609
680
  - 'lib/net/ssh/known_hosts.rb'
610
- - 'lib/net/ssh/proxy/https.rb'
611
- - 'lib/net/ssh/transport/algorithms.rb'
612
- - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb'
613
- - 'lib/net/ssh/transport/state.rb'
614
- - 'lib/net/ssh/verifiers/always.rb'
615
- - 'test/authentication/methods/test_hostbased.rb'
616
- - 'test/authentication/methods/test_publickey.rb'
681
+ - 'lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb'
617
682
 
618
- # Offense count: 40
683
+ # Offense count: 41
619
684
  # Cop supports --auto-correct.
685
+ # Configuration parameters: EnforcedStyle.
686
+ # SupportedStyles: literals, strict
620
687
  Style/MutableConstant:
621
688
  Enabled: false
622
689
 
623
690
  # Offense count: 13
624
691
  # Cop supports --auto-correct.
692
+ # Configuration parameters: EnforcedStyle.
693
+ # SupportedStyles: both, prefix, postfix
625
694
  Style/NegatedIf:
626
695
  Exclude:
627
696
  - 'lib/net/ssh.rb'
@@ -640,21 +709,21 @@ Style/NegatedWhile:
640
709
  Exclude:
641
710
  - 'lib/net/ssh/config.rb'
642
711
 
643
- # Offense count: 2
712
+ # Offense count: 1
644
713
  # Cop supports --auto-correct.
645
- # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
714
+ # Configuration parameters: EnforcedStyle, MinBodyLength.
646
715
  # SupportedStyles: skip_modifier_ifs, always
647
716
  Style/Next:
648
717
  Exclude:
649
718
  - 'lib/net/ssh/authentication/key_manager.rb'
650
- - 'lib/net/ssh/transport/algorithms.rb'
651
719
 
652
- # Offense count: 2
720
+ # Offense count: 1
653
721
  # Cop supports --auto-correct.
722
+ # Configuration parameters: EnforcedStyle.
723
+ # SupportedStyles: predicate, comparison
654
724
  Style/NilComparison:
655
725
  Exclude:
656
726
  - 'lib/net/ssh/proxy/command.rb'
657
- - 'lib/net/ssh/transport/openssl.rb'
658
727
 
659
728
  # Offense count: 3
660
729
  # Cop supports --auto-correct.
@@ -662,26 +731,18 @@ Style/Not:
662
731
  Exclude:
663
732
  - 'lib/net/ssh/connection/channel.rb'
664
733
 
665
- # Offense count: 7
734
+ # Offense count: 8
666
735
  # Cop supports --auto-correct.
736
+ # Configuration parameters: Strict.
667
737
  Style/NumericLiterals:
668
738
  MinDigits: 310
669
739
 
670
- # Offense count: 11
740
+ # Offense count: 29
671
741
  # Cop supports --auto-correct.
672
- # Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
742
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
673
743
  # SupportedStyles: predicate, comparison
674
744
  Style/NumericPredicate:
675
- Exclude:
676
- - 'spec/**/*'
677
- - 'lib/net/ssh/authentication/methods/password.rb'
678
- - 'lib/net/ssh/authentication/pageant.rb'
679
- - 'lib/net/ssh/buffer.rb'
680
- - 'lib/net/ssh/service/forward.rb'
681
- - 'lib/net/ssh/test/extensions.rb'
682
- - 'lib/net/ssh/transport/key_expander.rb'
683
- - 'test/transport/test_packet_stream.rb'
684
- - 'test_connection_close_shall_close_cannels.rb'
745
+ Enabled: false
685
746
 
686
747
  # Offense count: 15
687
748
  # Cop supports --auto-correct.
@@ -697,27 +758,25 @@ Style/ParallelAssignment:
697
758
  - 'test/common.rb'
698
759
  - 'test/connection/test_channel.rb'
699
760
 
700
- # Offense count: 7
761
+ # Offense count: 5
701
762
  # Cop supports --auto-correct.
702
- # Configuration parameters: AllowSafeAssignment.
763
+ # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
703
764
  Style/ParenthesesAroundCondition:
704
765
  Exclude:
705
766
  - 'lib/net/ssh/authentication/ed25519.rb'
706
767
  - 'lib/net/ssh/service/forward.rb'
707
- - 'lib/net/ssh/transport/cipher_factory.rb'
708
768
  - 'lib/net/ssh/transport/ctr.rb'
709
769
  - 'test/integration/test_proxy.rb'
710
770
 
711
- # Offense count: 5
771
+ # Offense count: 33
712
772
  # Cop supports --auto-correct.
713
773
  # Configuration parameters: PreferredDelimiters.
714
774
  Style/PercentLiteralDelimiters:
715
775
  Exclude:
716
- - 'Rakefile'
717
776
  - 'net-ssh.gemspec'
718
777
  - 'test/test_config.rb'
719
778
 
720
- # Offense count: 16
779
+ # Offense count: 15
721
780
  # Cop supports --auto-correct.
722
781
  Style/PerlBackrefs:
723
782
  Exclude:
@@ -726,7 +785,6 @@ Style/PerlBackrefs:
726
785
  - 'lib/net/ssh/key_factory.rb'
727
786
  - 'lib/net/ssh/proxy/command.rb'
728
787
  - 'lib/net/ssh/proxy/socks5.rb'
729
- - 'lib/net/ssh/transport/openssl.rb'
730
788
  - 'test/integration/common.rb'
731
789
 
732
790
  # Offense count: 14
@@ -744,7 +802,7 @@ Style/Proc:
744
802
 
745
803
  # Offense count: 7
746
804
  # Cop supports --auto-correct.
747
- # Configuration parameters: EnforcedStyle, SupportedStyles.
805
+ # Configuration parameters: EnforcedStyle.
748
806
  # SupportedStyles: compact, exploded
749
807
  Style/RaiseArgs:
750
808
  Exclude:
@@ -764,36 +822,53 @@ Style/RedundantParentheses:
764
822
  Exclude:
765
823
  - 'support/arcfour_check.rb'
766
824
 
767
- # Offense count: 57
825
+ # Offense count: 59
768
826
  # Cop supports --auto-correct.
769
827
  # Configuration parameters: AllowMultipleReturnValues.
770
828
  Style/RedundantReturn:
771
829
  Enabled: false
772
830
 
773
- # Offense count: 11
831
+ # Offense count: 14
774
832
  # Cop supports --auto-correct.
775
833
  Style/RedundantSelf:
776
834
  Exclude:
777
- - 'lib/net/ssh/authentication/ed25519.rb'
778
835
  - 'lib/net/ssh/connection/channel.rb'
779
836
  - 'lib/net/ssh/test/extensions.rb'
780
- - 'lib/net/ssh/transport/openssl.rb'
781
837
  - 'test/authentication/test_ed25519.rb'
782
838
 
783
- # Offense count: 4
839
+ # Offense count: 6
784
840
  # Cop supports --auto-correct.
785
841
  Style/RescueModifier:
786
842
  Exclude:
787
843
  - 'lib/net/ssh/service/forward.rb'
788
844
  - 'lib/net/ssh/transport/algorithms.rb'
789
845
 
790
- # Offense count: 1
846
+ # Offense count: 25
847
+ # Cop supports --auto-correct.
848
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
849
+ # Whitelist: present?, blank?, presence, try, try!
850
+ Style/SafeNavigation:
851
+ Exclude:
852
+ - 'lib/net/ssh/authentication/key_manager.rb'
853
+ - 'lib/net/ssh/authentication/methods/keyboard_interactive.rb'
854
+ - 'lib/net/ssh/authentication/methods/password.rb'
855
+ - 'lib/net/ssh/authentication/session.rb'
856
+ - 'lib/net/ssh/connection/channel.rb'
857
+ - 'lib/net/ssh/connection/event_loop.rb'
858
+ - 'lib/net/ssh/connection/session.rb'
859
+ - 'lib/net/ssh/key_factory.rb'
860
+ - 'lib/net/ssh/loggable.rb'
861
+ - 'lib/net/ssh/test/local_packet.rb'
862
+ - 'lib/net/ssh/transport/algorithms.rb'
863
+ - 'lib/net/ssh/transport/packet_stream.rb'
864
+
865
+ # Offense count: 2
791
866
  # Cop supports --auto-correct.
792
867
  Style/SelfAssignment:
793
868
  Exclude:
794
869
  - 'lib/net/ssh/config.rb'
795
870
 
796
- # Offense count: 8
871
+ # Offense count: 7
797
872
  # Cop supports --auto-correct.
798
873
  # Configuration parameters: AllowAsExpressionSeparator.
799
874
  Style/Semicolon:
@@ -801,11 +876,10 @@ Style/Semicolon:
801
876
  - 'lib/net/ssh/buffer.rb'
802
877
  - 'test/connection/test_channel.rb'
803
878
  - 'test/connection/test_session.rb'
804
- - 'test/transport/kex/test_ecdh_sha2_nistp256.rb'
805
879
 
806
880
  # Offense count: 2
807
881
  # Cop supports --auto-correct.
808
- # Configuration parameters: EnforcedStyle, SupportedStyles.
882
+ # Configuration parameters: EnforcedStyle.
809
883
  # SupportedStyles: only_raise, only_fail, semantic
810
884
  Style/SignalException:
811
885
  Exclude:
@@ -819,51 +893,9 @@ Style/SingleLineMethods:
819
893
  Exclude:
820
894
  - 'lib/net/ssh/buffered_io.rb'
821
895
 
822
- # Offense count: 16
823
- # Cop supports --auto-correct.
824
- Layout/SpaceAfterColon:
825
- Exclude:
826
- - 'lib/net/ssh/authentication/ed25519.rb'
827
- - 'test/integration/test_ed25519_pkeys.rb'
828
- - 'test/verifiers/test_always.rb'
829
-
830
- # Offense count: 254
831
- # Cop supports --auto-correct.
832
- Layout/SpaceAfterComma:
833
- Enabled: false
834
-
835
- # Offense count: 132
836
- # Cop supports --auto-correct.
837
- # Configuration parameters: EnforcedStyle, SupportedStyles.
838
- # SupportedStyles: space, no_space
839
- Layout/SpaceAroundEqualsInParameterDefault:
840
- Enabled: false
841
-
842
- # Offense count: 3
843
- # Cop supports --auto-correct.
844
- # Configuration parameters: AllowForAlignment.
845
- Layout/SpaceBeforeFirstArg:
846
- Exclude:
847
- - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
848
- - 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
849
- - 'test/authentication/test_key_manager.rb'
850
-
851
- # Offense count: 10
852
- # Cop supports --auto-correct.
853
- # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
854
- # SupportedStyles: space, no_space
855
- Layout/SpaceInsideBlockBraces:
856
- Exclude:
857
- - 'lib/net/ssh/authentication/session.rb'
858
- - 'lib/net/ssh/transport/ctr.rb'
859
- - 'support/ssh_tunnel_bug.rb'
860
- - 'test/authentication/test_agent.rb'
861
- - 'test/authentication/test_key_manager.rb'
862
- - 'test/start/test_user_nil.rb'
863
-
864
- # Offense count: 22
896
+ # Offense count: 18
865
897
  # Cop supports --auto-correct.
866
- # Configuration parameters: EnforcedStyle, SupportedStyles.
898
+ # Configuration parameters: EnforcedStyle.
867
899
  # SupportedStyles: use_perl_names, use_english_names
868
900
  Style/SpecialGlobalVars:
869
901
  Exclude:
@@ -874,12 +906,10 @@ Style/SpecialGlobalVars:
874
906
  - 'test/integration/test_forward.rb'
875
907
  - 'test/manual/test_pageant.rb'
876
908
  - 'test/test_all.rb'
877
- - 'test_connection_close_shall_close_cannels.rb'
878
- - 'test_kerberos_client2.rb'
879
909
 
880
- # Offense count: 1846
910
+ # Offense count: 1754
881
911
  # Cop supports --auto-correct.
882
- # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
912
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
883
913
  # SupportedStyles: single_quotes, double_quotes
884
914
  Style/StringLiterals:
885
915
  Enabled: false
@@ -898,36 +928,11 @@ Style/SymbolProc:
898
928
  - 'test/integration/test_forward.rb'
899
929
  - 'test/test/test_test.rb'
900
930
 
901
- # Offense count: 39
902
- # Cop supports --auto-correct.
903
- # Configuration parameters: EnforcedStyle, SupportedStyles.
904
- # SupportedStyles: final_newline, final_blank_line
905
- Layout/TrailingBlankLines:
906
- Enabled: false
907
-
908
- # Offense count: 66
909
- # Cop supports --auto-correct.
910
- Layout/TrailingWhitespace:
911
- Enabled: false
912
-
913
931
  # Offense count: 1
914
932
  # Cop supports --auto-correct.
915
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
916
- # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
917
- Style/TrivialAccessors:
933
+ Style/UnneededCondition:
918
934
  Exclude:
919
- - 'test/transport/kex/test_diffie_hellman_group1_sha1.rb'
920
-
921
- # Offense count: 6
922
- # Cop supports --auto-correct.
923
- Style/UnlessElse:
924
- Exclude:
925
- - 'lib/net/ssh/buffer.rb'
926
- - 'lib/net/ssh/transport/ctr.rb'
927
- - 'test/transport/kex/test_ecdh_sha2_nistp256.rb'
928
- - 'test/transport/kex/test_ecdh_sha2_nistp384.rb'
929
- - 'test/transport/kex/test_ecdh_sha2_nistp521.rb'
930
- - 'test/transport/test_server_version.rb'
935
+ - 'lib/net/ssh/proxy/command.rb'
931
936
 
932
937
  # Offense count: 4
933
938
  # Cop supports --auto-correct.
@@ -937,7 +942,7 @@ Style/UnneededInterpolation:
937
942
  - 'lib/net/ssh/transport/session.rb'
938
943
  - 'test/integration/test_forward.rb'
939
944
 
940
- # Offense count: 4
945
+ # Offense count: 15
941
946
  # Cop supports --auto-correct.
942
947
  Style/UnneededPercentQ:
943
948
  Exclude:
@@ -953,17 +958,22 @@ Style/WhileUntilDo:
953
958
 
954
959
  # Offense count: 3
955
960
  # Cop supports --auto-correct.
956
- # Configuration parameters: SupportedStyles, WordRegex.
961
+ # Configuration parameters: WordRegex.
957
962
  # SupportedStyles: percent, brackets
958
963
  Style/WordArray:
959
964
  EnforcedStyle: percent
960
965
  MinSize: 3
961
966
 
962
- # Offense count: 7
967
+ # Offense count: 4
963
968
  # Cop supports --auto-correct.
964
969
  Style/ZeroLengthPredicate:
965
970
  Exclude:
966
971
  - 'lib/net/ssh/buffered_io.rb'
967
972
  - 'lib/net/ssh/connection/channel.rb'
968
- - 'test/integration/test_forward.rb'
969
- - 'test_connection_close_shall_close_cannels.rb'
973
+
974
+ # Offense count: 1636
975
+ # Cop supports --auto-correct.
976
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
977
+ # URISchemes: http, https
978
+ Metrics/LineLength:
979
+ Max: 932