net-ssh 5.2.0 → 6.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.
Files changed (69) hide show
  1. checksums.yaml +5 -5
  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 +392 -379
  7. data/.travis.yml +16 -17
  8. data/CHANGES.txt +11 -0
  9. data/Manifest +0 -1
  10. data/README.md +286 -0
  11. data/Rakefile +1 -2
  12. data/appveyor.yml +4 -2
  13. data/lib/net/ssh.rb +7 -2
  14. data/lib/net/ssh/authentication/certificate.rb +10 -1
  15. data/lib/net/ssh/authentication/ed25519.rb +2 -1
  16. data/lib/net/ssh/authentication/ed25519_loader.rb +1 -1
  17. data/lib/net/ssh/authentication/key_manager.rb +34 -5
  18. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +3 -1
  19. data/lib/net/ssh/authentication/pub_key_fingerprint.rb +0 -1
  20. data/lib/net/ssh/authentication/session.rb +9 -6
  21. data/lib/net/ssh/buffer.rb +1 -10
  22. data/lib/net/ssh/buffered_io.rb +0 -1
  23. data/lib/net/ssh/config.rb +51 -32
  24. data/lib/net/ssh/connection/channel.rb +17 -5
  25. data/lib/net/ssh/connection/event_loop.rb +0 -1
  26. data/lib/net/ssh/connection/session.rb +7 -4
  27. data/lib/net/ssh/key_factory.rb +6 -8
  28. data/lib/net/ssh/known_hosts.rb +27 -29
  29. data/lib/net/ssh/loggable.rb +2 -2
  30. data/lib/net/ssh/proxy/command.rb +0 -1
  31. data/lib/net/ssh/proxy/socks5.rb +0 -1
  32. data/lib/net/ssh/service/forward.rb +2 -1
  33. data/lib/net/ssh/test.rb +3 -2
  34. data/lib/net/ssh/transport/algorithms.rb +67 -42
  35. data/lib/net/ssh/transport/cipher_factory.rb +11 -27
  36. data/lib/net/ssh/transport/constants.rb +10 -6
  37. data/lib/net/ssh/transport/ctr.rb +1 -7
  38. data/lib/net/ssh/transport/hmac.rb +15 -13
  39. data/lib/net/ssh/transport/hmac/abstract.rb +16 -0
  40. data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
  41. data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
  42. data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
  43. data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
  44. data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
  45. data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
  46. data/lib/net/ssh/transport/kex.rb +14 -11
  47. data/lib/net/ssh/transport/kex/abstract.rb +123 -0
  48. data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
  49. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +38 -0
  50. data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
  51. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +1 -15
  52. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +9 -118
  53. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +0 -6
  54. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
  55. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +18 -79
  56. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +5 -4
  57. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +5 -4
  58. data/lib/net/ssh/transport/openssl.rb +104 -107
  59. data/lib/net/ssh/transport/packet_stream.rb +44 -11
  60. data/lib/net/ssh/transport/state.rb +1 -1
  61. data/lib/net/ssh/version.rb +2 -2
  62. data/net-ssh-public_cert.pem +8 -8
  63. data/net-ssh.gemspec +9 -7
  64. metadata +46 -29
  65. metadata.gz.sig +2 -3
  66. data/Gemfile.noed25519.lock +0 -41
  67. data/README.rdoc +0 -194
  68. data/lib/net/ssh/ruby_compat.rb +0 -13
  69. data/support/arcfour_check.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2bb9cafa5bb69001f6ac6c303a18369ea759d93a
4
- data.tar.gz: d2cb338177e2ce3abc7755c4b5e3f163048a56e0
2
+ SHA256:
3
+ metadata.gz: 963b93f32673d9b553ebc06129b1882e11c4462ab271625cc086e5a6bb8094d5
4
+ data.tar.gz: 289abcb23e1e051acd2be9e96818d7044baaea9df09098fdeaef4db58e18a430
5
5
  SHA512:
6
- metadata.gz: 4c3a4b65a0ac623b3567d04d79f50cf081286dd4aa74ea0f97fae2edb1f3c70bb470b9511c18530c241e5ad4956828df434f12d29655e11e8f934992aeb0d13e
7
- data.tar.gz: c69a452a092f2f3077db5b7c6249e20b143fe9161f53b078f99375e45f815b04d716cf4bee53447ba28189126cc889db423891f4fb1e3d1a5f965f5bdc484c7f
6
+ metadata.gz: 463991f4ec08d77186bfb197d65ab9359241cc82287ec4ee166176662683b3b6bf451dfa49bada27096769c953ce39d594dc6ae23d0c3b9645708ce5bf4a58f0
7
+ data.tar.gz: f1d75930f1337e95992049d5c302a9c6a95084a2c61f8feb9fff4aec48f17eb5ceb02eb48cb4458d09047d9d216f39ac78825ce7bc222eb9a0dd665d6f3e85b2
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,183 @@ 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
277
+ Exclude:
278
+ - 'lib/net/ssh/config.rb'
225
279
 
226
- # Offense count: 164
227
- # Configuration parameters: CountComments.
280
+ # Offense count: 211
281
+ # Configuration parameters: CountComments, ExcludedMethods.
228
282
  Metrics/MethodLength:
229
- Max: 93
283
+ Max: 82
230
284
 
231
- # Offense count: 1
285
+ # Offense count: 2
232
286
  # Configuration parameters: CountComments.
233
287
  Metrics/ModuleLength:
234
- Max: 142
288
+ Max: 160
235
289
 
236
290
  # Offense count: 1
237
291
  # Configuration parameters: CountKeywordArgs.
238
292
  Metrics/ParameterLists:
239
293
  Max: 6
240
294
 
241
- # Offense count: 27
295
+ # Offense count: 30
242
296
  Metrics/PerceivedComplexity:
243
- Max: 23
297
+ Max: 20
244
298
 
245
- # Offense count: 3
246
- # Cop supports --auto-correct.
247
- Performance/RangeInclude:
299
+ # Offense count: 9
300
+ Naming/AccessorMethodName:
248
301
  Exclude:
249
- - 'lib/net/ssh/transport/algorithms.rb'
302
+ - 'lib/net/ssh/authentication/methods/password.rb'
303
+ - 'lib/net/ssh/authentication/pageant.rb'
304
+ - 'lib/net/ssh/connection/channel.rb'
305
+ - 'lib/net/ssh/connection/session.rb'
306
+ - 'lib/net/ssh/transport/kex/abstract5656.rb'
307
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
308
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
250
309
 
251
- # Offense count: 3
252
- # Cop supports --auto-correct.
253
- Performance/RedundantBlockCall:
310
+ # Offense count: 2
311
+ Naming/BinaryOperatorParameterName:
254
312
  Exclude:
255
- - 'lib/net/ssh/connection/session.rb'
313
+ - 'lib/net/ssh/buffer.rb'
314
+ - 'lib/net/ssh/version.rb'
315
+
316
+ # Offense count: 12
317
+ Naming/ClassAndModuleCamelCase:
318
+ Exclude:
319
+ - 'lib/net/ssh/transport/hmac/md5_96.rb'
320
+ - 'lib/net/ssh/transport/hmac/sha1_96.rb'
321
+ - 'lib/net/ssh/transport/hmac/sha2_256.rb'
322
+ - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
323
+ - 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
324
+ - 'lib/net/ssh/transport/hmac/sha2_512.rb'
325
+ - 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
326
+ - 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
327
+ - 'test/transport/hmac/test_md5_96.rb'
328
+ - 'test/transport/hmac/test_sha1_96.rb'
329
+ - 'test/transport/hmac/test_sha2_256.rb'
330
+ - 'test/transport/hmac/test_sha2_256_96.rb'
331
+ - 'test/transport/hmac/test_sha2_256_etm.rb'
332
+ - 'test/transport/hmac/test_sha2_512.rb'
333
+ - 'test/transport/hmac/test_sha2_512_96.rb'
334
+ - 'test/transport/hmac/test_sha2_512_etm.rb'
335
+
336
+ # Offense count: 4
337
+ Naming/ConstantName:
338
+ Exclude:
339
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
340
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
341
+ - 'lib/net/ssh/transport/openssl.rb'
342
+
343
+ # Offense count: 11
344
+ # Configuration parameters: Blacklist.
345
+ # Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
346
+ Naming/HeredocDelimiterNaming:
347
+ Exclude:
348
+ - 'test/authentication/test_agent.rb'
349
+ - 'test/authentication/test_certificate.rb'
350
+ - 'test/authentication/test_ed25519.rb'
351
+ - 'test/authentication/test_session.rb'
352
+ - 'test/integration/test_agent.rb'
353
+ - 'test/test_key_factory.rb'
354
+
355
+ # Offense count: 4
356
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
357
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
358
+ Naming/MemoizedInstanceVariableName:
359
+ Exclude:
360
+ - 'lib/net/ssh/transport/openssl.rb'
361
+ - 'test/authentication/test_key_manager.rb'
362
+
363
+ # Offense count: 32
364
+ # Configuration parameters: EnforcedStyle.
365
+ # SupportedStyles: snake_case, camelCase
366
+ Naming/MethodName:
367
+ Exclude:
368
+ - 'lib/net/ssh/authentication/ed25519_loader.rb'
369
+ - 'lib/net/ssh/transport/kex/curve25519_sha256_loader.rb'
370
+ - 'test/authentication/test_agent.rb'
371
+ - 'test/authentication/test_session.rb'
372
+ - 'test/common.rb'
256
373
  - 'test/connection/test_channel.rb'
374
+ - 'test/test_config.rb'
375
+ - 'test/test_key_factory.rb'
257
376
 
258
- # Offense count: 6
377
+ # Offense count: 4
259
378
  # Cop supports --auto-correct.
260
- Performance/RedundantMatch:
379
+ # Configuration parameters: PreferredName.
380
+ Naming/RescuedExceptionsVariableName:
261
381
  Exclude:
262
- - 'lib/net/ssh/key_factory.rb'
263
- - 'lib/net/ssh/transport/server_version.rb'
382
+ - 'lib/net/ssh/connection/session.rb'
383
+ - 'lib/net/ssh/service/forward.rb'
384
+ - 'lib/net/ssh/verifiers/accept_new.rb'
264
385
 
265
- # Offense count: 13
266
- Naming/AccessorMethodName:
386
+ # Offense count: 23
387
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
388
+ # AllowedNames: io, id, to, by, on, in, at, ip, db
389
+ Naming/UncommunicativeMethodParamName:
267
390
  Exclude:
268
- - 'lib/net/ssh/authentication/methods/password.rb'
391
+ - 'lib/net/ssh/authentication/certificate.rb'
392
+ - 'lib/net/ssh/authentication/ed25519.rb'
393
+ - 'lib/net/ssh/authentication/key_manager.rb'
269
394
  - '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'
395
+ - 'lib/net/ssh/buffer.rb'
396
+ - 'lib/net/ssh/buffered_io.rb'
397
+ - 'lib/net/ssh/ruby_compat.rb'
398
+ - 'lib/net/ssh/test/socket.rb'
399
+ - 'lib/net/ssh/transport/ctr.rb'
400
+ - 'lib/net/ssh/transport/hmac/abstract.rb'
401
+ - 'lib/net/ssh/transport/identity_cipher.rb'
402
+ - 'test/connection/test_session.rb'
403
+
404
+ # Offense count: 8
405
+ # Configuration parameters: EnforcedStyle.
406
+ # SupportedStyles: inline, group
407
+ Style/AccessModifierDeclarations:
408
+ Exclude:
409
+ - 'lib/net/ssh/authentication/pageant.rb'
410
+ - 'lib/net/ssh/transport/openssl.rb'
411
+ - 'test/test_key_factory.rb'
275
412
 
276
413
  # Offense count: 2
277
414
  # Cop supports --auto-correct.
278
- # Configuration parameters: EnforcedStyle, SupportedStyles.
415
+ # Configuration parameters: EnforcedStyle.
279
416
  # SupportedStyles: prefer_alias, prefer_alias_method
280
417
  Style/Alias:
281
418
  Exclude:
282
419
  - 'lib/net/ssh/connection/session.rb'
283
420
  - 'lib/net/ssh/service/forward.rb'
284
421
 
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
422
+ # Offense count: 31
293
423
  # Cop supports --auto-correct.
294
- # Configuration parameters: EnforcedStyle, SupportedStyles.
424
+ # Configuration parameters: EnforcedStyle.
295
425
  # SupportedStyles: always, conditionals
296
426
  Style/AndOr:
297
427
  Exclude:
298
428
  - 'lib/net/ssh/authentication/key_manager.rb'
299
429
  - 'lib/net/ssh/buffer.rb'
300
430
  - 'lib/net/ssh/buffered_io.rb'
301
- - 'lib/net/ssh/config.rb'
302
431
  - 'lib/net/ssh/connection/channel.rb'
303
432
  - 'lib/net/ssh/connection/session.rb'
304
433
  - 'lib/net/ssh/key_factory.rb'
@@ -308,19 +437,19 @@ Style/AndOr:
308
437
  - 'lib/net/ssh/transport/cipher_factory.rb'
309
438
  - 'lib/net/ssh/transport/hmac.rb'
310
439
  - 'lib/net/ssh/transport/key_expander.rb'
311
- - 'lib/net/ssh/transport/packet_stream.rb'
312
440
  - 'test/common.rb'
313
441
 
314
442
  # Offense count: 2
443
+ # Configuration parameters: AllowedChars.
315
444
  Style/AsciiComments:
316
445
  Exclude:
317
446
  - 'lib/net/ssh/authentication/pageant.rb'
318
447
  - 'lib/net/ssh/buffered_io.rb'
319
448
 
320
- # Offense count: 11
449
+ # Offense count: 8
321
450
  # Cop supports --auto-correct.
322
- # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
323
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
451
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
452
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
324
453
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
325
454
  # FunctionalMethods: let, let!, subject, watch
326
455
  # IgnoredMethods: lambda, proc, it
@@ -332,12 +461,11 @@ Style/BlockDelimiters:
332
461
  - 'lib/net/ssh/connection/keepalive.rb'
333
462
  - 'lib/net/ssh/proxy/command.rb'
334
463
  - 'lib/net/ssh/transport/ctr.rb'
335
- - 'test/test_buffer.rb'
336
464
  - 'test/verifiers/test_always.rb'
337
465
 
338
- # Offense count: 8
466
+ # Offense count: 7
339
467
  # Cop supports --auto-correct.
340
- # Configuration parameters: EnforcedStyle, SupportedStyles.
468
+ # Configuration parameters: EnforcedStyle.
341
469
  # SupportedStyles: braces, no_braces, context_dependent
342
470
  Style/BracesAroundHashParameters:
343
471
  Exclude:
@@ -346,7 +474,6 @@ Style/BracesAroundHashParameters:
346
474
  - 'test/integration/test_id_rsa_keys.rb'
347
475
  - 'test/transport/test_hmac.rb'
348
476
  - 'test/transport/test_session.rb'
349
- - 'test_kerberos_client2.rb'
350
477
 
351
478
  # Offense count: 2
352
479
  Style/CaseEquality:
@@ -360,35 +487,29 @@ Style/CharacterLiteral:
360
487
  Exclude:
361
488
  - 'test/test_buffer.rb'
362
489
 
363
- # Offense count: 12
364
- Naming/ClassAndModuleCamelCase:
490
+ # Offense count: 15
491
+ # Cop supports --auto-correct.
492
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
493
+ # SupportedStyles: nested, compact
494
+ Style/ClassAndModuleChildren:
365
495
  Exclude:
496
+ - 'lib/net/ssh/transport/ctr.rb'
497
+ - 'lib/net/ssh/transport/hmac.rb'
498
+ - 'lib/net/ssh/transport/hmac/md5.rb'
366
499
  - 'lib/net/ssh/transport/hmac/md5_96.rb'
500
+ - 'lib/net/ssh/transport/hmac/none.rb'
501
+ - 'lib/net/ssh/transport/hmac/ripemd160.rb'
502
+ - 'lib/net/ssh/transport/hmac/sha1.rb'
367
503
  - 'lib/net/ssh/transport/hmac/sha1_96.rb'
368
504
  - 'lib/net/ssh/transport/hmac/sha2_256.rb'
369
505
  - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
506
+ - 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
370
507
  - 'lib/net/ssh/transport/hmac/sha2_512.rb'
371
508
  - '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'
509
+ - 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
510
+ - 'lib/net/ssh/transport/kex.rb'
511
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
512
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb'
392
513
 
393
514
  # Offense count: 7
394
515
  Style/ClassVars:
@@ -415,27 +536,23 @@ Style/CommentAnnotation:
415
536
  - 'lib/net/ssh/buffer.rb'
416
537
  - 'lib/net/ssh/config.rb'
417
538
 
418
- # Offense count: 4
539
+ # Offense count: 3
540
+ Style/CommentedKeyword:
541
+ Exclude:
542
+ - 'test/connection/test_session.rb'
543
+ - 'test/integration/test_forward.rb'
544
+
545
+ # Offense count: 7
419
546
  # Cop supports --auto-correct.
420
- # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
547
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
421
548
  # SupportedStyles: assign_to_condition, assign_inside_condition
422
549
  Style/ConditionalAssignment:
423
550
  Exclude:
424
- - 'lib/net/ssh/transport/ctr.rb'
425
- - 'lib/net/ssh/transport/state.rb'
426
- - 'test/test_key_factory.rb'
427
551
  - 'lib/net/ssh/config.rb'
428
- - 'lib/net/ssh/known_hosts.rb'
429
552
  - 'lib/net/ssh/proxy/socks5.rb'
430
553
  - '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'
554
+ - 'lib/net/ssh/transport/state.rb'
555
+ - 'test/test_key_factory.rb'
439
556
 
440
557
  # Offense count: 1
441
558
  # Cop supports --auto-correct.
@@ -443,7 +560,7 @@ Style/DefWithParentheses:
443
560
  Exclude:
444
561
  - 'test/integration/test_forward.rb'
445
562
 
446
- # Offense count: 16
563
+ # Offense count: 14
447
564
  Style/Documentation:
448
565
  Exclude:
449
566
  - 'spec/**/*'
@@ -453,27 +570,15 @@ Style/Documentation:
453
570
  - 'lib/net/ssh/connection/session.rb'
454
571
  - 'lib/net/ssh/ruby_compat.rb'
455
572
  - '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
573
  - 'lib/net/ssh/transport/kex.rb'
460
- - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb'
461
574
  - 'lib/net/ssh/transport/key_expander.rb'
462
575
  - 'lib/net/ssh/transport/openssl.rb'
463
576
 
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
577
+ # Offense count: 1
472
578
  # Cop supports --auto-correct.
473
579
  Style/EmptyLiteral:
474
580
  Exclude:
475
581
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
476
- - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb'
477
582
 
478
583
  # Offense count: 1
479
584
  # Cop supports --auto-correct.
@@ -482,26 +587,41 @@ Style/EvenOdd:
482
587
  - 'lib/net/ssh/buffer.rb'
483
588
 
484
589
  # Offense count: 2
485
- # Configuration parameters: EnforcedStyle, SupportedStyles.
590
+ # Cop supports --auto-correct.
591
+ # Configuration parameters: EnforcedStyle.
486
592
  # SupportedStyles: format, sprintf, percent
487
593
  Style/FormatString:
488
594
  Exclude:
489
595
  - 'lib/net/ssh/authentication/pageant.rb'
490
596
  - 'lib/net/ssh/loggable.rb'
491
597
 
492
- # Offense count: 35
598
+ # Offense count: 1
599
+ # Configuration parameters: EnforcedStyle.
600
+ # SupportedStyles: annotated, template, unannotated
601
+ Style/FormatStringToken:
602
+ Exclude:
603
+ - 'lib/net/ssh/loggable.rb'
604
+
605
+ # Offense count: 166
606
+ # Cop supports --auto-correct.
607
+ # Configuration parameters: EnforcedStyle.
608
+ # SupportedStyles: always, never
609
+ Style/FrozenStringLiteralComment:
610
+ Enabled: false
611
+
612
+ # Offense count: 34
493
613
  # Configuration parameters: MinBodyLength.
494
614
  Style/GuardClause:
495
615
  Enabled: false
496
616
 
497
617
  # Offense count: 1
618
+ # Configuration parameters: AllowIfModifier.
498
619
  Style/IfInsideElse:
499
620
  Exclude:
500
621
  - 'lib/net/ssh/connection/session.rb'
501
622
 
502
- # Offense count: 9
623
+ # Offense count: 16
503
624
  # Cop supports --auto-correct.
504
- # Configuration parameters: MaxLineLength.
505
625
  Style/IfUnlessModifier:
506
626
  Exclude:
507
627
  - 'lib/net/ssh.rb'
@@ -509,43 +629,18 @@ Style/IfUnlessModifier:
509
629
  - 'lib/net/ssh/proxy/command.rb'
510
630
  - 'lib/net/ssh/service/forward.rb'
511
631
  - 'lib/net/ssh/transport/ctr.rb'
632
+ - 'lib/net/ssh/transport/kex.rb'
633
+ - 'lib/net/ssh/transport/kex/abstract5656.rb'
512
634
  - 'lib/net/ssh/transport/key_expander.rb'
513
635
  - 'test/integration/test_proxy.rb'
514
636
  - 'test/test_key_factory.rb'
515
637
 
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
638
  # Offense count: 1
535
639
  # Cop supports --auto-correct.
536
640
  Style/InfiniteLoop:
537
641
  Exclude:
538
642
  - 'lib/net/ssh/authentication/pageant.rb'
539
643
 
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
644
  # Offense count: 27
550
645
  # Cop supports --auto-correct.
551
646
  Style/LineEndConcatenation:
@@ -553,44 +648,17 @@ Style/LineEndConcatenation:
553
648
  - 'lib/net/ssh/authentication/pageant.rb'
554
649
  - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
555
650
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
556
- - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb'
557
651
  - 'lib/net/ssh/verifiers/always.rb'
558
652
 
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
653
  # Offense count: 1
578
- Style/MethodMissing:
654
+ Style/MethodMissingSuper:
579
655
  Exclude:
580
656
  - 'lib/net/ssh/connection/session.rb'
581
657
 
582
- # Offense count: 24
583
- # Configuration parameters: EnforcedStyle, SupportedStyles.
584
- # SupportedStyles: snake_case, camelCase
585
- Naming/MethodName:
658
+ # Offense count: 1
659
+ Style/MissingRespondToMissing:
586
660
  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'
661
+ - 'lib/net/ssh/connection/session.rb'
594
662
 
595
663
  # Offense count: 3
596
664
  # Cop supports --auto-correct.
@@ -599,29 +667,33 @@ Style/MultilineIfThen:
599
667
  - 'lib/net/ssh/buffered_io.rb'
600
668
  - 'lib/net/ssh/service/forward.rb'
601
669
 
602
- # Offense count: 23
670
+ # Offense count: 6
603
671
  # Cop supports --auto-correct.
604
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
605
- # SupportedStyles: aligned, indented
606
- Layout/MultilineOperationIndentation:
672
+ Style/MultilineWhenThen:
673
+ Exclude:
674
+ - 'lib/net/ssh/test/packet.rb'
675
+ - 'lib/net/ssh/transport/packet_stream.rb'
676
+ - 'lib/net/ssh/transport/session.rb'
677
+
678
+ # Offense count: 5
679
+ Style/MultipleComparison:
607
680
  Exclude:
681
+ - 'lib/net/ssh/authentication/agent.rb'
608
682
  - 'lib/net/ssh/authentication/pageant.rb'
609
683
  - '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'
684
+ - 'lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb'
617
685
 
618
- # Offense count: 40
686
+ # Offense count: 41
619
687
  # Cop supports --auto-correct.
688
+ # Configuration parameters: EnforcedStyle.
689
+ # SupportedStyles: literals, strict
620
690
  Style/MutableConstant:
621
691
  Enabled: false
622
692
 
623
693
  # Offense count: 13
624
694
  # Cop supports --auto-correct.
695
+ # Configuration parameters: EnforcedStyle.
696
+ # SupportedStyles: both, prefix, postfix
625
697
  Style/NegatedIf:
626
698
  Exclude:
627
699
  - 'lib/net/ssh.rb'
@@ -640,21 +712,21 @@ Style/NegatedWhile:
640
712
  Exclude:
641
713
  - 'lib/net/ssh/config.rb'
642
714
 
643
- # Offense count: 2
715
+ # Offense count: 1
644
716
  # Cop supports --auto-correct.
645
- # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
717
+ # Configuration parameters: EnforcedStyle, MinBodyLength.
646
718
  # SupportedStyles: skip_modifier_ifs, always
647
719
  Style/Next:
648
720
  Exclude:
649
721
  - 'lib/net/ssh/authentication/key_manager.rb'
650
- - 'lib/net/ssh/transport/algorithms.rb'
651
722
 
652
- # Offense count: 2
723
+ # Offense count: 1
653
724
  # Cop supports --auto-correct.
725
+ # Configuration parameters: EnforcedStyle.
726
+ # SupportedStyles: predicate, comparison
654
727
  Style/NilComparison:
655
728
  Exclude:
656
729
  - 'lib/net/ssh/proxy/command.rb'
657
- - 'lib/net/ssh/transport/openssl.rb'
658
730
 
659
731
  # Offense count: 3
660
732
  # Cop supports --auto-correct.
@@ -662,26 +734,18 @@ Style/Not:
662
734
  Exclude:
663
735
  - 'lib/net/ssh/connection/channel.rb'
664
736
 
665
- # Offense count: 7
737
+ # Offense count: 8
666
738
  # Cop supports --auto-correct.
739
+ # Configuration parameters: Strict.
667
740
  Style/NumericLiterals:
668
741
  MinDigits: 310
669
742
 
670
- # Offense count: 11
743
+ # Offense count: 29
671
744
  # Cop supports --auto-correct.
672
- # Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
745
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
673
746
  # SupportedStyles: predicate, comparison
674
747
  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'
748
+ Enabled: false
685
749
 
686
750
  # Offense count: 15
687
751
  # Cop supports --auto-correct.
@@ -697,27 +761,25 @@ Style/ParallelAssignment:
697
761
  - 'test/common.rb'
698
762
  - 'test/connection/test_channel.rb'
699
763
 
700
- # Offense count: 7
764
+ # Offense count: 5
701
765
  # Cop supports --auto-correct.
702
- # Configuration parameters: AllowSafeAssignment.
766
+ # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
703
767
  Style/ParenthesesAroundCondition:
704
768
  Exclude:
705
769
  - 'lib/net/ssh/authentication/ed25519.rb'
706
770
  - 'lib/net/ssh/service/forward.rb'
707
- - 'lib/net/ssh/transport/cipher_factory.rb'
708
771
  - 'lib/net/ssh/transport/ctr.rb'
709
772
  - 'test/integration/test_proxy.rb'
710
773
 
711
- # Offense count: 5
774
+ # Offense count: 33
712
775
  # Cop supports --auto-correct.
713
776
  # Configuration parameters: PreferredDelimiters.
714
777
  Style/PercentLiteralDelimiters:
715
778
  Exclude:
716
- - 'Rakefile'
717
779
  - 'net-ssh.gemspec'
718
780
  - 'test/test_config.rb'
719
781
 
720
- # Offense count: 16
782
+ # Offense count: 15
721
783
  # Cop supports --auto-correct.
722
784
  Style/PerlBackrefs:
723
785
  Exclude:
@@ -726,7 +788,6 @@ Style/PerlBackrefs:
726
788
  - 'lib/net/ssh/key_factory.rb'
727
789
  - 'lib/net/ssh/proxy/command.rb'
728
790
  - 'lib/net/ssh/proxy/socks5.rb'
729
- - 'lib/net/ssh/transport/openssl.rb'
730
791
  - 'test/integration/common.rb'
731
792
 
732
793
  # Offense count: 14
@@ -744,7 +805,7 @@ Style/Proc:
744
805
 
745
806
  # Offense count: 7
746
807
  # Cop supports --auto-correct.
747
- # Configuration parameters: EnforcedStyle, SupportedStyles.
808
+ # Configuration parameters: EnforcedStyle.
748
809
  # SupportedStyles: compact, exploded
749
810
  Style/RaiseArgs:
750
811
  Exclude:
@@ -764,36 +825,53 @@ Style/RedundantParentheses:
764
825
  Exclude:
765
826
  - 'support/arcfour_check.rb'
766
827
 
767
- # Offense count: 57
828
+ # Offense count: 59
768
829
  # Cop supports --auto-correct.
769
830
  # Configuration parameters: AllowMultipleReturnValues.
770
831
  Style/RedundantReturn:
771
832
  Enabled: false
772
833
 
773
- # Offense count: 11
834
+ # Offense count: 14
774
835
  # Cop supports --auto-correct.
775
836
  Style/RedundantSelf:
776
837
  Exclude:
777
- - 'lib/net/ssh/authentication/ed25519.rb'
778
838
  - 'lib/net/ssh/connection/channel.rb'
779
839
  - 'lib/net/ssh/test/extensions.rb'
780
- - 'lib/net/ssh/transport/openssl.rb'
781
840
  - 'test/authentication/test_ed25519.rb'
782
841
 
783
- # Offense count: 4
842
+ # Offense count: 6
784
843
  # Cop supports --auto-correct.
785
844
  Style/RescueModifier:
786
845
  Exclude:
787
846
  - 'lib/net/ssh/service/forward.rb'
788
847
  - 'lib/net/ssh/transport/algorithms.rb'
789
848
 
790
- # Offense count: 1
849
+ # Offense count: 25
850
+ # Cop supports --auto-correct.
851
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
852
+ # Whitelist: present?, blank?, presence, try, try!
853
+ Style/SafeNavigation:
854
+ Exclude:
855
+ - 'lib/net/ssh/authentication/key_manager.rb'
856
+ - 'lib/net/ssh/authentication/methods/keyboard_interactive.rb'
857
+ - 'lib/net/ssh/authentication/methods/password.rb'
858
+ - 'lib/net/ssh/authentication/session.rb'
859
+ - 'lib/net/ssh/connection/channel.rb'
860
+ - 'lib/net/ssh/connection/event_loop.rb'
861
+ - 'lib/net/ssh/connection/session.rb'
862
+ - 'lib/net/ssh/key_factory.rb'
863
+ - 'lib/net/ssh/loggable.rb'
864
+ - 'lib/net/ssh/test/local_packet.rb'
865
+ - 'lib/net/ssh/transport/algorithms.rb'
866
+ - 'lib/net/ssh/transport/packet_stream.rb'
867
+
868
+ # Offense count: 2
791
869
  # Cop supports --auto-correct.
792
870
  Style/SelfAssignment:
793
871
  Exclude:
794
872
  - 'lib/net/ssh/config.rb'
795
873
 
796
- # Offense count: 8
874
+ # Offense count: 7
797
875
  # Cop supports --auto-correct.
798
876
  # Configuration parameters: AllowAsExpressionSeparator.
799
877
  Style/Semicolon:
@@ -801,11 +879,10 @@ Style/Semicolon:
801
879
  - 'lib/net/ssh/buffer.rb'
802
880
  - 'test/connection/test_channel.rb'
803
881
  - 'test/connection/test_session.rb'
804
- - 'test/transport/kex/test_ecdh_sha2_nistp256.rb'
805
882
 
806
883
  # Offense count: 2
807
884
  # Cop supports --auto-correct.
808
- # Configuration parameters: EnforcedStyle, SupportedStyles.
885
+ # Configuration parameters: EnforcedStyle.
809
886
  # SupportedStyles: only_raise, only_fail, semantic
810
887
  Style/SignalException:
811
888
  Exclude:
@@ -819,51 +896,9 @@ Style/SingleLineMethods:
819
896
  Exclude:
820
897
  - 'lib/net/ssh/buffered_io.rb'
821
898
 
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
899
+ # Offense count: 18
865
900
  # Cop supports --auto-correct.
866
- # Configuration parameters: EnforcedStyle, SupportedStyles.
901
+ # Configuration parameters: EnforcedStyle.
867
902
  # SupportedStyles: use_perl_names, use_english_names
868
903
  Style/SpecialGlobalVars:
869
904
  Exclude:
@@ -874,12 +909,10 @@ Style/SpecialGlobalVars:
874
909
  - 'test/integration/test_forward.rb'
875
910
  - 'test/manual/test_pageant.rb'
876
911
  - 'test/test_all.rb'
877
- - 'test_connection_close_shall_close_cannels.rb'
878
- - 'test_kerberos_client2.rb'
879
912
 
880
- # Offense count: 1846
913
+ # Offense count: 1754
881
914
  # Cop supports --auto-correct.
882
- # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
915
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
883
916
  # SupportedStyles: single_quotes, double_quotes
884
917
  Style/StringLiterals:
885
918
  Enabled: false
@@ -898,36 +931,11 @@ Style/SymbolProc:
898
931
  - 'test/integration/test_forward.rb'
899
932
  - 'test/test/test_test.rb'
900
933
 
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
934
  # Offense count: 1
914
935
  # 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:
936
+ Style/UnneededCondition:
918
937
  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'
938
+ - 'lib/net/ssh/proxy/command.rb'
931
939
 
932
940
  # Offense count: 4
933
941
  # Cop supports --auto-correct.
@@ -937,7 +945,7 @@ Style/UnneededInterpolation:
937
945
  - 'lib/net/ssh/transport/session.rb'
938
946
  - 'test/integration/test_forward.rb'
939
947
 
940
- # Offense count: 4
948
+ # Offense count: 15
941
949
  # Cop supports --auto-correct.
942
950
  Style/UnneededPercentQ:
943
951
  Exclude:
@@ -953,17 +961,22 @@ Style/WhileUntilDo:
953
961
 
954
962
  # Offense count: 3
955
963
  # Cop supports --auto-correct.
956
- # Configuration parameters: SupportedStyles, WordRegex.
964
+ # Configuration parameters: WordRegex.
957
965
  # SupportedStyles: percent, brackets
958
966
  Style/WordArray:
959
967
  EnforcedStyle: percent
960
968
  MinSize: 3
961
969
 
962
- # Offense count: 7
970
+ # Offense count: 4
963
971
  # Cop supports --auto-correct.
964
972
  Style/ZeroLengthPredicate:
965
973
  Exclude:
966
974
  - 'lib/net/ssh/buffered_io.rb'
967
975
  - 'lib/net/ssh/connection/channel.rb'
968
- - 'test/integration/test_forward.rb'
969
- - 'test_connection_close_shall_close_cannels.rb'
976
+
977
+ # Offense count: 1636
978
+ # Cop supports --auto-correct.
979
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
980
+ # URISchemes: http, https
981
+ Metrics/LineLength:
982
+ Max: 932