net-ssh 5.2.0 → 7.0.1

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 (122) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data/.dockerignore +6 -0
  4. data/.github/config/rubocop_linter_action.yml +4 -0
  5. data/.github/workflows/ci-with-docker.yml +44 -0
  6. data/.github/workflows/ci.yml +87 -0
  7. data/.github/workflows/rubocop.yml +13 -0
  8. data/.gitignore +3 -0
  9. data/.rubocop.yml +16 -2
  10. data/.rubocop_todo.yml +623 -511
  11. data/CHANGES.txt +50 -2
  12. data/Dockerfile +27 -0
  13. data/Dockerfile.openssl3 +17 -0
  14. data/Gemfile +2 -0
  15. data/Gemfile.noed25519 +2 -0
  16. data/Manifest +0 -1
  17. data/README.md +293 -0
  18. data/Rakefile +6 -2
  19. data/appveyor.yml +4 -2
  20. data/docker-compose.yml +23 -0
  21. data/lib/net/ssh/authentication/agent.rb +29 -13
  22. data/lib/net/ssh/authentication/certificate.rb +19 -7
  23. data/lib/net/ssh/authentication/constants.rb +0 -1
  24. data/lib/net/ssh/authentication/ed25519.rb +13 -8
  25. data/lib/net/ssh/authentication/ed25519_loader.rb +5 -8
  26. data/lib/net/ssh/authentication/key_manager.rb +73 -32
  27. data/lib/net/ssh/authentication/methods/abstract.rb +12 -3
  28. data/lib/net/ssh/authentication/methods/hostbased.rb +3 -5
  29. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +5 -3
  30. data/lib/net/ssh/authentication/methods/none.rb +6 -9
  31. data/lib/net/ssh/authentication/methods/password.rb +2 -3
  32. data/lib/net/ssh/authentication/methods/publickey.rb +56 -16
  33. data/lib/net/ssh/authentication/pageant.rb +97 -97
  34. data/lib/net/ssh/authentication/pub_key_fingerprint.rb +2 -3
  35. data/lib/net/ssh/authentication/session.rb +27 -23
  36. data/lib/net/ssh/buffer.rb +51 -40
  37. data/lib/net/ssh/buffered_io.rb +24 -26
  38. data/lib/net/ssh/config.rb +82 -50
  39. data/lib/net/ssh/connection/channel.rb +101 -87
  40. data/lib/net/ssh/connection/constants.rb +0 -4
  41. data/lib/net/ssh/connection/event_loop.rb +30 -25
  42. data/lib/net/ssh/connection/keepalive.rb +12 -12
  43. data/lib/net/ssh/connection/session.rb +115 -111
  44. data/lib/net/ssh/connection/term.rb +56 -58
  45. data/lib/net/ssh/errors.rb +12 -12
  46. data/lib/net/ssh/key_factory.rb +10 -13
  47. data/lib/net/ssh/known_hosts.rb +106 -39
  48. data/lib/net/ssh/loggable.rb +10 -11
  49. data/lib/net/ssh/packet.rb +1 -1
  50. data/lib/net/ssh/prompt.rb +9 -11
  51. data/lib/net/ssh/proxy/command.rb +1 -2
  52. data/lib/net/ssh/proxy/errors.rb +2 -4
  53. data/lib/net/ssh/proxy/http.rb +18 -20
  54. data/lib/net/ssh/proxy/https.rb +8 -10
  55. data/lib/net/ssh/proxy/jump.rb +8 -10
  56. data/lib/net/ssh/proxy/socks4.rb +2 -4
  57. data/lib/net/ssh/proxy/socks5.rb +3 -6
  58. data/lib/net/ssh/service/forward.rb +9 -8
  59. data/lib/net/ssh/test/channel.rb +24 -26
  60. data/lib/net/ssh/test/extensions.rb +35 -35
  61. data/lib/net/ssh/test/kex.rb +6 -8
  62. data/lib/net/ssh/test/local_packet.rb +0 -2
  63. data/lib/net/ssh/test/packet.rb +3 -3
  64. data/lib/net/ssh/test/remote_packet.rb +6 -8
  65. data/lib/net/ssh/test/script.rb +25 -27
  66. data/lib/net/ssh/test/socket.rb +12 -15
  67. data/lib/net/ssh/test.rb +7 -7
  68. data/lib/net/ssh/transport/algorithms.rb +100 -58
  69. data/lib/net/ssh/transport/cipher_factory.rb +34 -50
  70. data/lib/net/ssh/transport/constants.rb +13 -9
  71. data/lib/net/ssh/transport/ctr.rb +8 -14
  72. data/lib/net/ssh/transport/hmac/abstract.rb +20 -5
  73. data/lib/net/ssh/transport/hmac/md5.rb +0 -2
  74. data/lib/net/ssh/transport/hmac/md5_96.rb +0 -2
  75. data/lib/net/ssh/transport/hmac/none.rb +0 -2
  76. data/lib/net/ssh/transport/hmac/ripemd160.rb +0 -2
  77. data/lib/net/ssh/transport/hmac/sha1.rb +0 -2
  78. data/lib/net/ssh/transport/hmac/sha1_96.rb +0 -2
  79. data/lib/net/ssh/transport/hmac/sha2_256.rb +7 -11
  80. data/lib/net/ssh/transport/hmac/sha2_256_96.rb +4 -8
  81. data/lib/net/ssh/transport/hmac/sha2_256_etm.rb +12 -0
  82. data/lib/net/ssh/transport/hmac/sha2_512.rb +6 -9
  83. data/lib/net/ssh/transport/hmac/sha2_512_96.rb +4 -8
  84. data/lib/net/ssh/transport/hmac/sha2_512_etm.rb +12 -0
  85. data/lib/net/ssh/transport/hmac.rb +13 -11
  86. data/lib/net/ssh/transport/identity_cipher.rb +11 -13
  87. data/lib/net/ssh/transport/kex/abstract.rb +130 -0
  88. data/lib/net/ssh/transport/kex/abstract5656.rb +72 -0
  89. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +39 -0
  90. data/lib/net/ssh/transport/kex/curve25519_sha256_loader.rb +30 -0
  91. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +5 -19
  92. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb +11 -0
  93. data/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb +30 -139
  94. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +1 -8
  95. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb +5 -9
  96. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb +20 -81
  97. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp384.rb +5 -4
  98. data/lib/net/ssh/transport/kex/ecdh_sha2_nistp521.rb +5 -4
  99. data/lib/net/ssh/transport/kex.rb +15 -10
  100. data/lib/net/ssh/transport/key_expander.rb +7 -8
  101. data/lib/net/ssh/transport/openssl.rb +149 -127
  102. data/lib/net/ssh/transport/packet_stream.rb +50 -16
  103. data/lib/net/ssh/transport/server_version.rb +17 -16
  104. data/lib/net/ssh/transport/session.rb +9 -7
  105. data/lib/net/ssh/transport/state.rb +44 -44
  106. data/lib/net/ssh/verifiers/accept_new.rb +0 -2
  107. data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +1 -2
  108. data/lib/net/ssh/verifiers/always.rb +6 -4
  109. data/lib/net/ssh/verifiers/never.rb +0 -2
  110. data/lib/net/ssh/version.rb +3 -3
  111. data/lib/net/ssh.rb +12 -8
  112. data/net-ssh-public_cert.pem +8 -8
  113. data/net-ssh.gemspec +9 -7
  114. data/support/ssh_tunnel_bug.rb +3 -3
  115. data.tar.gz.sig +0 -0
  116. metadata +55 -30
  117. metadata.gz.sig +0 -0
  118. data/.travis.yml +0 -53
  119. data/Gemfile.noed25519.lock +0 -41
  120. data/README.rdoc +0 -194
  121. data/lib/net/ssh/ruby_compat.rb +0 -13
  122. data/support/arcfour_check.rb +0 -20
data/.rubocop_todo.yml CHANGED
@@ -1,122 +1,110 @@
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 2022-04-29 12:31:14 UTC using RuboCop version 1.28.2.
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:
9
+ # Offense count: 1
10
+ # This cop supports safe auto-correction (--auto-correct).
11
+ # Configuration parameters: Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/RequireMFA:
12
14
  Exclude:
13
- - 'lib/net/ssh/connection/channel.rb'
14
- - 'lib/net/ssh/connection/session.rb'
15
- - 'lib/net/ssh/proxy/command.rb'
15
+ - 'net-ssh.gemspec'
16
16
 
17
17
  # Offense count: 1
18
- Lint/EmptyWhen:
18
+ # This cop supports safe auto-correction (--auto-correct).
19
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
20
+ # SupportedStyles: aligned, indented
21
+ Layout/LineEndStringConcatenationIndentation:
19
22
  Exclude:
20
- - 'lib/net/ssh/config.rb'
21
-
22
- # Layout/EndAlignment:
23
- # Enabled: false
23
+ - 'lib/net/ssh/transport/algorithms.rb'
24
24
 
25
- # Offense count: 23
26
- # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
27
- # AllowedNames: io, id, to
28
- Naming/UncommunicativeMethodParamName:
25
+ # Offense count: 7
26
+ # This cop supports safe auto-correction (--auto-correct).
27
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
28
+ # SupportedStyles: aligned, indented
29
+ Layout/MultilineOperationIndentation:
29
30
  Exclude:
30
- - 'lib/net/ssh/authentication/certificate.rb'
31
- - 'lib/net/ssh/authentication/ed25519.rb'
32
- - 'lib/net/ssh/authentication/key_manager.rb'
33
31
  - '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'
32
+ - 'lib/net/ssh/proxy/https.rb'
33
+ - 'lib/net/ssh/transport/algorithms.rb'
34
+ - 'lib/net/ssh/transport/state.rb'
35
+
36
+ # Offense count: 5
37
+ # This cop supports safe auto-correction (--auto-correct).
38
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
39
+ # SupportedStyles: space, no_space
40
+ # SupportedStylesForEmptyBraces: space, no_space
41
+ Layout/SpaceInsideBlockBraces:
42
+ Exclude:
43
+ - 'lib/net/ssh/authentication/session.rb'
38
44
  - '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'
45
+ - 'support/ssh_tunnel_bug.rb'
42
46
 
43
- # Offense count: 2
44
- Naming/BinaryOperatorParameterName:
47
+ # Offense count: 6
48
+ # This cop supports safe auto-correction (--auto-correct).
49
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
50
+ # SupportedStyles: space, no_space
51
+ # SupportedStylesForEmptyBrackets: space, no_space
52
+ Layout/SpaceInsideReferenceBrackets:
45
53
  Exclude:
46
- - 'lib/net/ssh/buffer.rb'
47
- - 'lib/net/ssh/version.rb'
54
+ - 'lib/net/ssh/transport/algorithms.rb'
48
55
 
49
- # Offense count: 4
50
- Naming/MemoizedInstanceVariableName:
56
+ # Offense count: 11
57
+ # This cop supports safe auto-correction (--auto-correct).
58
+ Lint/AmbiguousOperatorPrecedence:
51
59
  Exclude:
60
+ - 'lib/net/ssh/authentication/certificate.rb'
61
+ - 'lib/net/ssh/config.rb'
62
+ - 'lib/net/ssh/loggable.rb'
63
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
52
64
  - 'lib/net/ssh/transport/openssl.rb'
53
- - 'test/authentication/test_key_manager.rb'
65
+ - 'lib/net/ssh/transport/state.rb'
66
+ - 'lib/net/ssh/version.rb'
67
+ - 'test/integration/test_proxy.rb'
54
68
 
55
- # Offense count: 1
56
- Lint/LiteralAsCondition:
69
+ # Offense count: 4
70
+ # Configuration parameters: AllowSafeAssignment.
71
+ Lint/AssignmentInCondition:
57
72
  Exclude:
58
- - 'lib/net/ssh/authentication/pageant.rb'
73
+ - 'lib/net/ssh/connection/channel.rb'
74
+ - 'lib/net/ssh/connection/session.rb'
75
+ - 'lib/net/ssh/proxy/command.rb'
59
76
 
60
- # Offense count: 3
61
- Style/MultipleComparison:
77
+ # Offense count: 1
78
+ # Configuration parameters: AllowedMethods.
79
+ # AllowedMethods: enums
80
+ Lint/ConstantDefinitionInBlock:
62
81
  Exclude:
63
- - 'lib/net/ssh/authentication/pageant.rb'
64
- - 'lib/net/ssh/known_hosts.rb'
82
+ - 'test/transport/test_cipher_factory.rb'
65
83
 
66
84
  # Offense count: 1
67
- # Configuration parameters: EnforcedStyle.
68
- # SupportedStyles: annotated, template, unannotated
69
- Style/FormatStringToken:
85
+ # This cop supports safe auto-correction (--auto-correct).
86
+ Lint/DeprecatedClassMethods:
70
87
  Exclude:
71
- - 'lib/net/ssh/loggable.rb'
72
-
73
- # Offense count: 7
74
- # Configuration parameters: Blacklist.
75
- # Blacklist: END, (?-mix:EO[A-Z]{1})
76
- Naming/HeredocDelimiterNaming:
77
- Enabled: false
88
+ - 'lib/net/ssh/transport/packet_stream.rb'
78
89
 
79
- # Offense count: 3
80
- # Configuration parameters: MaximumRangeSize.
81
- Lint/MissingCopEnableDirective:
90
+ # Offense count: 12
91
+ # This cop supports safe auto-correction (--auto-correct).
92
+ Lint/DeprecatedOpenSSLConstant:
82
93
  Exclude:
83
- - 'test/authentication/test_agent.rb'
84
- - 'test/authentication/test_certificate.rb'
85
- - 'test/integration/test_agent.rb'
86
-
87
-
88
- # Offense count: 7
89
- # Cop supports --auto-correct.
90
- # Configuration parameters: EnforcedStyle.
91
- # SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
92
- Layout/IndentHeredoc:
93
- Enabled: false
94
+ - 'lib/net/ssh/transport/openssl.rb'
94
95
 
95
96
  # Offense count: 2
96
- # Cop supports --auto-correct.
97
- # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
98
- # SupportedStylesAlignWith: start_of_line, def
99
- Layout/DefEndAlignment:
97
+ # Configuration parameters: AllowComments, AllowEmptyLambdas.
98
+ Lint/EmptyBlock:
100
99
  Exclude:
101
- - 'test/transport/hmac/test_sha2_256.rb'
102
- - 'test/transport/hmac/test_sha2_512.rb'
103
-
104
- # Offense count: 3
105
- Style/CommentedKeyword:
106
- Exclude:
107
- - 'test/connection/test_session.rb'
108
- - 'test/integration/test_forward.rb'
100
+ - 'test/common.rb'
101
+ - 'test/start/test_transport.rb'
109
102
 
110
- # Offense count: 8
111
- Lint/HandleExceptions:
103
+ # Offense count: 1
104
+ # Configuration parameters: AllowComments.
105
+ Lint/EmptyWhen:
112
106
  Exclude:
113
- - 'lib/net/ssh/authentication/session.rb'
114
- - 'lib/net/ssh/known_hosts.rb'
115
- - 'lib/net/ssh/transport/openssl.rb'
116
- - 'test/integration/common.rb'
117
- - 'test/integration/test_forward.rb'
118
- - 'test/start/test_connection.rb'
119
- - 'test/start/test_transport.rb'
107
+ - 'lib/net/ssh/config.rb'
120
108
 
121
109
  # Offense count: 72
122
110
  Lint/ImplicitStringConcatenation:
@@ -124,63 +112,106 @@ Lint/ImplicitStringConcatenation:
124
112
  - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
125
113
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
126
114
 
115
+ # Offense count: 8
116
+ # This cop supports safe auto-correction (--auto-correct).
117
+ Lint/IncompatibleIoSelectWithFiberScheduler:
118
+ Exclude:
119
+ - 'lib/net/ssh/buffered_io.rb'
120
+ - 'lib/net/ssh/proxy/command.rb'
121
+ - 'lib/net/ssh/transport/packet_stream.rb'
122
+ - 'lib/net/ssh/transport/server_version.rb'
123
+
127
124
  # Offense count: 2
125
+ # This cop supports unsafe auto-correction (--auto-correct-all).
128
126
  Lint/Loop:
129
127
  Exclude:
130
128
  - 'lib/net/ssh/authentication/methods/password.rb'
131
129
  - 'lib/net/ssh/key_factory.rb'
132
130
 
133
- # Offense count: 1
134
- Lint/NextWithoutAccumulator:
131
+ # Offense count: 3
132
+ Lint/MissingSuper:
135
133
  Exclude:
136
- - 'lib/net/ssh/connection/session.rb'
134
+ - 'lib/net/ssh/proxy/jump.rb'
135
+ - 'test/common.rb'
136
+ - 'test/integration/mitm_server.rb'
137
137
 
138
138
  # Offense count: 1
139
139
  Lint/NonLocalExitFromIterator:
140
140
  Exclude:
141
141
  - 'lib/net/ssh/known_hosts.rb'
142
142
 
143
- # Offense count: 4
143
+ # Offense count: 2
144
+ # This cop supports unsafe auto-correction (--auto-correct-all).
145
+ Lint/OrAssignmentToConstant:
146
+ Exclude:
147
+ - 'lib/net/ssh/authentication/pageant.rb'
148
+
149
+ # Offense count: 6
150
+ # This cop supports unsafe auto-correction (--auto-correct-all).
151
+ # Configuration parameters: AllowedImplicitNamespaces.
152
+ # AllowedImplicitNamespaces: Gem
153
+ Lint/RaiseException:
154
+ Exclude:
155
+ - 'Rakefile'
156
+ - 'lib/net/ssh/buffer.rb'
157
+ - 'lib/net/ssh/key_factory.rb'
158
+
159
+ # Offense count: 1
160
+ # This cop supports safe auto-correction (--auto-correct).
161
+ Lint/RedundantCopDisableDirective:
162
+ Exclude:
163
+ - 'lib/net/ssh/key_factory.rb'
164
+
165
+ # Offense count: 3
144
166
  Lint/RescueException:
145
167
  Exclude:
146
168
  - 'lib/net/ssh/authentication/key_manager.rb'
147
169
  - 'lib/net/ssh/service/forward.rb'
148
- - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
170
+
171
+ # Offense count: 4
172
+ # This cop supports safe auto-correction (--auto-correct).
173
+ Lint/SendWithMixinArgument:
174
+ Exclude:
175
+ - 'lib/net/ssh/test/extensions.rb'
149
176
 
150
177
  # Offense count: 2
151
178
  Lint/ShadowedException:
152
179
  Exclude:
153
180
  - 'lib/net/ssh/authentication/key_manager.rb'
154
181
 
182
+ # Offense count: 5
183
+ # Configuration parameters: AllowComments, AllowNil.
184
+ Lint/SuppressedException:
185
+ Exclude:
186
+ - 'lib/net/ssh/authentication/session.rb'
187
+ - 'lib/net/ssh/transport/openssl.rb'
188
+ - 'test/integration/common.rb'
189
+ - 'test/integration/test_forward.rb'
190
+
155
191
  # Offense count: 1
192
+ # Configuration parameters: AllowKeywordBlockArguments.
156
193
  Lint/UnderscorePrefixedVariableName:
157
194
  Exclude:
158
195
  - 'lib/net/ssh/test/local_packet.rb'
159
196
 
160
- # Offense count: 52
161
- # Cop supports --auto-correct.
197
+ # Offense count: 15
198
+ # This cop supports safe auto-correction (--auto-correct).
162
199
  # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
163
200
  Lint/UnusedBlockArgument:
164
201
  Exclude:
165
202
  - 'lib/net/ssh/connection/keepalive.rb'
166
203
  - 'lib/net/ssh/connection/session.rb'
167
204
  - 'lib/net/ssh/service/forward.rb'
168
- - 'test/authentication/methods/test_password.rb'
169
- - 'test/authentication/test_agent.rb'
170
- - 'test/common.rb'
171
- - 'test/connection/test_channel.rb'
172
- - 'test/connection/test_session.rb'
173
- - 'test/transport/test_algorithms.rb'
174
- - 'test/transport/test_hmac.rb'
175
205
 
176
- # Offense count: 50
177
- # Cop supports --auto-correct.
178
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
206
+ # Offense count: 74
207
+ # This cop supports safe auto-correction (--auto-correct).
208
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
179
209
  Lint/UnusedMethodArgument:
180
210
  Enabled: false
181
211
 
182
212
  # Offense count: 3
183
- # Configuration parameters: ContextCreatingMethods.
213
+ # This cop supports safe auto-correction (--auto-correct).
214
+ # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
184
215
  Lint/UselessAccessModifier:
185
216
  Exclude:
186
217
  - 'lib/net/ssh/buffered_io.rb'
@@ -195,132 +226,208 @@ Lint/UselessAssignment:
195
226
  - 'test/integration/common.rb'
196
227
  - 'test/integration/test_forward.rb'
197
228
 
198
- # Offense count: 196
229
+ # Offense count: 1
230
+ # This cop supports unsafe auto-correction (--auto-correct-all).
231
+ Lint/UselessTimes:
232
+ Exclude:
233
+ - 'test/integration/test_forward.rb'
234
+
235
+ # Offense count: 205
236
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
199
237
  Metrics/AbcSize:
200
- Max: 76
238
+ Max: 74
201
239
 
202
- # Offense count: 14
203
- # Configuration parameters: CountComments.
240
+ # Offense count: 16
241
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
242
+ # IgnoredMethods: refine
204
243
  Metrics/BlockLength:
205
- Max: 88
244
+ Max: 59
206
245
 
207
246
  # Offense count: 1
247
+ # Configuration parameters: CountBlocks.
208
248
  Metrics/BlockNesting:
209
249
  Max: 4
210
250
 
211
- # Offense count: 27
212
- # Configuration parameters: CountComments.
251
+ # Offense count: 33
252
+ # Configuration parameters: CountComments, CountAsOne.
213
253
  Metrics/ClassLength:
214
- Max: 548
254
+ Max: 488
215
255
 
216
- # Offense count: 34
256
+ # Offense count: 38
257
+ # Configuration parameters: IgnoredMethods.
217
258
  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
259
+ Max: 32
225
260
 
226
- # Offense count: 164
227
- # Configuration parameters: CountComments.
261
+ # Offense count: 232
262
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
228
263
  Metrics/MethodLength:
229
- Max: 93
264
+ Max: 72
230
265
 
231
- # Offense count: 1
232
- # Configuration parameters: CountComments.
266
+ # Offense count: 3
267
+ # Configuration parameters: CountComments, CountAsOne.
233
268
  Metrics/ModuleLength:
234
- Max: 142
269
+ Max: 160
235
270
 
236
- # Offense count: 1
237
- # Configuration parameters: CountKeywordArgs.
271
+ # Offense count: 2
272
+ # Configuration parameters: Max, CountKeywordArgs.
238
273
  Metrics/ParameterLists:
239
- Max: 6
274
+ MaxOptionalParameters: 4
240
275
 
241
- # Offense count: 27
276
+ # Offense count: 34
277
+ # Configuration parameters: IgnoredMethods.
242
278
  Metrics/PerceivedComplexity:
243
- Max: 23
244
-
245
- # Offense count: 3
246
- # Cop supports --auto-correct.
247
- Performance/RangeInclude:
248
- Exclude:
249
- - 'lib/net/ssh/transport/algorithms.rb'
250
-
251
- # Offense count: 3
252
- # Cop supports --auto-correct.
253
- Performance/RedundantBlockCall:
254
- Exclude:
255
- - 'lib/net/ssh/connection/session.rb'
256
- - 'test/connection/test_channel.rb'
279
+ Max: 32
257
280
 
258
- # Offense count: 6
259
- # Cop supports --auto-correct.
260
- Performance/RedundantMatch:
261
- Exclude:
262
- - 'lib/net/ssh/key_factory.rb'
263
- - 'lib/net/ssh/transport/server_version.rb'
264
-
265
- # Offense count: 13
281
+ # Offense count: 10
266
282
  Naming/AccessorMethodName:
267
283
  Exclude:
268
284
  - 'lib/net/ssh/authentication/methods/password.rb'
269
285
  - 'lib/net/ssh/authentication/pageant.rb'
286
+ - 'lib/net/ssh/connection/channel.rb'
270
287
  - 'lib/net/ssh/connection/session.rb'
271
- - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
288
+ - 'lib/net/ssh/transport/kex/abstract5656.rb'
272
289
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
273
290
  - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
274
- - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb'
275
291
 
276
292
  # Offense count: 2
277
- # Cop supports --auto-correct.
278
- # Configuration parameters: EnforcedStyle, SupportedStyles.
279
- # SupportedStyles: prefer_alias, prefer_alias_method
280
- Style/Alias:
293
+ # This cop supports safe auto-correction (--auto-correct).
294
+ Naming/BinaryOperatorParameterName:
281
295
  Exclude:
282
- - 'lib/net/ssh/connection/session.rb'
283
- - 'lib/net/ssh/service/forward.rb'
296
+ - 'lib/net/ssh/buffer.rb'
297
+ - 'lib/net/ssh/version.rb'
284
298
 
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:
299
+ # Offense count: 16
300
+ # Configuration parameters: AllowedNames.
301
+ # AllowedNames: module_parent
302
+ Naming/ClassAndModuleCamelCase:
290
303
  Enabled: false
291
304
 
292
- # Offense count: 33
293
- # Cop supports --auto-correct.
294
- # Configuration parameters: EnforcedStyle, SupportedStyles.
295
- # SupportedStyles: always, conditionals
296
- Style/AndOr:
305
+ # Offense count: 4
306
+ Naming/ConstantName:
307
+ Exclude:
308
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
309
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
310
+ - 'lib/net/ssh/transport/openssl.rb'
311
+
312
+ # Offense count: 15
313
+ # Configuration parameters: ForbiddenDelimiters.
314
+ # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
315
+ Naming/HeredocDelimiterNaming:
297
316
  Exclude:
317
+ - 'test/authentication/test_agent.rb'
318
+ - 'test/authentication/test_certificate.rb'
319
+ - 'test/authentication/test_ed25519.rb'
320
+ - 'test/authentication/test_session.rb'
321
+ - 'test/integration/test_agent.rb'
322
+ - 'test/test_key_factory.rb'
323
+
324
+ # Offense count: 5
325
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
326
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
327
+ Naming/MemoizedInstanceVariableName:
328
+ Exclude:
329
+ - 'lib/net/ssh/transport/openssl.rb'
330
+ - 'test/authentication/test_key_manager.rb'
331
+
332
+ # Offense count: 32
333
+ # Configuration parameters: EnforcedStyle, AllowedPatterns, IgnoredPatterns.
334
+ # SupportedStyles: snake_case, camelCase
335
+ Naming/MethodName:
336
+ Exclude:
337
+ - 'lib/net/ssh/authentication/ed25519_loader.rb'
338
+ - 'lib/net/ssh/transport/kex/curve25519_sha256_loader.rb'
339
+ - 'test/authentication/test_agent.rb'
340
+ - 'test/authentication/test_session.rb'
341
+ - 'test/common.rb'
342
+ - 'test/connection/test_channel.rb'
343
+ - 'test/test_config.rb'
344
+ - 'test/test_key_factory.rb'
345
+
346
+ # Offense count: 23
347
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
348
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
349
+ Naming/MethodParameterName:
350
+ Exclude:
351
+ - 'lib/net/ssh/authentication/certificate.rb'
352
+ - 'lib/net/ssh/authentication/ed25519.rb'
298
353
  - 'lib/net/ssh/authentication/key_manager.rb'
354
+ - 'lib/net/ssh/authentication/pageant.rb'
299
355
  - 'lib/net/ssh/buffer.rb'
300
356
  - 'lib/net/ssh/buffered_io.rb'
301
- - 'lib/net/ssh/config.rb'
302
- - 'lib/net/ssh/connection/channel.rb'
357
+ - 'lib/net/ssh/test/socket.rb'
358
+ - 'lib/net/ssh/transport/ctr.rb'
359
+ - 'lib/net/ssh/transport/hmac/abstract.rb'
360
+ - 'lib/net/ssh/transport/identity_cipher.rb'
361
+ - 'test/connection/test_session.rb'
362
+
363
+ # Offense count: 4
364
+ # This cop supports safe auto-correction (--auto-correct).
365
+ # Configuration parameters: PreferredName.
366
+ Naming/RescuedExceptionsVariableName:
367
+ Exclude:
303
368
  - 'lib/net/ssh/connection/session.rb'
304
- - 'lib/net/ssh/key_factory.rb'
305
369
  - 'lib/net/ssh/service/forward.rb'
306
- - 'lib/net/ssh/test/channel.rb'
307
- - 'lib/net/ssh/test/script.rb'
308
- - 'lib/net/ssh/transport/cipher_factory.rb'
309
- - 'lib/net/ssh/transport/hmac.rb'
310
- - 'lib/net/ssh/transport/key_expander.rb'
311
- - 'lib/net/ssh/transport/packet_stream.rb'
312
- - 'test/common.rb'
370
+ - 'lib/net/ssh/verifiers/accept_new.rb'
371
+
372
+ # Offense count: 5
373
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
374
+ # SupportedStyles: snake_case, normalcase, non_integer
375
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
376
+ Naming/VariableNumber:
377
+ Exclude:
378
+ - 'test/test_buffer.rb'
379
+ - 'test/test_known_hosts.rb'
380
+ - 'test/transport/test_identity_cipher.rb'
381
+
382
+ # Offense count: 1
383
+ # This cop supports unsafe auto-correction (--auto-correct-all).
384
+ Security/IoMethods:
385
+ Exclude:
386
+ - 'lib/net/ssh/config.rb'
313
387
 
314
388
  # Offense count: 2
315
- Style/AsciiComments:
389
+ # Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols.
390
+ # SupportedStyles: inline, group
391
+ Style/AccessModifierDeclarations:
316
392
  Exclude:
317
393
  - 'lib/net/ssh/authentication/pageant.rb'
318
- - 'lib/net/ssh/buffered_io.rb'
319
394
 
320
- # Offense count: 11
321
- # Cop supports --auto-correct.
322
- # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
323
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
395
+ # Offense count: 31
396
+ # This cop supports safe auto-correction (--auto-correct).
397
+ # Configuration parameters: EnforcedStyle.
398
+ # SupportedStyles: separated, grouped
399
+ Style/AccessorGrouping:
400
+ Exclude:
401
+ - 'lib/net/ssh/authentication/certificate.rb'
402
+ - 'lib/net/ssh/transport/kex/abstract.rb'
403
+ - 'test/common.rb'
404
+ - 'test/connection/test_channel.rb'
405
+ - 'test/integration/mitm_server.rb'
406
+ - 'test/start/test_transport.rb'
407
+
408
+ # Offense count: 2
409
+ # This cop supports safe auto-correction (--auto-correct).
410
+ # Configuration parameters: EnforcedStyle.
411
+ # SupportedStyles: prefer_alias, prefer_alias_method
412
+ Style/Alias:
413
+ Exclude:
414
+ - 'lib/net/ssh/connection/session.rb'
415
+ - 'lib/net/ssh/service/forward.rb'
416
+
417
+ # Offense count: 9
418
+ # This cop supports safe auto-correction (--auto-correct).
419
+ # Configuration parameters: EnforcedStyle.
420
+ # SupportedStyles: always, conditionals
421
+ Style/AndOr:
422
+ Exclude:
423
+ - 'lib/net/ssh/connection/channel.rb'
424
+ - 'lib/net/ssh/connection/session.rb'
425
+ - 'lib/net/ssh/service/forward.rb'
426
+
427
+ # Offense count: 9
428
+ # This cop supports safe auto-correction (--auto-correct).
429
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
430
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
324
431
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
325
432
  # FunctionalMethods: let, let!, subject, watch
326
433
  # IgnoredMethods: lambda, proc, it
@@ -332,63 +439,43 @@ Style/BlockDelimiters:
332
439
  - 'lib/net/ssh/connection/keepalive.rb'
333
440
  - 'lib/net/ssh/proxy/command.rb'
334
441
  - 'lib/net/ssh/transport/ctr.rb'
335
- - 'test/test_buffer.rb'
336
442
  - 'test/verifiers/test_always.rb'
337
443
 
338
- # Offense count: 8
339
- # Cop supports --auto-correct.
340
- # Configuration parameters: EnforcedStyle, SupportedStyles.
341
- # SupportedStyles: braces, no_braces, context_dependent
342
- Style/BracesAroundHashParameters:
343
- Exclude:
344
- - 'lib/net/ssh/config.rb'
345
- - 'test/integration/test_ed25519_pkeys.rb'
346
- - 'test/integration/test_id_rsa_keys.rb'
347
- - 'test/transport/test_hmac.rb'
348
- - 'test/transport/test_session.rb'
349
- - 'test_kerberos_client2.rb'
350
-
351
444
  # Offense count: 2
445
+ # This cop supports safe auto-correction (--auto-correct).
446
+ # Configuration parameters: AllowOnConstant.
352
447
  Style/CaseEquality:
353
448
  Exclude:
354
449
  - 'lib/net/ssh/buffer.rb'
355
450
  - 'lib/net/ssh/connection/session.rb'
356
451
 
452
+ # Offense count: 3
453
+ # This cop supports unsafe auto-correction (--auto-correct-all).
454
+ Style/CaseLikeIf:
455
+ Exclude:
456
+ - 'lib/net/ssh/transport/openssl.rb'
457
+ - 'test/connection/test_session.rb'
458
+
357
459
  # Offense count: 1
358
- # Cop supports --auto-correct.
460
+ # This cop supports safe auto-correction (--auto-correct).
359
461
  Style/CharacterLiteral:
360
462
  Exclude:
361
463
  - 'test/test_buffer.rb'
362
464
 
363
- # Offense count: 12
364
- Naming/ClassAndModuleCamelCase:
365
- Exclude:
366
- - 'lib/net/ssh/transport/hmac/md5_96.rb'
367
- - 'lib/net/ssh/transport/hmac/sha1_96.rb'
368
- - 'lib/net/ssh/transport/hmac/sha2_256.rb'
369
- - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
370
- - 'lib/net/ssh/transport/hmac/sha2_512.rb'
371
- - '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.
465
+ # Offense count: 18
466
+ # This cop supports safe auto-correction (--auto-correct).
467
+ # Configuration parameters: EnforcedStyle.
381
468
  # SupportedStyles: nested, compact
382
469
  Style/ClassAndModuleChildren:
383
470
  Enabled: false
384
471
 
385
472
  # Offense count: 1
386
- # Cop supports --auto-correct.
387
- # Configuration parameters: EnforcedStyle, SupportedStyles.
388
- # SupportedStyles: is_a?, kind_of?
389
- Style/ClassCheck:
473
+ # This cop supports safe auto-correction (--auto-correct).
474
+ # Configuration parameters: IgnoredMethods.
475
+ # IgnoredMethods: ==, equal?, eql?
476
+ Style/ClassEqualityComparison:
390
477
  Exclude:
391
- - 'test/authentication/test_key_manager.rb'
478
+ - 'lib/net/ssh/service/forward.rb'
392
479
 
393
480
  # Offense count: 7
394
481
  Style/ClassVars:
@@ -399,15 +486,21 @@ Style/ClassVars:
399
486
  - 'test/authentication/methods/test_publickey.rb'
400
487
 
401
488
  # Offense count: 1
402
- # Cop supports --auto-correct.
489
+ # This cop supports safe auto-correction (--auto-correct).
403
490
  Style/ColonMethodCall:
404
491
  Exclude:
405
492
  - 'lib/net/ssh/authentication/ed25519.rb'
406
493
 
494
+ # Offense count: 2
495
+ Style/CombinableLoops:
496
+ Exclude:
497
+ - 'lib/net/ssh/connection/channel.rb'
498
+ - 'test/integration/test_hmac_etm.rb'
499
+
407
500
  # Offense count: 4
408
- # Cop supports --auto-correct.
409
- # Configuration parameters: Keywords.
410
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
501
+ # This cop supports safe auto-correction (--auto-correct).
502
+ # Configuration parameters: Keywords, RequireColon.
503
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
411
504
  Style/CommentAnnotation:
412
505
  Exclude:
413
506
  - 'lib/net/ssh/authentication/ed25519.rb'
@@ -415,35 +508,27 @@ Style/CommentAnnotation:
415
508
  - 'lib/net/ssh/buffer.rb'
416
509
  - 'lib/net/ssh/config.rb'
417
510
 
418
- # Offense count: 4
419
- # Cop supports --auto-correct.
420
- # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
511
+ # Offense count: 3
512
+ # This cop supports safe auto-correction (--auto-correct).
513
+ Style/CommentedKeyword:
514
+ Exclude:
515
+ - 'test/connection/test_session.rb'
516
+ - 'test/integration/test_forward.rb'
517
+
518
+ # Offense count: 7
519
+ # This cop supports safe auto-correction (--auto-correct).
520
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
421
521
  # SupportedStyles: assign_to_condition, assign_inside_condition
422
522
  Style/ConditionalAssignment:
423
523
  Exclude:
424
- - 'lib/net/ssh/transport/ctr.rb'
425
- - 'lib/net/ssh/transport/state.rb'
426
- - 'test/test_key_factory.rb'
427
524
  - 'lib/net/ssh/config.rb'
428
- - 'lib/net/ssh/known_hosts.rb'
429
525
  - 'lib/net/ssh/proxy/socks5.rb'
430
526
  - 'lib/net/ssh/test/script.rb'
527
+ - 'lib/net/ssh/transport/state.rb'
528
+ - 'test/test_key_factory.rb'
431
529
 
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'
439
-
440
- # Offense count: 1
441
- # Cop supports --auto-correct.
442
- Style/DefWithParentheses:
443
- Exclude:
444
- - 'test/integration/test_forward.rb'
445
-
446
- # Offense count: 16
530
+ # Offense count: 12
531
+ # Configuration parameters: AllowedConstants.
447
532
  Style/Documentation:
448
533
  Exclude:
449
534
  - 'spec/**/*'
@@ -451,57 +536,91 @@ Style/Documentation:
451
536
  - 'lib/net/ssh/authentication/ed25519.rb'
452
537
  - 'lib/net/ssh/connection/keepalive.rb'
453
538
  - 'lib/net/ssh/connection/session.rb'
454
- - 'lib/net/ssh/ruby_compat.rb'
455
539
  - '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
540
  - 'lib/net/ssh/transport/kex.rb'
460
- - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb'
461
541
  - 'lib/net/ssh/transport/key_expander.rb'
462
542
  - 'lib/net/ssh/transport/openssl.rb'
463
543
 
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
544
+ # Offense count: 1
545
+ # This cop supports safe auto-correction (--auto-correct).
546
+ Style/EvenOdd:
547
+ Exclude:
548
+ - 'lib/net/ssh/buffer.rb'
470
549
 
471
- # Offense count: 2
472
- # Cop supports --auto-correct.
473
- Style/EmptyLiteral:
550
+ # Offense count: 9
551
+ # This cop supports safe auto-correction (--auto-correct).
552
+ Style/ExplicitBlockArgument:
474
553
  Exclude:
475
- - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
476
- - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb'
554
+ - 'lib/net/ssh/loggable.rb'
555
+ - 'lib/net/ssh/test.rb'
556
+ - 'test/integration/common.rb'
557
+ - 'test/integration/mitm_server.rb'
558
+ - 'test/integration/test_forward.rb'
559
+
560
+ # Offense count: 12
561
+ # This cop supports safe auto-correction (--auto-correct).
562
+ # Configuration parameters: AllowedVars.
563
+ Style/FetchEnvVar:
564
+ Exclude:
565
+ - 'lib/net/ssh.rb'
566
+ - 'lib/net/ssh/authentication/agent.rb'
567
+ - 'lib/net/ssh/authentication/methods/hostbased.rb'
568
+ - 'test/authentication/test_agent.rb'
569
+ - 'test/common.rb'
570
+ - 'test/start/test_options.rb'
571
+ - 'test/test_all.rb'
572
+ - 'test/test_config.rb'
477
573
 
478
574
  # Offense count: 1
479
- # Cop supports --auto-correct.
480
- Style/EvenOdd:
575
+ # This cop supports safe auto-correction (--auto-correct).
576
+ Style/FileWrite:
481
577
  Exclude:
482
- - 'lib/net/ssh/buffer.rb'
578
+ - 'test/integration/test_proxy.rb'
483
579
 
484
580
  # Offense count: 2
485
- # Configuration parameters: EnforcedStyle, SupportedStyles.
581
+ # This cop supports safe auto-correction (--auto-correct).
582
+ # Configuration parameters: EnforcedStyle.
486
583
  # SupportedStyles: format, sprintf, percent
487
584
  Style/FormatString:
488
585
  Exclude:
489
586
  - 'lib/net/ssh/authentication/pageant.rb'
490
587
  - 'lib/net/ssh/loggable.rb'
491
588
 
589
+ # Offense count: 174
590
+ # This cop supports safe auto-correction (--auto-correct).
591
+ # Configuration parameters: EnforcedStyle.
592
+ # SupportedStyles: always, always_true, never
593
+ Style/FrozenStringLiteralComment:
594
+ Enabled: false
595
+
596
+ # Offense count: 1
597
+ # This cop supports safe auto-correction (--auto-correct).
598
+ Style/GlobalStdStream:
599
+ Exclude:
600
+ - 'lib/net/ssh.rb'
601
+
492
602
  # Offense count: 35
493
- # Configuration parameters: MinBodyLength.
603
+ # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
494
604
  Style/GuardClause:
495
605
  Enabled: false
496
606
 
607
+ # Offense count: 3
608
+ # This cop supports safe auto-correction (--auto-correct).
609
+ # Configuration parameters: AllowSplatArgument.
610
+ Style/HashConversion:
611
+ Exclude:
612
+ - 'lib/net/ssh/authentication/certificate.rb'
613
+ - 'test/test_config.rb'
614
+
497
615
  # Offense count: 1
616
+ # This cop supports safe auto-correction (--auto-correct).
617
+ # Configuration parameters: AllowIfModifier.
498
618
  Style/IfInsideElse:
499
619
  Exclude:
500
620
  - 'lib/net/ssh/connection/session.rb'
501
621
 
502
- # Offense count: 9
503
- # Cop supports --auto-correct.
504
- # Configuration parameters: MaxLineLength.
622
+ # Offense count: 13
623
+ # This cop supports safe auto-correction (--auto-correct).
505
624
  Style/IfUnlessModifier:
506
625
  Exclude:
507
626
  - 'lib/net/ssh.rb'
@@ -513,115 +632,67 @@ Style/IfUnlessModifier:
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
- # Cop supports --auto-correct.
636
+ # This cop supports unsafe auto-correction (--auto-correct-all).
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
- # Cop supports --auto-correct.
642
+ # This cop supports safe auto-correction (--auto-correct).
551
643
  Style/LineEndConcatenation:
552
644
  Exclude:
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:
650
+ # Offense count: 1
651
+ # This cop supports unsafe auto-correction (--auto-correct-all).
652
+ Style/MapToHash:
573
653
  Exclude:
574
- - 'test/common.rb'
575
- - 'test/integration/common.rb'
654
+ - 'lib/net/ssh/config.rb'
576
655
 
577
656
  # Offense count: 1
578
- Style/MethodMissing:
657
+ Style/MissingRespondToMissing:
579
658
  Exclude:
580
659
  - 'lib/net/ssh/connection/session.rb'
581
660
 
582
- # Offense count: 24
583
- # Configuration parameters: EnforcedStyle, SupportedStyles.
584
- # SupportedStyles: snake_case, camelCase
585
- Naming/MethodName:
586
- 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'
594
-
595
661
  # Offense count: 3
596
- # Cop supports --auto-correct.
662
+ # This cop supports safe auto-correction (--auto-correct).
597
663
  Style/MultilineIfThen:
598
664
  Exclude:
599
665
  - 'lib/net/ssh/buffered_io.rb'
600
666
  - 'lib/net/ssh/service/forward.rb'
601
667
 
602
- # Offense count: 23
603
- # Cop supports --auto-correct.
604
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
605
- # SupportedStyles: aligned, indented
606
- Layout/MultilineOperationIndentation:
668
+ # Offense count: 7
669
+ # This cop supports safe auto-correction (--auto-correct).
670
+ Style/MultilineWhenThen:
671
+ Exclude:
672
+ - 'lib/net/ssh/transport/packet_stream.rb'
673
+ - 'lib/net/ssh/transport/session.rb'
674
+
675
+ # Offense count: 5
676
+ # This cop supports safe auto-correction (--auto-correct).
677
+ # Configuration parameters: AllowMethodComparison.
678
+ Style/MultipleComparison:
607
679
  Exclude:
680
+ - 'lib/net/ssh/authentication/agent.rb'
608
681
  - 'lib/net/ssh/authentication/pageant.rb'
609
682
  - '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'
683
+ - 'lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb'
617
684
 
618
- # Offense count: 40
619
- # Cop supports --auto-correct.
685
+ # Offense count: 42
686
+ # This cop supports safe auto-correction (--auto-correct).
687
+ # Configuration parameters: EnforcedStyle.
688
+ # SupportedStyles: literals, strict
620
689
  Style/MutableConstant:
621
690
  Enabled: false
622
691
 
623
- # Offense count: 13
624
- # Cop supports --auto-correct.
692
+ # Offense count: 14
693
+ # This cop supports safe auto-correction (--auto-correct).
694
+ # Configuration parameters: EnforcedStyle.
695
+ # SupportedStyles: both, prefix, postfix
625
696
  Style/NegatedIf:
626
697
  Exclude:
627
698
  - 'lib/net/ssh.rb'
@@ -634,57 +705,82 @@ Style/NegatedIf:
634
705
  - 'test/test_key_factory.rb'
635
706
  - 'test/transport/test_state.rb'
636
707
 
708
+ # Offense count: 2
709
+ # This cop supports safe auto-correction (--auto-correct).
710
+ Style/NegatedIfElseCondition:
711
+ Exclude:
712
+ - 'lib/net/ssh/transport/algorithms.rb'
713
+ - 'lib/net/ssh/transport/cipher_factory.rb'
714
+
637
715
  # Offense count: 1
638
- # Cop supports --auto-correct.
716
+ # This cop supports safe auto-correction (--auto-correct).
639
717
  Style/NegatedWhile:
640
718
  Exclude:
641
719
  - 'lib/net/ssh/config.rb'
642
720
 
643
- # Offense count: 2
644
- # Cop supports --auto-correct.
645
- # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
721
+ # Offense count: 1
722
+ # This cop supports safe auto-correction (--auto-correct).
723
+ # Configuration parameters: EnforcedStyle, MinBodyLength.
646
724
  # SupportedStyles: skip_modifier_ifs, always
647
725
  Style/Next:
648
726
  Exclude:
649
727
  - 'lib/net/ssh/authentication/key_manager.rb'
650
- - 'lib/net/ssh/transport/algorithms.rb'
651
728
 
652
- # Offense count: 2
653
- # Cop supports --auto-correct.
729
+ # Offense count: 1
730
+ # This cop supports safe auto-correction (--auto-correct).
731
+ # Configuration parameters: EnforcedStyle.
732
+ # SupportedStyles: predicate, comparison
654
733
  Style/NilComparison:
655
734
  Exclude:
656
735
  - 'lib/net/ssh/proxy/command.rb'
657
- - 'lib/net/ssh/transport/openssl.rb'
658
736
 
659
737
  # Offense count: 3
660
- # Cop supports --auto-correct.
738
+ # This cop supports safe auto-correction (--auto-correct).
661
739
  Style/Not:
662
740
  Exclude:
663
741
  - 'lib/net/ssh/connection/channel.rb'
664
742
 
665
- # Offense count: 7
666
- # Cop supports --auto-correct.
743
+ # Offense count: 11
744
+ # This cop supports safe auto-correction (--auto-correct).
745
+ # Configuration parameters: Strict, AllowedNumbers.
667
746
  Style/NumericLiterals:
668
747
  MinDigits: 310
669
748
 
670
- # Offense count: 11
671
- # Cop supports --auto-correct.
672
- # Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
749
+ # Offense count: 29
750
+ # This cop supports unsafe auto-correction (--auto-correct-all).
751
+ # Configuration parameters: EnforcedStyle, IgnoredMethods.
673
752
  # SupportedStyles: predicate, comparison
674
753
  Style/NumericPredicate:
754
+ Enabled: false
755
+
756
+ # Offense count: 13
757
+ Style/OpenStructUse:
675
758
  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'
759
+ - 'test/authentication/test_ed25519.rb'
760
+ - 'test/common.rb'
761
+ - 'test/transport/kex/test_curve25519_sha256.rb'
762
+ - 'test/transport/kex/test_diffie_hellman_group1_sha1.rb'
763
+ - 'test/transport/kex/test_ecdh_sha2_nistp256.rb'
764
+ - 'test/verifiers/test_always.rb'
765
+
766
+ # Offense count: 16
767
+ # Configuration parameters: AllowedMethods.
768
+ # AllowedMethods: respond_to_missing?
769
+ Style/OptionalBooleanParameter:
770
+ Exclude:
771
+ - 'lib/net/ssh/connection/session.rb'
772
+ - 'lib/net/ssh/key_factory.rb'
773
+ - 'lib/net/ssh/prompt.rb'
774
+ - 'lib/net/ssh/test/channel.rb'
775
+ - 'lib/net/ssh/test/script.rb'
776
+ - 'lib/net/ssh/transport/algorithms.rb'
777
+ - 'lib/net/ssh/transport/session.rb'
778
+ - 'lib/net/ssh/transport/state.rb'
779
+ - 'test/common.rb'
780
+ - 'test/transport/test_server_version.rb'
685
781
 
686
782
  # Offense count: 15
687
- # Cop supports --auto-correct.
783
+ # This cop supports safe auto-correction (--auto-correct).
688
784
  Style/ParallelAssignment:
689
785
  Exclude:
690
786
  - 'lib/net/ssh/config.rb'
@@ -697,28 +793,26 @@ Style/ParallelAssignment:
697
793
  - 'test/common.rb'
698
794
  - 'test/connection/test_channel.rb'
699
795
 
700
- # Offense count: 7
701
- # Cop supports --auto-correct.
702
- # Configuration parameters: AllowSafeAssignment.
796
+ # Offense count: 5
797
+ # This cop supports safe auto-correction (--auto-correct).
798
+ # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
703
799
  Style/ParenthesesAroundCondition:
704
800
  Exclude:
705
801
  - 'lib/net/ssh/authentication/ed25519.rb'
706
802
  - 'lib/net/ssh/service/forward.rb'
707
- - 'lib/net/ssh/transport/cipher_factory.rb'
708
803
  - 'lib/net/ssh/transport/ctr.rb'
709
804
  - 'test/integration/test_proxy.rb'
710
805
 
711
- # Offense count: 5
712
- # Cop supports --auto-correct.
806
+ # Offense count: 23
807
+ # This cop supports safe auto-correction (--auto-correct).
713
808
  # Configuration parameters: PreferredDelimiters.
714
809
  Style/PercentLiteralDelimiters:
715
810
  Exclude:
716
- - 'Rakefile'
717
811
  - 'net-ssh.gemspec'
718
812
  - 'test/test_config.rb'
719
813
 
720
- # Offense count: 16
721
- # Cop supports --auto-correct.
814
+ # Offense count: 17
815
+ # This cop supports safe auto-correction (--auto-correct).
722
816
  Style/PerlBackrefs:
723
817
  Exclude:
724
818
  - 'lib/net/ssh/buffer.rb'
@@ -726,11 +820,10 @@ Style/PerlBackrefs:
726
820
  - 'lib/net/ssh/key_factory.rb'
727
821
  - 'lib/net/ssh/proxy/command.rb'
728
822
  - 'lib/net/ssh/proxy/socks5.rb'
729
- - 'lib/net/ssh/transport/openssl.rb'
730
823
  - 'test/integration/common.rb'
731
824
 
732
- # Offense count: 14
733
- # Cop supports --auto-correct.
825
+ # Offense count: 15
826
+ # This cop supports safe auto-correction (--auto-correct).
734
827
  Style/Proc:
735
828
  Exclude:
736
829
  - 'lib/net/ssh/connection/session.rb'
@@ -743,69 +836,128 @@ Style/Proc:
743
836
  - 'test/connection/test_session.rb'
744
837
 
745
838
  # Offense count: 7
746
- # Cop supports --auto-correct.
747
- # Configuration parameters: EnforcedStyle, SupportedStyles.
839
+ # This cop supports safe auto-correction (--auto-correct).
840
+ # Configuration parameters: EnforcedStyle, AllowedCompactTypes.
748
841
  # SupportedStyles: compact, exploded
749
842
  Style/RaiseArgs:
750
843
  Exclude:
751
844
  - 'lib/net/ssh/authentication/ed25519.rb'
752
845
 
753
- # Offense count: 4
754
- # Cop supports --auto-correct.
846
+ # Offense count: 6
847
+ # This cop supports unsafe auto-correction (--auto-correct-all).
848
+ # Configuration parameters: Methods.
849
+ Style/RedundantArgument:
850
+ Exclude:
851
+ - 'lib/net/ssh/known_hosts.rb'
852
+ - 'test/authentication/test_ed25519.rb'
853
+
854
+ # Offense count: 5
855
+ # This cop supports safe auto-correction (--auto-correct).
755
856
  Style/RedundantBegin:
756
857
  Exclude:
757
858
  - 'lib/net/ssh/buffered_io.rb'
859
+ - 'lib/net/ssh/service/forward.rb'
758
860
  - 'lib/net/ssh/verifiers/accept_new.rb'
759
861
  - 'test/manual/test_pageant.rb'
760
862
 
761
863
  # Offense count: 1
762
- # Cop supports --auto-correct.
763
- Style/RedundantParentheses:
864
+ # This cop supports safe auto-correction (--auto-correct).
865
+ Style/RedundantCondition:
866
+ Exclude:
867
+ - 'lib/net/ssh/proxy/command.rb'
868
+
869
+ # Offense count: 1
870
+ # This cop supports safe auto-correction (--auto-correct).
871
+ Style/RedundantFileExtensionInRequire:
872
+ Exclude:
873
+ - 'lib/net/ssh/transport/cipher_factory.rb'
874
+
875
+ # Offense count: 2
876
+ # This cop supports safe auto-correction (--auto-correct).
877
+ Style/RedundantInterpolation:
878
+ Exclude:
879
+ - 'lib/net/ssh/proxy/socks5.rb'
880
+ - 'lib/net/ssh/transport/session.rb'
881
+
882
+ # Offense count: 2
883
+ # This cop supports safe auto-correction (--auto-correct).
884
+ Style/RedundantPercentQ:
764
885
  Exclude:
765
- - 'support/arcfour_check.rb'
886
+ - 'net-ssh.gemspec'
887
+
888
+ # Offense count: 11
889
+ # This cop supports safe auto-correction (--auto-correct).
890
+ Style/RedundantRegexpEscape:
891
+ Exclude:
892
+ - 'lib/net/ssh/authentication/agent.rb'
893
+ - 'lib/net/ssh/buffer.rb'
894
+ - 'lib/net/ssh/config.rb'
895
+ - 'lib/net/ssh/transport/cipher_factory.rb'
766
896
 
767
- # Offense count: 57
768
- # Cop supports --auto-correct.
897
+ # Offense count: 87
898
+ # This cop supports safe auto-correction (--auto-correct).
769
899
  # Configuration parameters: AllowMultipleReturnValues.
770
900
  Style/RedundantReturn:
771
901
  Enabled: false
772
902
 
773
- # Offense count: 11
774
- # Cop supports --auto-correct.
903
+ # Offense count: 18
904
+ # This cop supports safe auto-correction (--auto-correct).
775
905
  Style/RedundantSelf:
776
906
  Exclude:
777
- - 'lib/net/ssh/authentication/ed25519.rb'
778
907
  - 'lib/net/ssh/connection/channel.rb'
779
908
  - 'lib/net/ssh/test/extensions.rb'
780
- - 'lib/net/ssh/transport/openssl.rb'
781
909
  - 'test/authentication/test_ed25519.rb'
782
910
 
783
- # Offense count: 4
784
- # Cop supports --auto-correct.
911
+ # Offense count: 6
912
+ # This cop supports safe auto-correction (--auto-correct).
785
913
  Style/RescueModifier:
786
914
  Exclude:
787
915
  - 'lib/net/ssh/service/forward.rb'
788
916
  - 'lib/net/ssh/transport/algorithms.rb'
789
917
 
790
- # Offense count: 1
791
- # Cop supports --auto-correct.
918
+ # Offense count: 25
919
+ # This cop supports safe auto-correction (--auto-correct).
920
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
921
+ # AllowedMethods: present?, blank?, presence, try, try!
922
+ Style/SafeNavigation:
923
+ Exclude:
924
+ - 'lib/net/ssh/authentication/key_manager.rb'
925
+ - 'lib/net/ssh/authentication/methods/keyboard_interactive.rb'
926
+ - 'lib/net/ssh/authentication/methods/password.rb'
927
+ - 'lib/net/ssh/authentication/session.rb'
928
+ - 'lib/net/ssh/connection/channel.rb'
929
+ - 'lib/net/ssh/connection/event_loop.rb'
930
+ - 'lib/net/ssh/connection/session.rb'
931
+ - 'lib/net/ssh/key_factory.rb'
932
+ - 'lib/net/ssh/loggable.rb'
933
+ - 'lib/net/ssh/test/local_packet.rb'
934
+ - 'lib/net/ssh/transport/algorithms.rb'
935
+ - 'lib/net/ssh/transport/packet_stream.rb'
936
+
937
+ # Offense count: 3
938
+ # This cop supports safe auto-correction (--auto-correct).
939
+ Style/SelectByRegexp:
940
+ Exclude:
941
+ - 'test/test_all.rb'
942
+
943
+ # Offense count: 2
944
+ # This cop supports safe auto-correction (--auto-correct).
792
945
  Style/SelfAssignment:
793
946
  Exclude:
794
947
  - 'lib/net/ssh/config.rb'
795
948
 
796
- # Offense count: 8
797
- # Cop supports --auto-correct.
949
+ # Offense count: 7
950
+ # This cop supports safe auto-correction (--auto-correct).
798
951
  # Configuration parameters: AllowAsExpressionSeparator.
799
952
  Style/Semicolon:
800
953
  Exclude:
801
954
  - 'lib/net/ssh/buffer.rb'
802
955
  - 'test/connection/test_channel.rb'
803
956
  - 'test/connection/test_session.rb'
804
- - 'test/transport/kex/test_ecdh_sha2_nistp256.rb'
805
957
 
806
958
  # Offense count: 2
807
- # Cop supports --auto-correct.
808
- # Configuration parameters: EnforcedStyle, SupportedStyles.
959
+ # This cop supports safe auto-correction (--auto-correct).
960
+ # Configuration parameters: EnforcedStyle.
809
961
  # SupportedStyles: only_raise, only_fail, semantic
810
962
  Style/SignalException:
811
963
  Exclude:
@@ -813,58 +965,37 @@ Style/SignalException:
813
965
  - 'lib/net/ssh/connection/channel.rb'
814
966
 
815
967
  # Offense count: 2
816
- # Cop supports --auto-correct.
968
+ # This cop supports safe auto-correction (--auto-correct).
817
969
  # Configuration parameters: AllowIfMethodIsEmpty.
818
970
  Style/SingleLineMethods:
819
971
  Exclude:
820
972
  - 'lib/net/ssh/buffered_io.rb'
821
973
 
822
- # Offense count: 16
823
- # Cop supports --auto-correct.
824
- Layout/SpaceAfterColon:
974
+ # Offense count: 11
975
+ # This cop supports unsafe auto-correction (--auto-correct-all).
976
+ Style/SlicingWithRange:
825
977
  Exclude:
826
978
  - '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
979
+ - 'lib/net/ssh/buffer.rb'
980
+ - 'lib/net/ssh/config.rb'
981
+ - 'lib/net/ssh/transport/algorithms.rb'
982
+ - 'lib/net/ssh/transport/packet_stream.rb'
983
+ - 'lib/net/ssh/transport/state.rb'
984
+ - 'test/transport/test_packet_stream.rb'
841
985
 
842
986
  # 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:
987
+ # This cop supports safe auto-correction (--auto-correct).
988
+ # Configuration parameters: AllowModifier.
989
+ Style/SoleNestedConditional:
856
990
  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'
991
+ - 'lib/net/ssh/transport/packet_stream.rb'
992
+ - 'test/common.rb'
993
+ - 'test/integration/test_proxy.rb'
863
994
 
864
- # Offense count: 22
865
- # Cop supports --auto-correct.
866
- # Configuration parameters: EnforcedStyle, SupportedStyles.
867
- # SupportedStyles: use_perl_names, use_english_names
995
+ # Offense count: 18
996
+ # This cop supports safe auto-correction (--auto-correct).
997
+ # Configuration parameters: RequireEnglish, EnforcedStyle.
998
+ # SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names
868
999
  Style/SpecialGlobalVars:
869
1000
  Exclude:
870
1001
  - 'lib/net/ssh/authentication/agent.rb'
@@ -874,19 +1005,40 @@ Style/SpecialGlobalVars:
874
1005
  - 'test/integration/test_forward.rb'
875
1006
  - 'test/manual/test_pageant.rb'
876
1007
  - 'test/test_all.rb'
877
- - 'test_connection_close_shall_close_cannels.rb'
878
- - 'test_kerberos_client2.rb'
879
1008
 
880
- # Offense count: 1846
881
- # Cop supports --auto-correct.
882
- # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
1009
+ # Offense count: 1
1010
+ # This cop supports unsafe auto-correction (--auto-correct-all).
1011
+ Style/StringChars:
1012
+ Exclude:
1013
+ - 'test/transport/test_server_version.rb'
1014
+
1015
+ # Offense count: 27
1016
+ # This cop supports unsafe auto-correction (--auto-correct-all).
1017
+ # Configuration parameters: Mode.
1018
+ Style/StringConcatenation:
1019
+ Exclude:
1020
+ - 'lib/net/ssh/authentication/certificate.rb'
1021
+ - 'lib/net/ssh/authentication/key_manager.rb'
1022
+ - 'lib/net/ssh/authentication/pageant.rb'
1023
+ - 'lib/net/ssh/config.rb'
1024
+ - 'lib/net/ssh/transport/algorithms.rb'
1025
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
1026
+ - 'test/authentication/test_key_manager.rb'
1027
+ - 'test/integration/common.rb'
1028
+ - 'test/integration/test_proxy.rb'
1029
+ - 'test/test_buffer.rb'
1030
+ - 'test/test_key_factory.rb'
1031
+
1032
+ # Offense count: 1849
1033
+ # This cop supports safe auto-correction (--auto-correct).
1034
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
883
1035
  # SupportedStyles: single_quotes, double_quotes
884
1036
  Style/StringLiterals:
885
1037
  Enabled: false
886
1038
 
887
- # Offense count: 11
888
- # Cop supports --auto-correct.
889
- # Configuration parameters: IgnoredMethods.
1039
+ # Offense count: 6
1040
+ # This cop supports unsafe auto-correction (--auto-correct-all).
1041
+ # Configuration parameters: AllowMethodsWithArguments, IgnoredMethods, AllowComments.
890
1042
  # IgnoredMethods: respond_to, define_method
891
1043
  Style/SymbolProc:
892
1044
  Exclude:
@@ -894,76 +1046,36 @@ Style/SymbolProc:
894
1046
  - 'lib/net/ssh/buffer.rb'
895
1047
  - 'lib/net/ssh/connection/session.rb'
896
1048
  - 'lib/net/ssh/test/extensions.rb'
897
- - 'lib/net/ssh/transport/algorithms.rb'
898
- - 'test/integration/test_forward.rb'
899
- - 'test/test/test_test.rb'
900
-
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
1049
 
908
- # Offense count: 66
909
- # Cop supports --auto-correct.
910
- Layout/TrailingWhitespace:
911
- Enabled: false
912
-
913
- # Offense count: 1
914
- # 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:
918
- Exclude:
919
- - 'test/transport/kex/test_diffie_hellman_group1_sha1.rb'
920
-
921
- # Offense count: 6
922
- # Cop supports --auto-correct.
923
- Style/UnlessElse:
1050
+ # Offense count: 14
1051
+ # This cop supports safe auto-correction (--auto-correct).
1052
+ Style/UnpackFirst:
924
1053
  Exclude:
1054
+ - 'lib/net/ssh/authentication/pageant.rb'
925
1055
  - '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'
931
-
932
- # Offense count: 4
933
- # Cop supports --auto-correct.
934
- Style/UnneededInterpolation:
935
- Exclude:
936
- - 'lib/net/ssh/proxy/socks5.rb'
937
- - 'lib/net/ssh/transport/session.rb'
938
- - 'test/integration/test_forward.rb'
939
-
940
- # Offense count: 4
941
- # Cop supports --auto-correct.
942
- Style/UnneededPercentQ:
943
- Exclude:
944
- - 'net-ssh.gemspec'
945
- - 'test/test_config.rb'
1056
+ - 'lib/net/ssh/key_factory.rb'
1057
+ - 'lib/net/ssh/known_hosts.rb'
1058
+ - 'lib/net/ssh/transport/openssl.rb'
1059
+ - 'lib/net/ssh/transport/packet_stream.rb'
946
1060
 
947
1061
  # Offense count: 2
948
- # Cop supports --auto-correct.
1062
+ # This cop supports safe auto-correction (--auto-correct).
949
1063
  Style/WhileUntilDo:
950
1064
  Exclude:
951
1065
  - 'lib/net/ssh/config.rb'
952
1066
  - 'test/integration/common.rb'
953
1067
 
954
- # Offense count: 3
955
- # Cop supports --auto-correct.
956
- # Configuration parameters: SupportedStyles, WordRegex.
1068
+ # Offense count: 4
1069
+ # This cop supports safe auto-correction (--auto-correct).
1070
+ # Configuration parameters: WordRegex.
957
1071
  # SupportedStyles: percent, brackets
958
1072
  Style/WordArray:
959
1073
  EnforcedStyle: percent
960
1074
  MinSize: 3
961
1075
 
962
- # Offense count: 7
963
- # Cop supports --auto-correct.
1076
+ # Offense count: 4
1077
+ # This cop supports unsafe auto-correction (--auto-correct-all).
964
1078
  Style/ZeroLengthPredicate:
965
1079
  Exclude:
966
1080
  - 'lib/net/ssh/buffered_io.rb'
967
1081
  - 'lib/net/ssh/connection/channel.rb'
968
- - 'test/integration/test_forward.rb'
969
- - 'test_connection_close_shall_close_cannels.rb'