sshkit 1.23.1 → 1.23.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8af10c24f9ba9204b96596dbdebafc11e685870643ef910926f834d793758b57
4
- data.tar.gz: 862c58e68660bbb27206e478db3f1946fde1a3a6f5165413329b50b154208aed
3
+ metadata.gz: deb517c2ce9ebf51e9dbb9899a16ba4993cc8159045fb6bbc0da83f980e60662
4
+ data.tar.gz: 1ddc2ed93b2293a34c49f42838d3e2e6ed7bb76c622e9533db156862abf95d40
5
5
  SHA512:
6
- metadata.gz: 5d8b5501b9465a66d34f7b21833b4da59c41a2a27b10f895f530082fee9b93181a8cb95af8d05c14b76a4681870ef38627a90fb2d2f70b117c1ab3732636d4a4
7
- data.tar.gz: c68f53bf25284db54f8ff4becc67b74440196b12b89fc6b143d9a8fb2583ebfd0584ed936a30711634bf4bf38b85cdf33a1a69b41aa73712996e6d7bd36dc786
6
+ metadata.gz: a06ca7e0df5e0cc49a9005cf29e97f4a229e8ccb6aa3d89f7e12cde841253d842904b2f5bbf3550a96875b1c06bee5abb54301f68826197bf3f47ad6a62d30cf
7
+ data.tar.gz: 1e92da0637c7c9dbc67f3fe5a893c8a7b7e551b981054487e3d93c47e463f792449fb0edd22126b686e0a5d09aecccf2d1cfbd2bfd1fe59e99a5127b27365cac
@@ -30,6 +30,8 @@ jobs:
30
30
  bundler-cache: true
31
31
  - name: Run tests
32
32
  run: bundle exec rake test:units
33
+ env:
34
+ RUBYOPT: ${{ startsWith(matrix.ruby, 'head') && '--enable=frozen-string-literal' || '' }}
33
35
 
34
36
  test-legacy:
35
37
  runs-on: ubuntu-20.04
data/lib/sshkit/color.rb CHANGED
@@ -44,8 +44,8 @@ module SSHKit
44
44
  return string unless COLOR_CODES.key?(color)
45
45
 
46
46
  result = mode == :bold ? "\e[1;" : "\e[0;"
47
- result << COLOR_CODES.fetch(color).to_s
48
- result << ";49m#{string}\e[0m"
47
+
48
+ "#{result}#{COLOR_CODES.fetch(color)};49m#{string}\e[0m"
49
49
  end
50
50
 
51
51
  # Returns `true` if the underlying output is a tty, or if the SSHKIT_COLOR
@@ -1,3 +1,3 @@
1
1
  module SSHKit
2
- VERSION = "1.23.1".freeze
2
+ VERSION = "1.23.2".freeze
3
3
  end
@@ -112,7 +112,12 @@ module SSHKit
112
112
  end
113
113
 
114
114
  def test_background_logs_deprecation_warnings
115
- deprecation_out = ''
115
+ deprecation_out =
116
+ if RUBY_VERSION < "2.3"
117
+ ''
118
+ else
119
+ +''
120
+ end
116
121
  SSHKit.config.deprecation_output = deprecation_out
117
122
 
118
123
  ExampleBackend.new do
@@ -211,7 +211,13 @@ module SSHKit
211
211
  end
212
212
 
213
213
  def test_deprecated_stdtream_accessors
214
- deprecation_out = ''
214
+ deprecation_out =
215
+ if RUBY_VERSION < "2.3"
216
+ ''
217
+ else
218
+ +''
219
+ end
220
+
215
221
  SSHKit.config.deprecation_output = deprecation_out
216
222
 
217
223
  c = Command.new(:whoami)
@@ -11,7 +11,13 @@ module SSHKit
11
11
  end
12
12
 
13
13
  def test_deprecation_output
14
- output = ''
14
+ output =
15
+ if RUBY_VERSION < "2.3"
16
+ ''
17
+ else
18
+ +''
19
+ end
20
+
15
21
  SSHKit.config.deprecation_output = output
16
22
  SSHKit.config.deprecation_logger.log('Test')
17
23
  assert_equal "[Deprecated] Test\n", output.lines.first
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sshkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.1
4
+ version: 1.23.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Hambley
8
8
  - Tom Clements
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2024-09-05 00:00:00.000000000 Z
11
+ date: 2024-10-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: base64
@@ -323,7 +322,6 @@ licenses:
323
322
  - MIT
324
323
  metadata:
325
324
  changelog_uri: https://github.com/capistrano/sshkit/releases
326
- post_install_message:
327
325
  rdoc_options: []
328
326
  require_paths:
329
327
  - lib
@@ -338,8 +336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
338
336
  - !ruby/object:Gem::Version
339
337
  version: '0'
340
338
  requirements: []
341
- rubygems_version: 3.5.16
342
- signing_key:
339
+ rubygems_version: 3.6.0.dev
343
340
  specification_version: 4
344
341
  summary: SSHKit makes it easy to write structured, testable SSH commands in Ruby
345
342
  test_files: