net-ssh 6.1.0 → 6.3.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +1 -1
  3. data.tar.gz.sig +0 -0
  4. data/.github/workflows/ci.yml +93 -0
  5. data/.gitignore +2 -0
  6. data/.rubocop.yml +11 -1
  7. data/.rubocop_todo.yml +383 -291
  8. data/.travis.yml +10 -11
  9. data/CHANGES.txt +16 -3
  10. data/Gemfile +2 -0
  11. data/Gemfile.noed25519 +2 -0
  12. data/README.md +2 -2
  13. data/Rakefile +1 -0
  14. data/lib/net/ssh.rb +1 -2
  15. data/lib/net/ssh/authentication/agent.rb +16 -0
  16. data/lib/net/ssh/authentication/certificate.rb +8 -5
  17. data/lib/net/ssh/authentication/constants.rb +0 -1
  18. data/lib/net/ssh/authentication/ed25519.rb +7 -3
  19. data/lib/net/ssh/authentication/ed25519_loader.rb +4 -7
  20. data/lib/net/ssh/authentication/key_manager.rb +28 -29
  21. data/lib/net/ssh/authentication/methods/abstract.rb +0 -1
  22. data/lib/net/ssh/authentication/methods/hostbased.rb +0 -2
  23. data/lib/net/ssh/authentication/methods/keyboard_interactive.rb +1 -1
  24. data/lib/net/ssh/authentication/methods/none.rb +5 -8
  25. data/lib/net/ssh/authentication/methods/password.rb +1 -2
  26. data/lib/net/ssh/authentication/methods/publickey.rb +0 -2
  27. data/lib/net/ssh/authentication/pageant.rb +89 -89
  28. data/lib/net/ssh/authentication/session.rb +14 -15
  29. data/lib/net/ssh/buffer.rb +10 -5
  30. data/lib/net/ssh/buffered_io.rb +18 -19
  31. data/lib/net/ssh/config.rb +29 -16
  32. data/lib/net/ssh/connection/channel.rb +72 -69
  33. data/lib/net/ssh/connection/constants.rb +0 -4
  34. data/lib/net/ssh/connection/event_loop.rb +22 -16
  35. data/lib/net/ssh/connection/keepalive.rb +12 -12
  36. data/lib/net/ssh/connection/session.rb +95 -94
  37. data/lib/net/ssh/connection/term.rb +56 -58
  38. data/lib/net/ssh/errors.rb +10 -10
  39. data/lib/net/ssh/key_factory.rb +0 -1
  40. data/lib/net/ssh/known_hosts.rb +79 -11
  41. data/lib/net/ssh/loggable.rb +8 -9
  42. data/lib/net/ssh/packet.rb +1 -1
  43. data/lib/net/ssh/prompt.rb +8 -10
  44. data/lib/net/ssh/proxy/command.rb +1 -1
  45. data/lib/net/ssh/proxy/errors.rb +2 -4
  46. data/lib/net/ssh/proxy/http.rb +17 -19
  47. data/lib/net/ssh/proxy/https.rb +6 -8
  48. data/lib/net/ssh/proxy/jump.rb +8 -10
  49. data/lib/net/ssh/proxy/socks4.rb +1 -3
  50. data/lib/net/ssh/proxy/socks5.rb +2 -4
  51. data/lib/net/ssh/service/forward.rb +3 -3
  52. data/lib/net/ssh/test.rb +1 -2
  53. data/lib/net/ssh/test/channel.rb +21 -23
  54. data/lib/net/ssh/test/extensions.rb +29 -29
  55. data/lib/net/ssh/test/kex.rb +6 -8
  56. data/lib/net/ssh/test/local_packet.rb +0 -2
  57. data/lib/net/ssh/test/packet.rb +2 -2
  58. data/lib/net/ssh/test/remote_packet.rb +6 -8
  59. data/lib/net/ssh/test/script.rb +22 -24
  60. data/lib/net/ssh/test/socket.rb +11 -14
  61. data/lib/net/ssh/transport/algorithms.rb +5 -2
  62. data/lib/net/ssh/transport/cipher_factory.rb +16 -16
  63. data/lib/net/ssh/transport/constants.rb +3 -3
  64. data/lib/net/ssh/transport/ctr.rb +4 -4
  65. data/lib/net/ssh/transport/hmac/abstract.rb +0 -1
  66. data/lib/net/ssh/transport/hmac/md5.rb +0 -2
  67. data/lib/net/ssh/transport/hmac/md5_96.rb +0 -2
  68. data/lib/net/ssh/transport/hmac/none.rb +0 -2
  69. data/lib/net/ssh/transport/hmac/ripemd160.rb +0 -2
  70. data/lib/net/ssh/transport/hmac/sha1.rb +0 -2
  71. data/lib/net/ssh/transport/hmac/sha1_96.rb +0 -2
  72. data/lib/net/ssh/transport/identity_cipher.rb +10 -12
  73. data/lib/net/ssh/transport/kex.rb +2 -0
  74. data/lib/net/ssh/transport/kex/abstract.rb +9 -2
  75. data/lib/net/ssh/transport/kex/curve25519_sha256.rb +1 -0
  76. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb +4 -4
  77. data/lib/net/ssh/transport/kex/diffie_hellman_group14_sha256.rb +11 -0
  78. data/lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb +0 -1
  79. data/lib/net/ssh/transport/key_expander.rb +6 -7
  80. data/lib/net/ssh/transport/openssl.rb +19 -15
  81. data/lib/net/ssh/transport/packet_stream.rb +1 -2
  82. data/lib/net/ssh/transport/server_version.rb +17 -16
  83. data/lib/net/ssh/transport/session.rb +3 -1
  84. data/lib/net/ssh/transport/state.rb +42 -42
  85. data/lib/net/ssh/verifiers/accept_new.rb +0 -2
  86. data/lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb +1 -2
  87. data/lib/net/ssh/verifiers/always.rb +6 -4
  88. data/lib/net/ssh/verifiers/never.rb +0 -2
  89. data/lib/net/ssh/version.rb +2 -2
  90. data/net-ssh-public_cert.pem +8 -8
  91. data/net-ssh.gemspec +2 -2
  92. data/support/ssh_tunnel_bug.rb +3 -3
  93. metadata +17 -15
  94. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3871354412d3c8b53ef8bf56fccfc9b0bbbe76c7f1792005edeca4c90546f80f
4
- data.tar.gz: 5d9c55ae9e77f57df83cdd68d3a707ea5583c05fa3ddfa718435b4706bc7da92
3
+ metadata.gz: ddf80df0abbe9491bb495cb7ee38f37b0582618ff93eaf57a7d0321102173e4f
4
+ data.tar.gz: 7fb21128c0934186af8551133f4c643e39ecd9073920667c83e5a5fc5af9ee2d
5
5
  SHA512:
6
- metadata.gz: 54f879420d7c34c5e190050506ab61ef5b7d0aae70cf417ff40ea78ed5cd7d595f7354b81bf9b6961b44b071df121612bdc153e141c77f1a4dc17d0c69946360
7
- data.tar.gz: 5c98a21d3ca109e0fb406bba5a6e453732f8a87f52bda0f9233dfdf7af3eed4b56bc8eca732a1ff5191e9d7eb620fe80867db805932d062be224373875c8d56b
6
+ metadata.gz: b7908f84414cea86fd33a2abb4a5d6020bb208a989b3907e7e0f399a798403cbae0a92eb6272f06fcd4092637ee68e9f0e1f459e6eb23a63457d09918d546e11
7
+ data.tar.gz: 987cdf783c522b2f65e8184ee4c14af3ce373ccfbff7f7a0023b56e239da409270b639dba1848f80dde4b33b0bbe3c6e384174765dd9ea1b388cb7d3e09684a7
checksums.yaml.gz.sig CHANGED
@@ -1 +1 @@
1
- k�G�Ei#�@QK�����x�����߬K4r��D���G~��YB�{�ُ��\J���B�͖%q�Q�2+[��雼|����]���If��=9-��_�����f���ܜ�*Enۃq�YaX��pj4��$
1
+ ���AT�=���H�/��K���3�e{:d��c�����2���ܒ?�a����l ��k��%j h%<P����YI\�oYz ����S�^��,�y�x�%�Tw�~��iNŧ+?�d���3�M�LpzO >�6����q�&[�}Q��|l���K�q�z�"e��Ȩ/�<�H�7%���دZI�oMp��;!���&H}�$ע�U4��rY��̠[�n�DH�W��'<�� ��ί�dQ����,-��^�2�
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1,93 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ runs-on: ubuntu-18.04
6
+ continue-on-error: ${{ matrix.flaky }}
7
+ strategy:
8
+ matrix:
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
14
+ steps:
15
+ - uses: actions/checkout@v1
16
+
17
+ - name: Set up Ruby ${{ matrix.ruby-version }}
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby-version }}
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v2
23
+ with:
24
+ python-version: 3.8
25
+
26
+ - name: Cache bundler
27
+ uses: actions/cache@v1
28
+ id: bundler-cache
29
+ with:
30
+ path: vendor/bundle
31
+ key: ${{ runner.os }}-${{ matrix.ruby-version }}-gem-v3-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/net-ssh.gemspec') }}
32
+ restore-keys: |
33
+ ${{ runner.os }}-${{ matrix.ruby-version }}-gem-v3-
34
+
35
+ - name: Cache pip
36
+ uses: actions/cache@v1
37
+ id: pip-cache
38
+ with:
39
+ path: ~/.cache/pip
40
+ key: ${{ runner.os }}-pip-v1
41
+ restore-keys: |
42
+ ${{ runner.os }}-pip-v1
43
+ - name: Bundle install
44
+ run: |
45
+ gem install bundler
46
+ bundle config set path 'vendor/bundle'
47
+ bundle config set --local path 'vendor/bundle'
48
+ bundle install --jobs 4 --retry 3 --path vendor/bundle
49
+ BUNDLE_GEMFILE=./Gemfile.noed25519 bundle install --jobs 4 --retry 3 --path vendor/bundle
50
+ env:
51
+ BUNDLE_PATH: vendor/bundle
52
+
53
+ - name: Add to etc/hosts
54
+ run: |
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
62
+ - name: Ansible install
63
+ run: |
64
+ python -m pip install --upgrade pip
65
+ pip install ansible urllib3 pyOpenSSL ndg-httpsclient pyasn1
66
+ ansible-galaxy install rvm.ruby
67
+ pwd
68
+ uname -a
69
+ export
70
+ who am i
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
78
+ - name: Run Tests
79
+ run: bundle exec rake test
80
+ env:
81
+ NET_SSH_RUN_INTEGRATION_TESTS: 1
82
+ CI: 1
83
+ - name: Run Tests (without ed25519)
84
+ run: bundle exec rake test
85
+ env:
86
+ BUNDLE_GEMFILE: ./Gemfile.noed25519
87
+ NET_SSH_RUN_INTEGRATION_TESTS: 1
88
+ CI: 1
89
+ - name: Run test helper test
90
+ run: bundle exec rake test_test
91
+ - name: Rubocop
92
+ if: matrix.ruby-version == '3.0.1'
93
+ run: bundle exec rubocop --fail-level C -f s
data/.gitignore CHANGED
@@ -9,3 +9,5 @@ test/integration/.vagrant
9
9
  test/integration/playbook.retry
10
10
 
11
11
  .byebug_history
12
+
13
+ tryout
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,71 +1,39 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-09-10 17:13:26 +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: 76
9
+ # Offense count: 1
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'net-ssh.gemspec'
15
+
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: 57
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
-
30
- # Offense count: 70
31
- # Cop supports --auto-correct.
32
- Layout/EmptyLineAfterGuardClause:
33
- Enabled: false
34
-
35
- # Offense count: 170
36
- # Cop supports --auto-correct.
37
- # Configuration parameters: EnforcedStyle.
38
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
39
- Layout/EmptyLinesAroundModuleBody:
40
- Enabled: false
41
-
42
- # Offense count: 2
43
- # Cop supports --auto-correct.
44
- # Configuration parameters: EnforcedStyle, IndentationWidth.
45
- # SupportedStyles: special_inside_parentheses, consistent, align_brackets
46
- Layout/IndentFirstArrayElement:
47
- Exclude:
48
- - 'lib/net/ssh/transport/openssl.rb'
49
-
50
- # Offense count: 3
51
- # Cop supports --auto-correct.
52
- Layout/LeadingBlankLines:
53
- Exclude:
54
- - 'Rakefile'
55
- - 'lib/net/ssh/authentication/pub_key_fingerprint.rb'
56
- - 'support/arcfour_check.rb'
57
-
58
- # Offense count: 14
59
- # Cop supports --auto-correct.
60
- # Configuration parameters: AllowDoxygenCommentStyle.
61
- Layout/LeadingCommentSpace:
62
- Exclude:
63
- - 'test/integration/test_ed25519_pkeys.rb'
64
- - 'test/integration/test_forward.rb'
65
- - 'test/integration/test_id_rsa_keys.rb'
66
- - 'test/integration/test_proxy.rb'
67
35
 
68
- # Offense count: 23
36
+ # Offense count: 8
69
37
  # Cop supports --auto-correct.
70
38
  # Configuration parameters: EnforcedStyle, IndentationWidth.
71
39
  # SupportedStyles: aligned, indented
@@ -76,18 +44,8 @@ Layout/MultilineOperationIndentation:
76
44
  - 'lib/net/ssh/transport/algorithms.rb'
77
45
  - 'lib/net/ssh/transport/state.rb'
78
46
  - 'lib/net/ssh/verifiers/always.rb'
79
- - 'test/authentication/methods/test_hostbased.rb'
80
- - 'test/authentication/methods/test_publickey.rb'
81
47
 
82
- # Offense count: 16
83
- # Cop supports --auto-correct.
84
- Layout/SpaceAfterColon:
85
- Exclude:
86
- - 'lib/net/ssh/authentication/ed25519.rb'
87
- - 'test/integration/test_ed25519_pkeys.rb'
88
- - 'test/verifiers/test_always.rb'
89
-
90
- # Offense count: 281
48
+ # Offense count: 290
91
49
  # Cop supports --auto-correct.
92
50
  Layout/SpaceAfterComma:
93
51
  Enabled: false
@@ -99,7 +57,7 @@ Layout/SpaceAfterComma:
99
57
  Layout/SpaceAroundEqualsInParameterDefault:
100
58
  Enabled: false
101
59
 
102
- # Offense count: 10
60
+ # Offense count: 5
103
61
  # Cop supports --auto-correct.
104
62
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
105
63
  # SupportedStyles: space, no_space
@@ -109,9 +67,6 @@ Layout/SpaceInsideBlockBraces:
109
67
  - 'lib/net/ssh/authentication/session.rb'
110
68
  - 'lib/net/ssh/transport/ctr.rb'
111
69
  - 'support/ssh_tunnel_bug.rb'
112
- - 'test/authentication/test_agent.rb'
113
- - 'test/authentication/test_key_manager.rb'
114
- - 'test/start/test_user_nil.rb'
115
70
 
116
71
  # Offense count: 6
117
72
  # Cop supports --auto-correct.
@@ -122,19 +77,6 @@ Layout/SpaceInsideReferenceBrackets:
122
77
  Exclude:
123
78
  - 'lib/net/ssh/transport/algorithms.rb'
124
79
 
125
- # Offense count: 17
126
- # Cop supports --auto-correct.
127
- # Configuration parameters: EnforcedStyle.
128
- # SupportedStyles: final_newline, final_blank_line
129
- Layout/TrailingBlankLines:
130
- Enabled: false
131
-
132
- # Offense count: 739
133
- # Cop supports --auto-correct.
134
- # Configuration parameters: AllowInHeredoc.
135
- Layout/TrailingWhitespace:
136
- Enabled: false
137
-
138
80
  # Offense count: 4
139
81
  # Configuration parameters: AllowSafeAssignment.
140
82
  Lint/AssignmentInCondition:
@@ -144,21 +86,29 @@ Lint/AssignmentInCondition:
144
86
  - 'lib/net/ssh/proxy/command.rb'
145
87
 
146
88
  # Offense count: 1
147
- Lint/EmptyWhen:
89
+ # Configuration parameters: AllowedMethods.
90
+ # AllowedMethods: enums
91
+ Lint/ConstantDefinitionInBlock:
148
92
  Exclude:
149
- - 'lib/net/ssh/config.rb'
93
+ - 'test/transport/test_cipher_factory.rb'
150
94
 
151
- # Offense count: 9
152
- # Configuration parameters: AllowComments.
153
- 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:
154
104
  Exclude:
155
- - 'lib/net/ssh/authentication/session.rb'
156
- - 'lib/net/ssh/known_hosts.rb'
157
105
  - 'lib/net/ssh/transport/openssl.rb'
158
- - 'test/integration/common.rb'
159
- - 'test/integration/test_forward.rb'
160
- - 'test/start/test_connection.rb'
161
- - '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'
162
112
 
163
113
  # Offense count: 72
164
114
  Lint/ImplicitStringConcatenation:
@@ -166,54 +116,68 @@ Lint/ImplicitStringConcatenation:
166
116
  - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb'
167
117
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
168
118
 
169
- # Offense count: 1
170
- Lint/LiteralAsCondition:
171
- Exclude:
172
- - 'lib/net/ssh/authentication/pageant.rb'
173
-
174
119
  # Offense count: 2
120
+ # Cop supports --auto-correct.
175
121
  Lint/Loop:
176
122
  Exclude:
177
123
  - 'lib/net/ssh/authentication/methods/password.rb'
178
124
  - 'lib/net/ssh/key_factory.rb'
179
125
 
180
126
  # Offense count: 3
181
- # Configuration parameters: MaximumRangeSize.
182
- Lint/MissingCopEnableDirective:
127
+ Lint/MissingSuper:
183
128
  Exclude:
184
- - 'test/authentication/test_agent.rb'
185
- - 'test/authentication/test_certificate.rb'
186
- - 'test/integration/test_agent.rb'
129
+ - 'lib/net/ssh/proxy/jump.rb'
130
+ - 'test/common.rb'
131
+ - 'test/integration/mitm_server.rb'
187
132
 
188
133
  # Offense count: 1
189
134
  Lint/NonLocalExitFromIterator:
190
135
  Exclude:
191
136
  - 'lib/net/ssh/known_hosts.rb'
192
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
+
193
148
  # Offense count: 3
194
149
  Lint/RescueException:
195
150
  Exclude:
196
151
  - 'lib/net/ssh/authentication/key_manager.rb'
197
152
  - 'lib/net/ssh/service/forward.rb'
198
153
 
154
+ # Offense count: 4
155
+ # Cop supports --auto-correct.
156
+ Lint/SendWithMixinArgument:
157
+ Exclude:
158
+ - 'lib/net/ssh/test/extensions.rb'
159
+
199
160
  # Offense count: 2
200
161
  Lint/ShadowedException:
201
162
  Exclude:
202
163
  - 'lib/net/ssh/authentication/key_manager.rb'
203
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
+
204
174
  # Offense count: 1
205
175
  # Configuration parameters: AllowKeywordBlockArguments.
206
176
  Lint/UnderscorePrefixedVariableName:
207
177
  Exclude:
208
178
  - 'lib/net/ssh/test/local_packet.rb'
209
179
 
210
- # Offense count: 1
211
- # Cop supports --auto-correct.
212
- Lint/UnneededRequireStatement:
213
- Exclude:
214
- - 'lib/net/ssh/ruby_compat.rb'
215
-
216
- # Offense count: 60
180
+ # Offense count: 15
217
181
  # Cop supports --auto-correct.
218
182
  # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
219
183
  Lint/UnusedBlockArgument:
@@ -221,21 +185,15 @@ Lint/UnusedBlockArgument:
221
185
  - 'lib/net/ssh/connection/keepalive.rb'
222
186
  - 'lib/net/ssh/connection/session.rb'
223
187
  - 'lib/net/ssh/service/forward.rb'
224
- - 'test/authentication/methods/test_password.rb'
225
- - 'test/authentication/test_agent.rb'
226
- - 'test/common.rb'
227
- - 'test/connection/test_channel.rb'
228
- - 'test/connection/test_session.rb'
229
- - 'test/transport/test_algorithms.rb'
230
- - 'test/transport/test_hmac.rb'
231
188
 
232
- # Offense count: 62
189
+ # Offense count: 69
233
190
  # Cop supports --auto-correct.
234
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
191
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
235
192
  Lint/UnusedMethodArgument:
236
193
  Enabled: false
237
194
 
238
195
  # Offense count: 3
196
+ # Cop supports --auto-correct.
239
197
  # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
240
198
  Lint/UselessAccessModifier:
241
199
  Exclude:
@@ -251,13 +209,20 @@ Lint/UselessAssignment:
251
209
  - 'test/integration/common.rb'
252
210
  - 'test/integration/test_forward.rb'
253
211
 
254
- # Offense count: 229
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.
255
220
  Metrics/AbcSize:
256
- Max: 89
221
+ Max: 77
257
222
 
258
- # Offense count: 15
259
- # Configuration parameters: CountComments, ExcludedMethods.
260
- # ExcludedMethods: refine
223
+ # Offense count: 16
224
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
225
+ # IgnoredMethods: refine
261
226
  Metrics/BlockLength:
262
227
  Max: 59
263
228
 
@@ -266,37 +231,38 @@ Metrics/BlockLength:
266
231
  Metrics/BlockNesting:
267
232
  Max: 4
268
233
 
269
- # Offense count: 31
270
- # Configuration parameters: CountComments.
234
+ # Offense count: 33
235
+ # Configuration parameters: CountComments, CountAsOne.
271
236
  Metrics/ClassLength:
272
237
  Max: 488
273
238
 
274
- # Offense count: 38
239
+ # Offense count: 36
240
+ # Configuration parameters: IgnoredMethods.
275
241
  Metrics/CyclomaticComplexity:
276
- Max: 27
277
- Exclude:
278
- - 'lib/net/ssh/config.rb'
242
+ Max: 32
279
243
 
280
- # Offense count: 211
281
- # Configuration parameters: CountComments, ExcludedMethods.
244
+ # Offense count: 224
245
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
282
246
  Metrics/MethodLength:
283
- Max: 82
247
+ Max: 72
284
248
 
285
- # Offense count: 2
286
- # Configuration parameters: CountComments.
249
+ # Offense count: 3
250
+ # Configuration parameters: CountComments, CountAsOne.
287
251
  Metrics/ModuleLength:
288
252
  Max: 160
289
253
 
290
- # Offense count: 1
254
+ # Offense count: 3
291
255
  # Configuration parameters: CountKeywordArgs.
292
256
  Metrics/ParameterLists:
293
257
  Max: 6
258
+ MaxOptionalParameters: 4
294
259
 
295
- # Offense count: 30
260
+ # Offense count: 31
261
+ # Configuration parameters: IgnoredMethods.
296
262
  Metrics/PerceivedComplexity:
297
- Max: 20
263
+ Max: 32
298
264
 
299
- # Offense count: 9
265
+ # Offense count: 10
300
266
  Naming/AccessorMethodName:
301
267
  Exclude:
302
268
  - 'lib/net/ssh/authentication/methods/password.rb'
@@ -308,30 +274,17 @@ Naming/AccessorMethodName:
308
274
  - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
309
275
 
310
276
  # Offense count: 2
277
+ # Cop supports --auto-correct.
311
278
  Naming/BinaryOperatorParameterName:
312
279
  Exclude:
313
280
  - 'lib/net/ssh/buffer.rb'
314
281
  - 'lib/net/ssh/version.rb'
315
282
 
316
- # Offense count: 12
283
+ # Offense count: 16
284
+ # Configuration parameters: AllowedNames.
285
+ # AllowedNames: module_parent
317
286
  Naming/ClassAndModuleCamelCase:
318
- Exclude:
319
- - 'lib/net/ssh/transport/hmac/md5_96.rb'
320
- - 'lib/net/ssh/transport/hmac/sha1_96.rb'
321
- - 'lib/net/ssh/transport/hmac/sha2_256.rb'
322
- - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
323
- - 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
324
- - 'lib/net/ssh/transport/hmac/sha2_512.rb'
325
- - 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
326
- - 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
327
- - 'test/transport/hmac/test_md5_96.rb'
328
- - 'test/transport/hmac/test_sha1_96.rb'
329
- - 'test/transport/hmac/test_sha2_256.rb'
330
- - 'test/transport/hmac/test_sha2_256_96.rb'
331
- - 'test/transport/hmac/test_sha2_256_etm.rb'
332
- - 'test/transport/hmac/test_sha2_512.rb'
333
- - 'test/transport/hmac/test_sha2_512_96.rb'
334
- - 'test/transport/hmac/test_sha2_512_etm.rb'
287
+ Enabled: false
335
288
 
336
289
  # Offense count: 4
337
290
  Naming/ConstantName:
@@ -340,9 +293,9 @@ Naming/ConstantName:
340
293
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
341
294
  - 'lib/net/ssh/transport/openssl.rb'
342
295
 
343
- # Offense count: 11
344
- # Configuration parameters: Blacklist.
345
- # Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
296
+ # Offense count: 12
297
+ # Configuration parameters: ForbiddenDelimiters.
298
+ # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
346
299
  Naming/HeredocDelimiterNaming:
347
300
  Exclude:
348
301
  - 'test/authentication/test_agent.rb'
@@ -352,7 +305,7 @@ Naming/HeredocDelimiterNaming:
352
305
  - 'test/integration/test_agent.rb'
353
306
  - 'test/test_key_factory.rb'
354
307
 
355
- # Offense count: 4
308
+ # Offense count: 5
356
309
  # Configuration parameters: EnforcedStyleForLeadingUnderscores.
357
310
  # SupportedStylesForLeadingUnderscores: disallowed, required, optional
358
311
  Naming/MemoizedInstanceVariableName:
@@ -361,7 +314,7 @@ Naming/MemoizedInstanceVariableName:
361
314
  - 'test/authentication/test_key_manager.rb'
362
315
 
363
316
  # Offense count: 32
364
- # Configuration parameters: EnforcedStyle.
317
+ # Configuration parameters: EnforcedStyle, IgnoredPatterns.
365
318
  # SupportedStyles: snake_case, camelCase
366
319
  Naming/MethodName:
367
320
  Exclude:
@@ -374,19 +327,10 @@ Naming/MethodName:
374
327
  - 'test/test_config.rb'
375
328
  - 'test/test_key_factory.rb'
376
329
 
377
- # Offense count: 4
378
- # Cop supports --auto-correct.
379
- # Configuration parameters: PreferredName.
380
- Naming/RescuedExceptionsVariableName:
381
- Exclude:
382
- - 'lib/net/ssh/connection/session.rb'
383
- - 'lib/net/ssh/service/forward.rb'
384
- - 'lib/net/ssh/verifiers/accept_new.rb'
385
-
386
330
  # Offense count: 23
387
331
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
388
- # AllowedNames: io, id, to, by, on, in, at, ip, db
389
- Naming/UncommunicativeMethodParamName:
332
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
333
+ Naming/MethodParameterName:
390
334
  Exclude:
391
335
  - 'lib/net/ssh/authentication/certificate.rb'
392
336
  - 'lib/net/ssh/authentication/ed25519.rb'
@@ -394,21 +338,50 @@ Naming/UncommunicativeMethodParamName:
394
338
  - 'lib/net/ssh/authentication/pageant.rb'
395
339
  - 'lib/net/ssh/buffer.rb'
396
340
  - 'lib/net/ssh/buffered_io.rb'
397
- - 'lib/net/ssh/ruby_compat.rb'
398
341
  - 'lib/net/ssh/test/socket.rb'
399
342
  - 'lib/net/ssh/transport/ctr.rb'
400
343
  - 'lib/net/ssh/transport/hmac/abstract.rb'
401
344
  - 'lib/net/ssh/transport/identity_cipher.rb'
402
345
  - 'test/connection/test_session.rb'
403
346
 
404
- # Offense count: 8
405
- # 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.
406
368
  # SupportedStyles: inline, group
407
369
  Style/AccessModifierDeclarations:
408
370
  Exclude:
409
371
  - 'lib/net/ssh/authentication/pageant.rb'
410
- - 'lib/net/ssh/transport/openssl.rb'
411
- - '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'
412
385
 
413
386
  # Offense count: 2
414
387
  # Cop supports --auto-correct.
@@ -419,36 +392,27 @@ Style/Alias:
419
392
  - 'lib/net/ssh/connection/session.rb'
420
393
  - 'lib/net/ssh/service/forward.rb'
421
394
 
422
- # Offense count: 31
395
+ # Offense count: 9
423
396
  # Cop supports --auto-correct.
424
397
  # Configuration parameters: EnforcedStyle.
425
398
  # SupportedStyles: always, conditionals
426
399
  Style/AndOr:
427
400
  Exclude:
428
- - 'lib/net/ssh/authentication/key_manager.rb'
429
- - 'lib/net/ssh/buffer.rb'
430
- - 'lib/net/ssh/buffered_io.rb'
431
401
  - 'lib/net/ssh/connection/channel.rb'
432
402
  - 'lib/net/ssh/connection/session.rb'
433
- - 'lib/net/ssh/key_factory.rb'
434
403
  - 'lib/net/ssh/service/forward.rb'
435
- - 'lib/net/ssh/test/channel.rb'
436
- - 'lib/net/ssh/test/script.rb'
437
- - 'lib/net/ssh/transport/cipher_factory.rb'
438
- - 'lib/net/ssh/transport/hmac.rb'
439
- - 'lib/net/ssh/transport/key_expander.rb'
440
- - 'test/common.rb'
441
404
 
442
405
  # Offense count: 2
443
406
  # Configuration parameters: AllowedChars.
407
+ # AllowedChars: ©
444
408
  Style/AsciiComments:
445
409
  Exclude:
446
410
  - 'lib/net/ssh/authentication/pageant.rb'
447
411
  - 'lib/net/ssh/buffered_io.rb'
448
412
 
449
- # Offense count: 8
413
+ # Offense count: 9
450
414
  # Cop supports --auto-correct.
451
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
415
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
452
416
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
453
417
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
454
418
  # FunctionalMethods: let, let!, subject, watch
@@ -463,53 +427,41 @@ Style/BlockDelimiters:
463
427
  - 'lib/net/ssh/transport/ctr.rb'
464
428
  - 'test/verifiers/test_always.rb'
465
429
 
466
- # Offense count: 7
467
- # Cop supports --auto-correct.
468
- # Configuration parameters: EnforcedStyle.
469
- # SupportedStyles: braces, no_braces, context_dependent
470
- Style/BracesAroundHashParameters:
471
- Exclude:
472
- - 'lib/net/ssh/config.rb'
473
- - 'test/integration/test_ed25519_pkeys.rb'
474
- - 'test/integration/test_id_rsa_keys.rb'
475
- - 'test/transport/test_hmac.rb'
476
- - 'test/transport/test_session.rb'
477
-
478
430
  # Offense count: 2
431
+ # Cop supports --auto-correct.
432
+ # Configuration parameters: AllowOnConstant.
479
433
  Style/CaseEquality:
480
434
  Exclude:
481
435
  - 'lib/net/ssh/buffer.rb'
482
436
  - 'lib/net/ssh/connection/session.rb'
483
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
+
484
445
  # Offense count: 1
485
446
  # Cop supports --auto-correct.
486
447
  Style/CharacterLiteral:
487
448
  Exclude:
488
449
  - 'test/test_buffer.rb'
489
450
 
490
- # Offense count: 15
451
+ # Offense count: 18
491
452
  # Cop supports --auto-correct.
492
- # Configuration parameters: AutoCorrect, EnforcedStyle.
453
+ # Configuration parameters: EnforcedStyle.
493
454
  # SupportedStyles: nested, compact
494
455
  Style/ClassAndModuleChildren:
456
+ Enabled: false
457
+
458
+ # Offense count: 1
459
+ # Cop supports --auto-correct.
460
+ # Configuration parameters: IgnoredMethods.
461
+ # IgnoredMethods: ==, equal?, eql?
462
+ Style/ClassEqualityComparison:
495
463
  Exclude:
496
- - 'lib/net/ssh/transport/ctr.rb'
497
- - 'lib/net/ssh/transport/hmac.rb'
498
- - 'lib/net/ssh/transport/hmac/md5.rb'
499
- - 'lib/net/ssh/transport/hmac/md5_96.rb'
500
- - 'lib/net/ssh/transport/hmac/none.rb'
501
- - 'lib/net/ssh/transport/hmac/ripemd160.rb'
502
- - 'lib/net/ssh/transport/hmac/sha1.rb'
503
- - 'lib/net/ssh/transport/hmac/sha1_96.rb'
504
- - 'lib/net/ssh/transport/hmac/sha2_256.rb'
505
- - 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
506
- - 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
507
- - 'lib/net/ssh/transport/hmac/sha2_512.rb'
508
- - 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
509
- - 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
510
- - 'lib/net/ssh/transport/kex.rb'
511
- - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
512
- - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb'
464
+ - 'lib/net/ssh/service/forward.rb'
513
465
 
514
466
  # Offense count: 7
515
467
  Style/ClassVars:
@@ -525,10 +477,16 @@ Style/ColonMethodCall:
525
477
  Exclude:
526
478
  - 'lib/net/ssh/authentication/ed25519.rb'
527
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
+
528
486
  # Offense count: 4
529
487
  # Cop supports --auto-correct.
530
488
  # Configuration parameters: Keywords.
531
- # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
489
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE
532
490
  Style/CommentAnnotation:
533
491
  Exclude:
534
492
  - 'lib/net/ssh/authentication/ed25519.rb'
@@ -537,6 +495,7 @@ Style/CommentAnnotation:
537
495
  - 'lib/net/ssh/config.rb'
538
496
 
539
497
  # Offense count: 3
498
+ # Cop supports --auto-correct.
540
499
  Style/CommentedKeyword:
541
500
  Exclude:
542
501
  - 'test/connection/test_session.rb'
@@ -554,13 +513,8 @@ Style/ConditionalAssignment:
554
513
  - 'lib/net/ssh/transport/state.rb'
555
514
  - 'test/test_key_factory.rb'
556
515
 
557
- # Offense count: 1
558
- # Cop supports --auto-correct.
559
- Style/DefWithParentheses:
560
- Exclude:
561
- - 'test/integration/test_forward.rb'
562
-
563
- # Offense count: 14
516
+ # Offense count: 12
517
+ # Configuration parameters: AllowedConstants.
564
518
  Style/Documentation:
565
519
  Exclude:
566
520
  - 'spec/**/*'
@@ -568,7 +522,6 @@ Style/Documentation:
568
522
  - 'lib/net/ssh/authentication/ed25519.rb'
569
523
  - 'lib/net/ssh/connection/keepalive.rb'
570
524
  - 'lib/net/ssh/connection/session.rb'
571
- - 'lib/net/ssh/ruby_compat.rb'
572
525
  - 'lib/net/ssh/test/extensions.rb'
573
526
  - 'lib/net/ssh/transport/kex.rb'
574
527
  - 'lib/net/ssh/transport/key_expander.rb'
@@ -576,15 +529,19 @@ Style/Documentation:
576
529
 
577
530
  # Offense count: 1
578
531
  # Cop supports --auto-correct.
579
- Style/EmptyLiteral:
532
+ Style/EvenOdd:
580
533
  Exclude:
581
- - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
534
+ - 'lib/net/ssh/buffer.rb'
582
535
 
583
- # Offense count: 1
536
+ # Offense count: 9
584
537
  # Cop supports --auto-correct.
585
- Style/EvenOdd:
538
+ Style/ExplicitBlockArgument:
586
539
  Exclude:
587
- - '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'
588
545
 
589
546
  # Offense count: 2
590
547
  # Cop supports --auto-correct.
@@ -595,32 +552,32 @@ Style/FormatString:
595
552
  - 'lib/net/ssh/authentication/pageant.rb'
596
553
  - 'lib/net/ssh/loggable.rb'
597
554
 
598
- # Offense count: 1
599
- # Configuration parameters: EnforcedStyle.
600
- # SupportedStyles: annotated, template, unannotated
601
- Style/FormatStringToken:
602
- Exclude:
603
- - 'lib/net/ssh/loggable.rb'
604
-
605
- # Offense count: 166
555
+ # Offense count: 173
606
556
  # Cop supports --auto-correct.
607
557
  # Configuration parameters: EnforcedStyle.
608
- # SupportedStyles: always, never
558
+ # SupportedStyles: always, always_true, never
609
559
  Style/FrozenStringLiteralComment:
610
560
  Enabled: false
611
561
 
612
- # Offense count: 34
562
+ # Offense count: 1
563
+ # Cop supports --auto-correct.
564
+ Style/GlobalStdStream:
565
+ Exclude:
566
+ - 'lib/net/ssh.rb'
567
+
568
+ # Offense count: 35
613
569
  # Configuration parameters: MinBodyLength.
614
570
  Style/GuardClause:
615
571
  Enabled: false
616
572
 
617
573
  # Offense count: 1
574
+ # Cop supports --auto-correct.
618
575
  # Configuration parameters: AllowIfModifier.
619
576
  Style/IfInsideElse:
620
577
  Exclude:
621
578
  - 'lib/net/ssh/connection/session.rb'
622
579
 
623
- # Offense count: 16
580
+ # Offense count: 13
624
581
  # Cop supports --auto-correct.
625
582
  Style/IfUnlessModifier:
626
583
  Exclude:
@@ -629,8 +586,6 @@ Style/IfUnlessModifier:
629
586
  - 'lib/net/ssh/proxy/command.rb'
630
587
  - 'lib/net/ssh/service/forward.rb'
631
588
  - 'lib/net/ssh/transport/ctr.rb'
632
- - 'lib/net/ssh/transport/kex.rb'
633
- - 'lib/net/ssh/transport/kex/abstract5656.rb'
634
589
  - 'lib/net/ssh/transport/key_expander.rb'
635
590
  - 'test/integration/test_proxy.rb'
636
591
  - 'test/test_key_factory.rb'
@@ -650,11 +605,6 @@ Style/LineEndConcatenation:
650
605
  - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
651
606
  - 'lib/net/ssh/verifiers/always.rb'
652
607
 
653
- # Offense count: 1
654
- Style/MethodMissingSuper:
655
- Exclude:
656
- - 'lib/net/ssh/connection/session.rb'
657
-
658
608
  # Offense count: 1
659
609
  Style/MissingRespondToMissing:
660
610
  Exclude:
@@ -667,15 +617,15 @@ Style/MultilineIfThen:
667
617
  - 'lib/net/ssh/buffered_io.rb'
668
618
  - 'lib/net/ssh/service/forward.rb'
669
619
 
670
- # Offense count: 6
620
+ # Offense count: 7
671
621
  # Cop supports --auto-correct.
672
622
  Style/MultilineWhenThen:
673
623
  Exclude:
674
- - 'lib/net/ssh/test/packet.rb'
675
624
  - 'lib/net/ssh/transport/packet_stream.rb'
676
625
  - 'lib/net/ssh/transport/session.rb'
677
626
 
678
627
  # Offense count: 5
628
+ # Cop supports --auto-correct.
679
629
  Style/MultipleComparison:
680
630
  Exclude:
681
631
  - 'lib/net/ssh/authentication/agent.rb'
@@ -683,14 +633,14 @@ Style/MultipleComparison:
683
633
  - 'lib/net/ssh/known_hosts.rb'
684
634
  - 'lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb'
685
635
 
686
- # Offense count: 41
636
+ # Offense count: 42
687
637
  # Cop supports --auto-correct.
688
638
  # Configuration parameters: EnforcedStyle.
689
639
  # SupportedStyles: literals, strict
690
640
  Style/MutableConstant:
691
641
  Enabled: false
692
642
 
693
- # Offense count: 13
643
+ # Offense count: 14
694
644
  # Cop supports --auto-correct.
695
645
  # Configuration parameters: EnforcedStyle.
696
646
  # SupportedStyles: both, prefix, postfix
@@ -734,7 +684,7 @@ Style/Not:
734
684
  Exclude:
735
685
  - 'lib/net/ssh/connection/channel.rb'
736
686
 
737
- # Offense count: 8
687
+ # Offense count: 11
738
688
  # Cop supports --auto-correct.
739
689
  # Configuration parameters: Strict.
740
690
  Style/NumericLiterals:
@@ -742,11 +692,28 @@ Style/NumericLiterals:
742
692
 
743
693
  # Offense count: 29
744
694
  # Cop supports --auto-correct.
745
- # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
695
+ # Configuration parameters: EnforcedStyle, IgnoredMethods.
746
696
  # SupportedStyles: predicate, comparison
747
697
  Style/NumericPredicate:
748
698
  Enabled: false
749
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
+
750
717
  # Offense count: 15
751
718
  # Cop supports --auto-correct.
752
719
  Style/ParallelAssignment:
@@ -771,7 +738,7 @@ Style/ParenthesesAroundCondition:
771
738
  - 'lib/net/ssh/transport/ctr.rb'
772
739
  - 'test/integration/test_proxy.rb'
773
740
 
774
- # Offense count: 33
741
+ # Offense count: 23
775
742
  # Cop supports --auto-correct.
776
743
  # Configuration parameters: PreferredDelimiters.
777
744
  Style/PercentLiteralDelimiters:
@@ -779,7 +746,7 @@ Style/PercentLiteralDelimiters:
779
746
  - 'net-ssh.gemspec'
780
747
  - 'test/test_config.rb'
781
748
 
782
- # Offense count: 15
749
+ # Offense count: 16
783
750
  # Cop supports --auto-correct.
784
751
  Style/PerlBackrefs:
785
752
  Exclude:
@@ -805,33 +772,62 @@ Style/Proc:
805
772
 
806
773
  # Offense count: 7
807
774
  # Cop supports --auto-correct.
808
- # Configuration parameters: EnforcedStyle.
775
+ # Configuration parameters: EnforcedStyle, AllowedCompactTypes.
809
776
  # SupportedStyles: compact, exploded
810
777
  Style/RaiseArgs:
811
778
  Exclude:
812
779
  - 'lib/net/ssh/authentication/ed25519.rb'
813
780
 
814
- # Offense count: 4
781
+ # Offense count: 5
815
782
  # Cop supports --auto-correct.
816
783
  Style/RedundantBegin:
817
784
  Exclude:
818
785
  - 'lib/net/ssh/buffered_io.rb'
786
+ - 'lib/net/ssh/service/forward.rb'
819
787
  - 'lib/net/ssh/verifiers/accept_new.rb'
820
788
  - 'test/manual/test_pageant.rb'
821
789
 
822
790
  # Offense count: 1
823
791
  # Cop supports --auto-correct.
824
- Style/RedundantParentheses:
792
+ Style/RedundantCondition:
825
793
  Exclude:
826
- - 'support/arcfour_check.rb'
794
+ - 'lib/net/ssh/proxy/command.rb'
827
795
 
828
- # Offense count: 59
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
829
825
  # Cop supports --auto-correct.
830
826
  # Configuration parameters: AllowMultipleReturnValues.
831
827
  Style/RedundantReturn:
832
828
  Enabled: false
833
829
 
834
- # Offense count: 14
830
+ # Offense count: 18
835
831
  # Cop supports --auto-correct.
836
832
  Style/RedundantSelf:
837
833
  Exclude:
@@ -848,8 +844,8 @@ Style/RescueModifier:
848
844
 
849
845
  # Offense count: 25
850
846
  # Cop supports --auto-correct.
851
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
852
- # Whitelist: present?, blank?, presence, try, try!
847
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
848
+ # AllowedMethods: present?, blank?, presence, try, try!
853
849
  Style/SafeNavigation:
854
850
  Exclude:
855
851
  - 'lib/net/ssh/authentication/key_manager.rb'
@@ -896,6 +892,15 @@ Style/SingleLineMethods:
896
892
  Exclude:
897
893
  - 'lib/net/ssh/buffered_io.rb'
898
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
+
899
904
  # Offense count: 18
900
905
  # Cop supports --auto-correct.
901
906
  # Configuration parameters: EnforcedStyle.
@@ -910,16 +915,32 @@ Style/SpecialGlobalVars:
910
915
  - 'test/manual/test_pageant.rb'
911
916
  - 'test/test_all.rb'
912
917
 
913
- # Offense count: 1754
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
914
935
  # Cop supports --auto-correct.
915
936
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
916
937
  # SupportedStyles: single_quotes, double_quotes
917
938
  Style/StringLiterals:
918
939
  Enabled: false
919
940
 
920
- # Offense count: 11
941
+ # Offense count: 7
921
942
  # Cop supports --auto-correct.
922
- # Configuration parameters: IgnoredMethods.
943
+ # Configuration parameters: AllowMethodsWithArguments, IgnoredMethods.
923
944
  # IgnoredMethods: respond_to, define_method
924
945
  Style/SymbolProc:
925
946
  Exclude:
@@ -928,29 +949,17 @@ Style/SymbolProc:
928
949
  - 'lib/net/ssh/connection/session.rb'
929
950
  - 'lib/net/ssh/test/extensions.rb'
930
951
  - 'lib/net/ssh/transport/algorithms.rb'
931
- - 'test/integration/test_forward.rb'
932
- - 'test/test/test_test.rb'
933
-
934
- # Offense count: 1
935
- # Cop supports --auto-correct.
936
- Style/UnneededCondition:
937
- Exclude:
938
- - 'lib/net/ssh/proxy/command.rb'
939
952
 
940
- # Offense count: 4
941
- # Cop supports --auto-correct.
942
- Style/UnneededInterpolation:
943
- Exclude:
944
- - 'lib/net/ssh/proxy/socks5.rb'
945
- - 'lib/net/ssh/transport/session.rb'
946
- - 'test/integration/test_forward.rb'
947
-
948
- # Offense count: 15
953
+ # Offense count: 14
949
954
  # Cop supports --auto-correct.
950
- Style/UnneededPercentQ:
955
+ Style/UnpackFirst:
951
956
  Exclude:
952
- - 'net-ssh.gemspec'
953
- - 'test/test_config.rb'
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'
954
963
 
955
964
  # Offense count: 2
956
965
  # Cop supports --auto-correct.
@@ -959,7 +968,7 @@ Style/WhileUntilDo:
959
968
  - 'lib/net/ssh/config.rb'
960
969
  - 'test/integration/common.rb'
961
970
 
962
- # Offense count: 3
971
+ # Offense count: 4
963
972
  # Cop supports --auto-correct.
964
973
  # Configuration parameters: WordRegex.
965
974
  # SupportedStyles: percent, brackets
@@ -974,9 +983,92 @@ Style/ZeroLengthPredicate:
974
983
  - 'lib/net/ssh/buffered_io.rb'
975
984
  - 'lib/net/ssh/connection/channel.rb'
976
985
 
977
- # Offense count: 1636
978
- # Cop supports --auto-correct.
979
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
980
- # URISchemes: http, https
981
- Metrics/LineLength:
982
- Max: 932
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