net-ssh 6.2.0.rc2 → 6.3.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.github/workflows/ci.yml +27 -10
  5. data/.rubocop.yml +11 -1
  6. data/.rubocop_todo.yml +374 -173
  7. data/.travis.yml +10 -11
  8. data/CHANGES.txt +6 -0
  9. data/Gemfile +2 -0
  10. data/Gemfile.noed25519 +2 -0
  11. data/README.md +2 -2
  12. data/Rakefile +1 -0
  13. data/lib/net/ssh.rb +1 -2
  14. data/lib/net/ssh/authentication/agent.rb +4 -2
  15. data/lib/net/ssh/authentication/certificate.rb +3 -1
  16. data/lib/net/ssh/authentication/constants.rb +0 -1
  17. data/lib/net/ssh/authentication/ed25519.rb +6 -2
  18. data/lib/net/ssh/authentication/ed25519_loader.rb +4 -7
  19. data/lib/net/ssh/authentication/key_manager.rb +28 -29
  20. data/lib/net/ssh/authentication/methods/abstract.rb +0 -1
  21. data/lib/net/ssh/authentication/methods/hostbased.rb +0 -2
  22. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +1 -1
  23. data/lib/net/ssh/authentication/methods/none.rb +5 -8
  24. data/lib/net/ssh/authentication/methods/password.rb +1 -2
  25. data/lib/net/ssh/authentication/methods/publickey.rb +0 -2
  26. data/lib/net/ssh/authentication/pageant.rb +89 -89
  27. data/lib/net/ssh/authentication/session.rb +14 -15
  28. data/lib/net/ssh/buffer.rb +10 -5
  29. data/lib/net/ssh/buffered_io.rb +18 -19
  30. data/lib/net/ssh/config.rb +29 -16
  31. data/lib/net/ssh/connection/channel.rb +71 -69
  32. data/lib/net/ssh/connection/constants.rb +0 -4
  33. data/lib/net/ssh/connection/event_loop.rb +22 -16
  34. data/lib/net/ssh/connection/keepalive.rb +12 -12
  35. data/lib/net/ssh/connection/session.rb +95 -94
  36. data/lib/net/ssh/connection/term.rb +56 -58
  37. data/lib/net/ssh/errors.rb +10 -10
  38. data/lib/net/ssh/key_factory.rb +0 -1
  39. data/lib/net/ssh/known_hosts.rb +79 -11
  40. data/lib/net/ssh/loggable.rb +8 -9
  41. data/lib/net/ssh/packet.rb +1 -1
  42. data/lib/net/ssh/prompt.rb +8 -10
  43. data/lib/net/ssh/proxy/command.rb +1 -1
  44. data/lib/net/ssh/proxy/errors.rb +2 -4
  45. data/lib/net/ssh/proxy/http.rb +17 -19
  46. data/lib/net/ssh/proxy/https.rb +6 -8
  47. data/lib/net/ssh/proxy/jump.rb +8 -10
  48. data/lib/net/ssh/proxy/socks4.rb +1 -3
  49. data/lib/net/ssh/proxy/socks5.rb +2 -4
  50. data/lib/net/ssh/service/forward.rb +3 -3
  51. data/lib/net/ssh/test.rb +1 -2
  52. data/lib/net/ssh/test/channel.rb +20 -22
  53. data/lib/net/ssh/test/extensions.rb +29 -29
  54. data/lib/net/ssh/test/kex.rb +6 -8
  55. data/lib/net/ssh/test/local_packet.rb +0 -2
  56. data/lib/net/ssh/test/packet.rb +2 -2
  57. data/lib/net/ssh/test/remote_packet.rb +5 -7
  58. data/lib/net/ssh/test/script.rb +21 -23
  59. data/lib/net/ssh/test/socket.rb +11 -14
  60. data/lib/net/ssh/transport/algorithms.rb +2 -1
  61. data/lib/net/ssh/transport/cipher_factory.rb +13 -13
  62. data/lib/net/ssh/transport/constants.rb +3 -3
  63. data/lib/net/ssh/transport/ctr.rb +4 -4
  64. data/lib/net/ssh/transport/hmac/abstract.rb +0 -1
  65. data/lib/net/ssh/transport/hmac/md5.rb +0 -2
  66. data/lib/net/ssh/transport/hmac/md5_96.rb +0 -2
  67. data/lib/net/ssh/transport/hmac/none.rb +0 -2
  68. data/lib/net/ssh/transport/hmac/ripemd160.rb +0 -2
  69. data/lib/net/ssh/transport/hmac/sha1.rb +0 -2
  70. data/lib/net/ssh/transport/hmac/sha1_96.rb +0 -2
  71. data/lib/net/ssh/transport/identity_cipher.rb +10 -12
  72. data/lib/net/ssh/transport/kex.rb +2 -0
  73. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +1 -0
  74. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +4 -4
  75. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb +11 -0
  76. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +0 -1
  77. data/lib/net/ssh/transport/key_expander.rb +6 -7
  78. data/lib/net/ssh/transport/openssl.rb +6 -11
  79. data/lib/net/ssh/transport/packet_stream.rb +1 -2
  80. data/lib/net/ssh/transport/server_version.rb +17 -16
  81. data/lib/net/ssh/transport/session.rb +3 -1
  82. data/lib/net/ssh/transport/state.rb +42 -42
  83. data/lib/net/ssh/verifiers/accept_new.rb +0 -2
  84. data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +1 -2
  85. data/lib/net/ssh/verifiers/always.rb +6 -4
  86. data/lib/net/ssh/verifiers/never.rb +0 -2
  87. data/lib/net/ssh/version.rb +2 -2
  88. data/net-ssh-public_cert.pem +8 -8
  89. data/net-ssh.gemspec +2 -2
  90. data/support/ssh_tunnel_bug.rb +3 -3
  91. metadata +14 -13
  92. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41c56dfbc79ea932b949dfc90f27bf3377cdbd3a48c32fd409db872562f38491
4
- data.tar.gz: 648aeea80bec0e871f4c8e26ea7e24773fbd8de8a0e8ccb305b00a3f96c53172
3
+ metadata.gz: ddf80df0abbe9491bb495cb7ee38f37b0582618ff93eaf57a7d0321102173e4f
4
+ data.tar.gz: 7fb21128c0934186af8551133f4c643e39ecd9073920667c83e5a5fc5af9ee2d
5
5
  SHA512:
6
- metadata.gz: 50ded00bb7ce3aa76167557dad7f2840d047c7861a5d3480fe3141bc67ccdcf502fd3a2dd4d1097d21467ec7cf83d1decd14809581e2203851eca52f083b1844
7
- data.tar.gz: '056481ae85b0919dac4b75cd7434ea921c4fa248a050ef3d6b19d0c38ac49e6f0824731c192d6a242f2b6eba5c684e28244f9b8d15341a5ead44db3aac1d48ea'
6
+ metadata.gz: b7908f84414cea86fd33a2abb4a5d6020bb208a989b3907e7e0f399a798403cbae0a92eb6272f06fcd4092637ee68e9f0e1f459e6eb23a63457d09918d546e11
7
+ data.tar.gz: 987cdf783c522b2f65e8184ee4c14af3ce373ccfbff7f7a0023b56e239da409270b639dba1848f80dde4b33b0bbe3c6e384174765dd9ea1b388cb7d3e09684a7
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,11 +1,16 @@
1
1
  name: CI
2
- on: [pull_request]
2
+ on: [push, pull_request]
3
3
  jobs:
4
4
  test:
5
- runs-on: ubuntu-latest
5
+ runs-on: ubuntu-18.04
6
+ continue-on-error: ${{ matrix.flaky }}
6
7
  strategy:
7
8
  matrix:
8
- ruby-version: [2.7.2, 2.6.6, 2.5.8, 2.4.10, 3.0.0]
9
+ ruby-version: [2.7.2, 2.6.6, 3.0.1]
10
+ flaky: [false]
11
+ include:
12
+ - ruby-version: 2.5.8
13
+ flaky: true
9
14
  steps:
10
15
  - uses: actions/checkout@v1
11
16
 
@@ -16,7 +21,7 @@ jobs:
16
21
  - name: Set up Python ${{ matrix.python-version }}
17
22
  uses: actions/setup-python@v2
18
23
  with:
19
- python-version: 2.7
24
+ python-version: 3.8
20
25
 
21
26
  - name: Cache bundler
22
27
  uses: actions/cache@v1
@@ -48,6 +53,12 @@ jobs:
48
53
  - name: Add to etc/hosts
49
54
  run: |
50
55
  sudo echo "127.0.0.1 gateway.netssh" | sudo tee -a /etc/hosts
56
+ - name: Check sshd_config
57
+ run: sudo cat '/etc/ssh/sshd_config' || true
58
+ - name: Check sshd_config2
59
+ run: sudo cat /etc/ssh/sshd_config.d/*.conf || true
60
+ - name: Check sshd pid
61
+ run: sudo ps aux | grep sshd
51
62
  - name: Ansible install
52
63
  run: |
53
64
  python -m pip install --upgrade pip
@@ -58,19 +69,25 @@ jobs:
58
69
  export
59
70
  who am i
60
71
  ansible-playbook ./test/integration/playbook.yml -i "localhost," --become -c local -e 'no_rvm=true' -e 'myuser=runner' -e 'mygroup=runner' -e 'homedir=/home/runner'
72
+ - name: Check sshd_config
73
+ run: sudo cat '/etc/ssh/sshd_config' || true
74
+ - name: Check sshd pid
75
+ run: sudo ps aux | grep sshd
76
+ - name: Check sshd_config2
77
+ run: sudo cat /etc/ssh/sshd_config.d/*.conf || true
61
78
  - name: Run Tests
62
79
  run: bundle exec rake test
63
80
  env:
64
- NET_SSH_RUN_INTEGRATION_TESTS_DISABLED: 1
81
+ NET_SSH_RUN_INTEGRATION_TESTS: 1
82
+ CI: 1
65
83
  - name: Run Tests (without ed25519)
66
84
  run: bundle exec rake test
67
85
  env:
68
86
  BUNDLE_GEMFILE: ./Gemfile.noed25519
69
- NET_SSH_RUN_INTEGRATION_TESTS_DISABLED: 1
87
+ NET_SSH_RUN_INTEGRATION_TESTS: 1
88
+ CI: 1
70
89
  - name: Run test helper test
71
90
  run: bundle exec rake test_test
72
91
  - name: Rubocop
73
- if: matrix.ruby-version != '3.0.0'
74
- run: bundle exec rubocop
75
-
76
-
92
+ if: matrix.ruby-version == '3.0.1'
93
+ run: bundle exec rubocop --fail-level C -f s
data/.rubocop.yml CHANGED
@@ -1,11 +1,21 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'tryout/**/*'
4
+ - "vendor/**/.*"
5
+ - "vendor/**/*"
6
+ NewCops: enable
7
+
1
8
  inherit_from: .rubocop_todo.yml
2
9
 
3
10
  Style/DoubleNegation:
4
11
  Exclude:
5
12
  - 'lib/net/ssh/key_factory.rb'
6
13
 
7
- Metrics/LineLength:
14
+ Layout/LineLength:
8
15
  Max: 150
9
16
  Exclude:
10
17
  - 'test/**/*.rb'
11
18
  - 'net-ssh.gemspec'
19
+
20
+ Style/EmptyLiteral:
21
+ Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -1,45 +1,39 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-05-29 10:37:36 +0200 using RuboCop version 0.74.0.
3
+ # on 2021-07-01 20:27:30 UTC using RuboCop version 1.17.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: 1
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'net-ssh.gemspec'
15
+
9
16
  # Offense count: 75
10
17
  # Cop supports --auto-correct.
11
18
  # Configuration parameters: EnforcedStyle, IndentationWidth.
12
19
  # SupportedStyles: with_first_argument, with_fixed_indentation
13
- Layout/AlignArguments:
20
+ Layout/ArgumentAlignment:
14
21
  Enabled: false
15
22
 
16
- # Offense count: 63
23
+ # Offense count: 35
17
24
  # Cop supports --auto-correct.
18
25
  # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
19
26
  # SupportedHashRocketStyles: key, separator, table
20
27
  # SupportedColonStyles: key, separator, table
21
28
  # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
22
- Layout/AlignHash:
29
+ Layout/HashAlignment:
23
30
  Exclude:
24
31
  - 'lib/net/ssh/key_factory.rb'
25
32
  - 'lib/net/ssh/transport/cipher_factory.rb'
26
33
  - 'lib/net/ssh/transport/hmac.rb'
27
34
  - 'lib/net/ssh/transport/kex.rb'
28
- - 'test/test_config.rb'
29
35
 
30
- # Offense count: 70
31
- # Cop supports --auto-correct.
32
- Layout/EmptyLineAfterGuardClause:
33
- Enabled: false
34
-
35
- # Offense count: 172
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
41
-
42
- # Offense count: 23
36
+ # Offense count: 8
43
37
  # Cop supports --auto-correct.
44
38
  # Configuration parameters: EnforcedStyle, IndentationWidth.
45
39
  # SupportedStyles: aligned, indented
@@ -50,18 +44,8 @@ Layout/MultilineOperationIndentation:
50
44
  - 'lib/net/ssh/transport/algorithms.rb'
51
45
  - 'lib/net/ssh/transport/state.rb'
52
46
  - 'lib/net/ssh/verifiers/always.rb'
53
- - 'test/authentication/methods/test_hostbased.rb'
54
- - 'test/authentication/methods/test_publickey.rb'
55
-
56
- # Offense count: 16
57
- # Cop supports --auto-correct.
58
- Layout/SpaceAfterColon:
59
- Exclude:
60
- - 'lib/net/ssh/authentication/ed25519.rb'
61
- - 'test/integration/test_ed25519_pkeys.rb'
62
- - 'test/verifiers/test_always.rb'
63
47
 
64
- # Offense count: 291
48
+ # Offense count: 290
65
49
  # Cop supports --auto-correct.
66
50
  Layout/SpaceAfterComma:
67
51
  Enabled: false
@@ -73,7 +57,7 @@ Layout/SpaceAfterComma:
73
57
  Layout/SpaceAroundEqualsInParameterDefault:
74
58
  Enabled: false
75
59
 
76
- # Offense count: 12
60
+ # Offense count: 5
77
61
  # Cop supports --auto-correct.
78
62
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
79
63
  # SupportedStyles: space, no_space
@@ -83,9 +67,6 @@ Layout/SpaceInsideBlockBraces:
83
67
  - 'lib/net/ssh/authentication/session.rb'
84
68
  - 'lib/net/ssh/transport/ctr.rb'
85
69
  - 'support/ssh_tunnel_bug.rb'
86
- - 'test/authentication/test_agent.rb'
87
- - 'test/authentication/test_key_manager.rb'
88
- - 'test/start/test_user_nil.rb'
89
70
 
90
71
  # Offense count: 6
91
72
  # Cop supports --auto-correct.
@@ -96,12 +77,6 @@ Layout/SpaceInsideReferenceBrackets:
96
77
  Exclude:
97
78
  - 'lib/net/ssh/transport/algorithms.rb'
98
79
 
99
- # Offense count: 730
100
- # Cop supports --auto-correct.
101
- # Configuration parameters: AllowInHeredoc.
102
- Layout/TrailingWhitespace:
103
- Enabled: false
104
-
105
80
  # Offense count: 4
106
81
  # Configuration parameters: AllowSafeAssignment.
107
82
  Lint/AssignmentInCondition:
@@ -111,21 +86,29 @@ Lint/AssignmentInCondition:
111
86
  - 'lib/net/ssh/proxy/command.rb'
112
87
 
113
88
  # Offense count: 1
114
- Lint/EmptyWhen:
89
+ # Configuration parameters: AllowedMethods.
90
+ # AllowedMethods: enums
91
+ Lint/ConstantDefinitionInBlock:
115
92
  Exclude:
116
- - 'lib/net/ssh/config.rb'
93
+ - 'test/transport/test_cipher_factory.rb'
117
94
 
118
- # Offense count: 9
119
- # Configuration parameters: AllowComments.
120
- Lint/HandleExceptions:
95
+ # Offense count: 1
96
+ # Cop supports --auto-correct.
97
+ Lint/DeprecatedClassMethods:
98
+ Exclude:
99
+ - 'lib/net/ssh/transport/packet_stream.rb'
100
+
101
+ # Offense count: 10
102
+ # Cop supports --auto-correct.
103
+ Lint/DeprecatedOpenSSLConstant:
121
104
  Exclude:
122
- - 'lib/net/ssh/authentication/session.rb'
123
- - 'lib/net/ssh/known_hosts.rb'
124
105
  - 'lib/net/ssh/transport/openssl.rb'
125
- - 'test/integration/common.rb'
126
- - 'test/integration/test_forward.rb'
127
- - 'test/start/test_connection.rb'
128
- - 'test/start/test_transport.rb'
106
+
107
+ # Offense count: 1
108
+ # Configuration parameters: AllowComments.
109
+ Lint/EmptyWhen:
110
+ Exclude:
111
+ - 'lib/net/ssh/config.rb'
129
112
 
130
113
  # Offense count: 72
131
114
  Lint/ImplicitStringConcatenation:
@@ -133,40 +116,68 @@ Lint/ImplicitStringConcatenation:
133
116
  - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
134
117
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
135
118
 
136
- # Offense count: 1
137
- Lint/LiteralAsCondition:
138
- Exclude:
139
- - 'lib/net/ssh/authentication/pageant.rb'
140
-
141
119
  # Offense count: 2
120
+ # Cop supports --auto-correct.
142
121
  Lint/Loop:
143
122
  Exclude:
144
123
  - 'lib/net/ssh/authentication/methods/password.rb'
145
124
  - 'lib/net/ssh/key_factory.rb'
146
125
 
126
+ # Offense count: 3
127
+ Lint/MissingSuper:
128
+ Exclude:
129
+ - 'lib/net/ssh/proxy/jump.rb'
130
+ - 'test/common.rb'
131
+ - 'test/integration/mitm_server.rb'
132
+
147
133
  # Offense count: 1
148
134
  Lint/NonLocalExitFromIterator:
149
135
  Exclude:
150
136
  - 'lib/net/ssh/known_hosts.rb'
151
137
 
138
+ # Offense count: 6
139
+ # Cop supports --auto-correct.
140
+ # Configuration parameters: AllowedImplicitNamespaces.
141
+ # AllowedImplicitNamespaces: Gem
142
+ Lint/RaiseException:
143
+ Exclude:
144
+ - 'Rakefile'
145
+ - 'lib/net/ssh/buffer.rb'
146
+ - 'lib/net/ssh/key_factory.rb'
147
+
152
148
  # Offense count: 3
153
149
  Lint/RescueException:
154
150
  Exclude:
155
151
  - 'lib/net/ssh/authentication/key_manager.rb'
156
152
  - 'lib/net/ssh/service/forward.rb'
157
153
 
154
+ # Offense count: 4
155
+ # Cop supports --auto-correct.
156
+ Lint/SendWithMixinArgument:
157
+ Exclude:
158
+ - 'lib/net/ssh/test/extensions.rb'
159
+
158
160
  # Offense count: 2
159
161
  Lint/ShadowedException:
160
162
  Exclude:
161
163
  - 'lib/net/ssh/authentication/key_manager.rb'
162
164
 
165
+ # Offense count: 5
166
+ # Configuration parameters: AllowComments, AllowNil.
167
+ Lint/SuppressedException:
168
+ Exclude:
169
+ - 'lib/net/ssh/authentication/session.rb'
170
+ - 'lib/net/ssh/transport/openssl.rb'
171
+ - 'test/integration/common.rb'
172
+ - 'test/integration/test_forward.rb'
173
+
163
174
  # Offense count: 1
164
175
  # Configuration parameters: AllowKeywordBlockArguments.
165
176
  Lint/UnderscorePrefixedVariableName:
166
177
  Exclude:
167
178
  - 'lib/net/ssh/test/local_packet.rb'
168
179
 
169
- # Offense count: 60
180
+ # Offense count: 15
170
181
  # Cop supports --auto-correct.
171
182
  # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
172
183
  Lint/UnusedBlockArgument:
@@ -174,21 +185,15 @@ Lint/UnusedBlockArgument:
174
185
  - 'lib/net/ssh/connection/keepalive.rb'
175
186
  - 'lib/net/ssh/connection/session.rb'
176
187
  - 'lib/net/ssh/service/forward.rb'
177
- - 'test/authentication/methods/test_password.rb'
178
- - 'test/authentication/test_agent.rb'
179
- - 'test/common.rb'
180
- - 'test/connection/test_channel.rb'
181
- - 'test/connection/test_session.rb'
182
- - 'test/transport/test_algorithms.rb'
183
- - 'test/transport/test_hmac.rb'
184
188
 
185
- # Offense count: 65
189
+ # Offense count: 69
186
190
  # Cop supports --auto-correct.
187
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
191
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
188
192
  Lint/UnusedMethodArgument:
189
193
  Enabled: false
190
194
 
191
195
  # Offense count: 3
196
+ # Cop supports --auto-correct.
192
197
  # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
193
198
  Lint/UselessAccessModifier:
194
199
  Exclude:
@@ -204,13 +209,20 @@ Lint/UselessAssignment:
204
209
  - 'test/integration/common.rb'
205
210
  - 'test/integration/test_forward.rb'
206
211
 
207
- # Offense count: 239
212
+ # Offense count: 1
213
+ # Cop supports --auto-correct.
214
+ Lint/UselessTimes:
215
+ Exclude:
216
+ - 'test/integration/test_forward.rb'
217
+
218
+ # Offense count: 201
219
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
208
220
  Metrics/AbcSize:
209
- Max: 71
221
+ Max: 77
210
222
 
211
- # Offense count: 17
212
- # Configuration parameters: CountComments, ExcludedMethods.
213
- # ExcludedMethods: refine
223
+ # Offense count: 16
224
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
225
+ # IgnoredMethods: refine
214
226
  Metrics/BlockLength:
215
227
  Max: 59
216
228
 
@@ -220,32 +232,35 @@ Metrics/BlockNesting:
220
232
  Max: 4
221
233
 
222
234
  # Offense count: 33
223
- # Configuration parameters: CountComments.
235
+ # Configuration parameters: CountComments, CountAsOne.
224
236
  Metrics/ClassLength:
225
237
  Max: 488
226
238
 
227
- # Offense count: 40
239
+ # Offense count: 36
240
+ # Configuration parameters: IgnoredMethods.
228
241
  Metrics/CyclomaticComplexity:
229
- Max: 28
242
+ Max: 32
230
243
 
231
244
  # Offense count: 224
232
- # Configuration parameters: CountComments, ExcludedMethods.
245
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
233
246
  Metrics/MethodLength:
234
247
  Max: 72
235
248
 
236
249
  # Offense count: 3
237
- # Configuration parameters: CountComments.
250
+ # Configuration parameters: CountComments, CountAsOne.
238
251
  Metrics/ModuleLength:
239
252
  Max: 160
240
253
 
241
- # Offense count: 1
254
+ # Offense count: 3
242
255
  # Configuration parameters: CountKeywordArgs.
243
256
  Metrics/ParameterLists:
244
257
  Max: 6
258
+ MaxOptionalParameters: 4
245
259
 
246
- # Offense count: 32
260
+ # Offense count: 31
261
+ # Configuration parameters: IgnoredMethods.
247
262
  Metrics/PerceivedComplexity:
248
- Max: 20
263
+ Max: 32
249
264
 
250
265
  # Offense count: 10
251
266
  Naming/AccessorMethodName:
@@ -259,12 +274,15 @@ Naming/AccessorMethodName:
259
274
  - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
260
275
 
261
276
  # Offense count: 2
277
+ # Cop supports --auto-correct.
262
278
  Naming/BinaryOperatorParameterName:
263
279
  Exclude:
264
280
  - 'lib/net/ssh/buffer.rb'
265
281
  - 'lib/net/ssh/version.rb'
266
282
 
267
283
  # Offense count: 16
284
+ # Configuration parameters: AllowedNames.
285
+ # AllowedNames: module_parent
268
286
  Naming/ClassAndModuleCamelCase:
269
287
  Enabled: false
270
288
 
@@ -276,8 +294,8 @@ Naming/ConstantName:
276
294
  - 'lib/net/ssh/transport/openssl.rb'
277
295
 
278
296
  # Offense count: 12
279
- # Configuration parameters: Blacklist.
280
- # Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
297
+ # Configuration parameters: ForbiddenDelimiters.
298
+ # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
281
299
  Naming/HeredocDelimiterNaming:
282
300
  Exclude:
283
301
  - 'test/authentication/test_agent.rb'
@@ -296,7 +314,7 @@ Naming/MemoizedInstanceVariableName:
296
314
  - 'test/authentication/test_key_manager.rb'
297
315
 
298
316
  # Offense count: 32
299
- # Configuration parameters: EnforcedStyle.
317
+ # Configuration parameters: EnforcedStyle, IgnoredPatterns.
300
318
  # SupportedStyles: snake_case, camelCase
301
319
  Naming/MethodName:
302
320
  Exclude:
@@ -309,19 +327,10 @@ Naming/MethodName:
309
327
  - 'test/test_config.rb'
310
328
  - 'test/test_key_factory.rb'
311
329
 
312
- # Offense count: 4
313
- # Cop supports --auto-correct.
314
- # Configuration parameters: PreferredName.
315
- Naming/RescuedExceptionsVariableName:
316
- Exclude:
317
- - 'lib/net/ssh/connection/session.rb'
318
- - 'lib/net/ssh/service/forward.rb'
319
- - 'lib/net/ssh/verifiers/accept_new.rb'
320
-
321
330
  # Offense count: 23
322
331
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
323
- # AllowedNames: io, id, to, by, on, in, at, ip, db
324
- Naming/UncommunicativeMethodParamName:
332
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
333
+ Naming/MethodParameterName:
325
334
  Exclude:
326
335
  - 'lib/net/ssh/authentication/certificate.rb'
327
336
  - 'lib/net/ssh/authentication/ed25519.rb'
@@ -335,14 +344,44 @@ Naming/UncommunicativeMethodParamName:
335
344
  - 'lib/net/ssh/transport/identity_cipher.rb'
336
345
  - 'test/connection/test_session.rb'
337
346
 
338
- # Offense count: 8
339
- # Configuration parameters: EnforcedStyle.
347
+ # Offense count: 4
348
+ # Cop supports --auto-correct.
349
+ # Configuration parameters: PreferredName.
350
+ Naming/RescuedExceptionsVariableName:
351
+ Exclude:
352
+ - 'lib/net/ssh/connection/session.rb'
353
+ - 'lib/net/ssh/service/forward.rb'
354
+ - 'lib/net/ssh/verifiers/accept_new.rb'
355
+
356
+ # Offense count: 5
357
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
358
+ # SupportedStyles: snake_case, normalcase, non_integer
359
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
360
+ Naming/VariableNumber:
361
+ Exclude:
362
+ - 'test/test_buffer.rb'
363
+ - 'test/test_known_hosts.rb'
364
+ - 'test/transport/test_identity_cipher.rb'
365
+
366
+ # Offense count: 2
367
+ # Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols.
340
368
  # SupportedStyles: inline, group
341
369
  Style/AccessModifierDeclarations:
342
370
  Exclude:
343
371
  - 'lib/net/ssh/authentication/pageant.rb'
344
- - 'lib/net/ssh/transport/openssl.rb'
345
- - 'test/test_key_factory.rb'
372
+
373
+ # Offense count: 31
374
+ # Cop supports --auto-correct.
375
+ # Configuration parameters: EnforcedStyle.
376
+ # SupportedStyles: separated, grouped
377
+ Style/AccessorGrouping:
378
+ Exclude:
379
+ - 'lib/net/ssh/authentication/certificate.rb'
380
+ - 'lib/net/ssh/transport/kex/abstract.rb'
381
+ - 'test/common.rb'
382
+ - 'test/connection/test_channel.rb'
383
+ - 'test/integration/mitm_server.rb'
384
+ - 'test/start/test_transport.rb'
346
385
 
347
386
  # Offense count: 2
348
387
  # Cop supports --auto-correct.
@@ -353,28 +392,19 @@ Style/Alias:
353
392
  - 'lib/net/ssh/connection/session.rb'
354
393
  - 'lib/net/ssh/service/forward.rb'
355
394
 
356
- # Offense count: 31
395
+ # Offense count: 9
357
396
  # Cop supports --auto-correct.
358
397
  # Configuration parameters: EnforcedStyle.
359
398
  # SupportedStyles: always, conditionals
360
399
  Style/AndOr:
361
400
  Exclude:
362
- - 'lib/net/ssh/authentication/key_manager.rb'
363
- - 'lib/net/ssh/buffer.rb'
364
- - 'lib/net/ssh/buffered_io.rb'
365
401
  - 'lib/net/ssh/connection/channel.rb'
366
402
  - 'lib/net/ssh/connection/session.rb'
367
- - 'lib/net/ssh/key_factory.rb'
368
403
  - 'lib/net/ssh/service/forward.rb'
369
- - 'lib/net/ssh/test/channel.rb'
370
- - 'lib/net/ssh/test/script.rb'
371
- - 'lib/net/ssh/transport/cipher_factory.rb'
372
- - 'lib/net/ssh/transport/hmac.rb'
373
- - 'lib/net/ssh/transport/key_expander.rb'
374
- - 'test/common.rb'
375
404
 
376
405
  # Offense count: 2
377
406
  # Configuration parameters: AllowedChars.
407
+ # AllowedChars: ©
378
408
  Style/AsciiComments:
379
409
  Exclude:
380
410
  - 'lib/net/ssh/authentication/pageant.rb'
@@ -382,7 +412,7 @@ Style/AsciiComments:
382
412
 
383
413
  # Offense count: 9
384
414
  # Cop supports --auto-correct.
385
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
415
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
386
416
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
387
417
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
388
418
  # FunctionalMethods: let, let!, subject, watch
@@ -397,37 +427,42 @@ Style/BlockDelimiters:
397
427
  - 'lib/net/ssh/transport/ctr.rb'
398
428
  - 'test/verifiers/test_always.rb'
399
429
 
400
- # Offense count: 7
401
- # Cop supports --auto-correct.
402
- # Configuration parameters: EnforcedStyle.
403
- # SupportedStyles: braces, no_braces, context_dependent
404
- Style/BracesAroundHashParameters:
405
- Exclude:
406
- - 'lib/net/ssh/config.rb'
407
- - 'test/integration/test_ed25519_pkeys.rb'
408
- - 'test/integration/test_id_rsa_keys.rb'
409
- - 'test/transport/test_hmac.rb'
410
- - 'test/transport/test_session.rb'
411
-
412
430
  # Offense count: 2
431
+ # Cop supports --auto-correct.
432
+ # Configuration parameters: AllowOnConstant.
413
433
  Style/CaseEquality:
414
434
  Exclude:
415
435
  - 'lib/net/ssh/buffer.rb'
416
436
  - 'lib/net/ssh/connection/session.rb'
417
437
 
438
+ # Offense count: 2
439
+ # Cop supports --auto-correct.
440
+ Style/CaseLikeIf:
441
+ Exclude:
442
+ - 'lib/net/ssh/transport/openssl.rb'
443
+ - 'test/connection/test_session.rb'
444
+
418
445
  # Offense count: 1
419
446
  # Cop supports --auto-correct.
420
447
  Style/CharacterLiteral:
421
448
  Exclude:
422
449
  - 'test/test_buffer.rb'
423
450
 
424
- # Offense count: 17
451
+ # Offense count: 18
425
452
  # Cop supports --auto-correct.
426
- # Configuration parameters: AutoCorrect, EnforcedStyle.
453
+ # Configuration parameters: EnforcedStyle.
427
454
  # SupportedStyles: nested, compact
428
455
  Style/ClassAndModuleChildren:
429
456
  Enabled: false
430
457
 
458
+ # Offense count: 1
459
+ # Cop supports --auto-correct.
460
+ # Configuration parameters: IgnoredMethods.
461
+ # IgnoredMethods: ==, equal?, eql?
462
+ Style/ClassEqualityComparison:
463
+ Exclude:
464
+ - 'lib/net/ssh/service/forward.rb'
465
+
431
466
  # Offense count: 7
432
467
  Style/ClassVars:
433
468
  Exclude:
@@ -442,10 +477,16 @@ Style/ColonMethodCall:
442
477
  Exclude:
443
478
  - 'lib/net/ssh/authentication/ed25519.rb'
444
479
 
480
+ # Offense count: 2
481
+ Style/CombinableLoops:
482
+ Exclude:
483
+ - 'lib/net/ssh/connection/channel.rb'
484
+ - 'test/integration/test_hmac_etm.rb'
485
+
445
486
  # Offense count: 4
446
487
  # Cop supports --auto-correct.
447
488
  # Configuration parameters: Keywords.
448
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
489
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
449
490
  Style/CommentAnnotation:
450
491
  Exclude:
451
492
  - 'lib/net/ssh/authentication/ed25519.rb'
@@ -454,6 +495,7 @@ Style/CommentAnnotation:
454
495
  - 'lib/net/ssh/config.rb'
455
496
 
456
497
  # Offense count: 3
498
+ # Cop supports --auto-correct.
457
499
  Style/CommentedKeyword:
458
500
  Exclude:
459
501
  - 'test/connection/test_session.rb'
@@ -471,7 +513,8 @@ Style/ConditionalAssignment:
471
513
  - 'lib/net/ssh/transport/state.rb'
472
514
  - 'test/test_key_factory.rb'
473
515
 
474
- # Offense count: 13
516
+ # Offense count: 12
517
+ # Configuration parameters: AllowedConstants.
475
518
  Style/Documentation:
476
519
  Exclude:
477
520
  - 'spec/**/*'
@@ -486,15 +529,19 @@ Style/Documentation:
486
529
 
487
530
  # Offense count: 1
488
531
  # Cop supports --auto-correct.
489
- Style/EmptyLiteral:
532
+ Style/EvenOdd:
490
533
  Exclude:
491
- - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
534
+ - 'lib/net/ssh/buffer.rb'
492
535
 
493
- # Offense count: 1
536
+ # Offense count: 9
494
537
  # Cop supports --auto-correct.
495
- Style/EvenOdd:
538
+ Style/ExplicitBlockArgument:
496
539
  Exclude:
497
- - 'lib/net/ssh/buffer.rb'
540
+ - 'lib/net/ssh/loggable.rb'
541
+ - 'lib/net/ssh/test.rb'
542
+ - 'test/integration/common.rb'
543
+ - 'test/integration/mitm_server.rb'
544
+ - 'test/integration/test_forward.rb'
498
545
 
499
546
  # Offense count: 2
500
547
  # Cop supports --auto-correct.
@@ -505,26 +552,26 @@ Style/FormatString:
505
552
  - 'lib/net/ssh/authentication/pageant.rb'
506
553
  - 'lib/net/ssh/loggable.rb'
507
554
 
508
- # Offense count: 1
509
- # Configuration parameters: EnforcedStyle.
510
- # SupportedStyles: annotated, template, unannotated
511
- Style/FormatStringToken:
512
- Exclude:
513
- - 'lib/net/ssh/loggable.rb'
514
-
515
- # Offense count: 171
555
+ # Offense count: 173
516
556
  # Cop supports --auto-correct.
517
557
  # Configuration parameters: EnforcedStyle.
518
- # SupportedStyles: always, never
558
+ # SupportedStyles: always, always_true, never
519
559
  Style/FrozenStringLiteralComment:
520
560
  Enabled: false
521
561
 
562
+ # Offense count: 1
563
+ # Cop supports --auto-correct.
564
+ Style/GlobalStdStream:
565
+ Exclude:
566
+ - 'lib/net/ssh.rb'
567
+
522
568
  # Offense count: 35
523
569
  # Configuration parameters: MinBodyLength.
524
570
  Style/GuardClause:
525
571
  Enabled: false
526
572
 
527
573
  # Offense count: 1
574
+ # Cop supports --auto-correct.
528
575
  # Configuration parameters: AllowIfModifier.
529
576
  Style/IfInsideElse:
530
577
  Exclude:
@@ -558,11 +605,6 @@ Style/LineEndConcatenation:
558
605
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
559
606
  - 'lib/net/ssh/verifiers/always.rb'
560
607
 
561
- # Offense count: 1
562
- Style/MethodMissingSuper:
563
- Exclude:
564
- - 'lib/net/ssh/connection/session.rb'
565
-
566
608
  # Offense count: 1
567
609
  Style/MissingRespondToMissing:
568
610
  Exclude:
@@ -575,15 +617,15 @@ Style/MultilineIfThen:
575
617
  - 'lib/net/ssh/buffered_io.rb'
576
618
  - 'lib/net/ssh/service/forward.rb'
577
619
 
578
- # Offense count: 6
620
+ # Offense count: 7
579
621
  # Cop supports --auto-correct.
580
622
  Style/MultilineWhenThen:
581
623
  Exclude:
582
- - 'lib/net/ssh/test/packet.rb'
583
624
  - 'lib/net/ssh/transport/packet_stream.rb'
584
625
  - 'lib/net/ssh/transport/session.rb'
585
626
 
586
627
  # Offense count: 5
628
+ # Cop supports --auto-correct.
587
629
  Style/MultipleComparison:
588
630
  Exclude:
589
631
  - 'lib/net/ssh/authentication/agent.rb'
@@ -591,7 +633,7 @@ Style/MultipleComparison:
591
633
  - 'lib/net/ssh/known_hosts.rb'
592
634
  - 'lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb'
593
635
 
594
- # Offense count: 41
636
+ # Offense count: 42
595
637
  # Cop supports --auto-correct.
596
638
  # Configuration parameters: EnforcedStyle.
597
639
  # SupportedStyles: literals, strict
@@ -642,7 +684,7 @@ Style/Not:
642
684
  Exclude:
643
685
  - 'lib/net/ssh/connection/channel.rb'
644
686
 
645
- # Offense count: 10
687
+ # Offense count: 11
646
688
  # Cop supports --auto-correct.
647
689
  # Configuration parameters: Strict.
648
690
  Style/NumericLiterals:
@@ -650,11 +692,28 @@ Style/NumericLiterals:
650
692
 
651
693
  # Offense count: 29
652
694
  # Cop supports --auto-correct.
653
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
695
+ # Configuration parameters: EnforcedStyle, IgnoredMethods.
654
696
  # SupportedStyles: predicate, comparison
655
697
  Style/NumericPredicate:
656
698
  Enabled: false
657
699
 
700
+ # Offense count: 17
701
+ # Configuration parameters: AllowedMethods.
702
+ # AllowedMethods: respond_to_missing?
703
+ Style/OptionalBooleanParameter:
704
+ Exclude:
705
+ - 'lib/net/ssh/connection/session.rb'
706
+ - 'lib/net/ssh/key_factory.rb'
707
+ - 'lib/net/ssh/prompt.rb'
708
+ - 'lib/net/ssh/test/channel.rb'
709
+ - 'lib/net/ssh/test/script.rb'
710
+ - 'lib/net/ssh/transport/algorithms.rb'
711
+ - 'lib/net/ssh/transport/session.rb'
712
+ - 'lib/net/ssh/transport/state.rb'
713
+ - 'test/common.rb'
714
+ - 'test/integration/common.rb'
715
+ - 'test/transport/test_server_version.rb'
716
+
658
717
  # Offense count: 15
659
718
  # Cop supports --auto-correct.
660
719
  Style/ParallelAssignment:
@@ -687,7 +746,7 @@ Style/PercentLiteralDelimiters:
687
746
  - 'net-ssh.gemspec'
688
747
  - 'test/test_config.rb'
689
748
 
690
- # Offense count: 15
749
+ # Offense count: 16
691
750
  # Cop supports --auto-correct.
692
751
  Style/PerlBackrefs:
693
752
  Exclude:
@@ -713,21 +772,56 @@ Style/Proc:
713
772
 
714
773
  # Offense count: 7
715
774
  # Cop supports --auto-correct.
716
- # Configuration parameters: EnforcedStyle.
775
+ # Configuration parameters: EnforcedStyle, AllowedCompactTypes.
717
776
  # SupportedStyles: compact, exploded
718
777
  Style/RaiseArgs:
719
778
  Exclude:
720
779
  - 'lib/net/ssh/authentication/ed25519.rb'
721
780
 
722
- # Offense count: 4
781
+ # Offense count: 5
723
782
  # Cop supports --auto-correct.
724
783
  Style/RedundantBegin:
725
784
  Exclude:
726
785
  - 'lib/net/ssh/buffered_io.rb'
786
+ - 'lib/net/ssh/service/forward.rb'
727
787
  - 'lib/net/ssh/verifiers/accept_new.rb'
728
788
  - 'test/manual/test_pageant.rb'
729
789
 
730
- # Offense count: 61
790
+ # Offense count: 1
791
+ # Cop supports --auto-correct.
792
+ Style/RedundantCondition:
793
+ Exclude:
794
+ - 'lib/net/ssh/proxy/command.rb'
795
+
796
+ # Offense count: 1
797
+ # Cop supports --auto-correct.
798
+ Style/RedundantFileExtensionInRequire:
799
+ Exclude:
800
+ - 'lib/net/ssh/transport/cipher_factory.rb'
801
+
802
+ # Offense count: 2
803
+ # Cop supports --auto-correct.
804
+ Style/RedundantInterpolation:
805
+ Exclude:
806
+ - 'lib/net/ssh/proxy/socks5.rb'
807
+ - 'lib/net/ssh/transport/session.rb'
808
+
809
+ # Offense count: 2
810
+ # Cop supports --auto-correct.
811
+ Style/RedundantPercentQ:
812
+ Exclude:
813
+ - 'net-ssh.gemspec'
814
+
815
+ # Offense count: 9
816
+ # Cop supports --auto-correct.
817
+ Style/RedundantRegexpEscape:
818
+ Exclude:
819
+ - 'lib/net/ssh/authentication/agent.rb'
820
+ - 'lib/net/ssh/buffer.rb'
821
+ - 'lib/net/ssh/config.rb'
822
+ - 'lib/net/ssh/transport/cipher_factory.rb'
823
+
824
+ # Offense count: 86
731
825
  # Cop supports --auto-correct.
732
826
  # Configuration parameters: AllowMultipleReturnValues.
733
827
  Style/RedundantReturn:
@@ -750,8 +844,8 @@ Style/RescueModifier:
750
844
 
751
845
  # Offense count: 25
752
846
  # Cop supports --auto-correct.
753
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
754
- # Whitelist: present?, blank?, presence, try, try!
847
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
848
+ # AllowedMethods: present?, blank?, presence, try, try!
755
849
  Style/SafeNavigation:
756
850
  Exclude:
757
851
  - 'lib/net/ssh/authentication/key_manager.rb'
@@ -798,6 +892,15 @@ Style/SingleLineMethods:
798
892
  Exclude:
799
893
  - 'lib/net/ssh/buffered_io.rb'
800
894
 
895
+ # Offense count: 3
896
+ # Cop supports --auto-correct.
897
+ # Configuration parameters: AllowModifier.
898
+ Style/SoleNestedConditional:
899
+ Exclude:
900
+ - 'lib/net/ssh/transport/packet_stream.rb'
901
+ - 'test/common.rb'
902
+ - 'test/integration/test_proxy.rb'
903
+
801
904
  # Offense count: 18
802
905
  # Cop supports --auto-correct.
803
906
  # Configuration parameters: EnforcedStyle.
@@ -812,7 +915,23 @@ Style/SpecialGlobalVars:
812
915
  - 'test/manual/test_pageant.rb'
813
916
  - 'test/test_all.rb'
814
917
 
815
- # Offense count: 1801
918
+ # Offense count: 27
919
+ # Cop supports --auto-correct.
920
+ Style/StringConcatenation:
921
+ Exclude:
922
+ - 'lib/net/ssh/authentication/certificate.rb'
923
+ - 'lib/net/ssh/authentication/key_manager.rb'
924
+ - 'lib/net/ssh/authentication/pageant.rb'
925
+ - 'lib/net/ssh/config.rb'
926
+ - 'lib/net/ssh/transport/algorithms.rb'
927
+ - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
928
+ - 'test/authentication/test_key_manager.rb'
929
+ - 'test/integration/common.rb'
930
+ - 'test/integration/test_proxy.rb'
931
+ - 'test/test_buffer.rb'
932
+ - 'test/test_key_factory.rb'
933
+
934
+ # Offense count: 1820
816
935
  # Cop supports --auto-correct.
817
936
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
818
937
  # SupportedStyles: single_quotes, double_quotes
@@ -821,7 +940,7 @@ Style/StringLiterals:
821
940
 
822
941
  # Offense count: 7
823
942
  # Cop supports --auto-correct.
824
- # Configuration parameters: IgnoredMethods.
943
+ # Configuration parameters: AllowMethodsWithArguments, IgnoredMethods.
825
944
  # IgnoredMethods: respond_to, define_method
826
945
  Style/SymbolProc:
827
946
  Exclude:
@@ -831,24 +950,16 @@ Style/SymbolProc:
831
950
  - 'lib/net/ssh/test/extensions.rb'
832
951
  - 'lib/net/ssh/transport/algorithms.rb'
833
952
 
834
- # Offense count: 1
835
- # Cop supports --auto-correct.
836
- Style/UnneededCondition:
837
- Exclude:
838
- - 'lib/net/ssh/proxy/command.rb'
839
-
840
- # Offense count: 2
841
- # Cop supports --auto-correct.
842
- Style/UnneededInterpolation:
843
- Exclude:
844
- - 'lib/net/ssh/proxy/socks5.rb'
845
- - 'lib/net/ssh/transport/session.rb'
846
-
847
- # Offense count: 2
953
+ # Offense count: 14
848
954
  # Cop supports --auto-correct.
849
- Style/UnneededPercentQ:
955
+ Style/UnpackFirst:
850
956
  Exclude:
851
- - 'net-ssh.gemspec'
957
+ - 'lib/net/ssh/authentication/pageant.rb'
958
+ - 'lib/net/ssh/buffer.rb'
959
+ - 'lib/net/ssh/key_factory.rb'
960
+ - 'lib/net/ssh/known_hosts.rb'
961
+ - 'lib/net/ssh/transport/openssl.rb'
962
+ - 'lib/net/ssh/transport/packet_stream.rb'
852
963
 
853
964
  # Offense count: 2
854
965
  # Cop supports --auto-correct.
@@ -857,7 +968,7 @@ Style/WhileUntilDo:
857
968
  - 'lib/net/ssh/config.rb'
858
969
  - 'test/integration/common.rb'
859
970
 
860
- # Offense count: 3
971
+ # Offense count: 4
861
972
  # Cop supports --auto-correct.
862
973
  # Configuration parameters: WordRegex.
863
974
  # SupportedStyles: percent, brackets
@@ -871,3 +982,93 @@ Style/ZeroLengthPredicate:
871
982
  Exclude:
872
983
  - 'lib/net/ssh/buffered_io.rb'
873
984
  - 'lib/net/ssh/connection/channel.rb'
985
+
986
+ Gemspec/DateAssignment: # (new in 1.10)
987
+ Enabled: true
988
+
989
+ Layout/SpaceBeforeBrackets: # (new in 1.7)
990
+ Enabled: true
991
+
992
+ Lint/AmbiguousAssignment: # (new in 1.7)
993
+ Enabled: true
994
+
995
+ Lint/DeprecatedConstants: # (new in 1.8)
996
+ Enabled: true
997
+
998
+ Lint/DuplicateBranch: # (new in 1.3)
999
+ Enabled: true
1000
+
1001
+ Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
1002
+ Enabled: true
1003
+
1004
+ Lint/EmptyBlock: # (new in 1.1)
1005
+ Enabled: false
1006
+
1007
+ Lint/EmptyClass: # (new in 1.3)
1008
+ Enabled: true
1009
+
1010
+ Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
1011
+ Enabled: true
1012
+
1013
+ Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
1014
+ Enabled: true
1015
+
1016
+ Lint/NumberedParameterAssignment: # (new in 1.9)
1017
+ Enabled: true
1018
+
1019
+ Lint/OrAssignmentToConstant: # (new in 1.9)
1020
+ Enabled: false
1021
+
1022
+ Lint/RedundantDirGlobSort: # (new in 1.8)
1023
+ Enabled: true
1024
+
1025
+ Lint/SymbolConversion: # (new in 1.9)
1026
+ Enabled: true
1027
+
1028
+ Lint/ToEnumArguments: # (new in 1.1)
1029
+ Enabled: true
1030
+
1031
+ Lint/TripleQuotes: # (new in 1.9)
1032
+ Enabled: true
1033
+
1034
+ Lint/UnexpectedBlockArity: # (new in 1.5)
1035
+ Enabled: true
1036
+
1037
+ Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
1038
+ Enabled: true
1039
+
1040
+ Style/ArgumentsForwarding: # (new in 1.1)
1041
+ Enabled: true
1042
+
1043
+ Style/CollectionCompact: # (new in 1.2)
1044
+ Enabled: true
1045
+
1046
+ Style/DocumentDynamicEvalDefinition: # (new in 1.1)
1047
+ Enabled: true
1048
+
1049
+ Style/EndlessMethod: # (new in 1.8)
1050
+ Enabled: true
1051
+
1052
+ Style/HashConversion: # (new in 1.10)
1053
+ Enabled: false
1054
+
1055
+ Style/HashExcept: # (new in 1.7)
1056
+ Enabled: true
1057
+
1058
+ Style/IfWithBooleanLiteralBranches: # (new in 1.9)
1059
+ Enabled: true
1060
+
1061
+ Style/NegatedIfElseCondition: # (new in 1.2)
1062
+ Enabled: false
1063
+
1064
+ Style/NilLambda: # (new in 1.3)
1065
+ Enabled: true
1066
+
1067
+ Style/RedundantArgument: # (new in 1.4)
1068
+ Enabled: false
1069
+
1070
+ Style/StringChars: # (new in 1.12)
1071
+ Enabled: false
1072
+
1073
+ Style/SwapValues: # (new in 1.1)
1074
+ Enabled: true