sshkit 1.23.0 → 1.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f40ad7a1382ef707a259094c945692f08c44392e0bba7c37fe4099e748301a5e
4
- data.tar.gz: 72f3fea395eaaa0036dd701c04692e75c379867465cffaa4ac6cdf1c4f647813
3
+ metadata.gz: deb517c2ce9ebf51e9dbb9899a16ba4993cc8159045fb6bbc0da83f980e60662
4
+ data.tar.gz: 1ddc2ed93b2293a34c49f42838d3e2e6ed7bb76c622e9533db156862abf95d40
5
5
  SHA512:
6
- metadata.gz: ab28074eba7cb9bdbfcbca9857f5e74fc89ed06acdf872148fcb7329b45754a714c658dacd879fead076de3bbd2541d84bcfd8ef66369007a1444b3edc2b3ac3
7
- data.tar.gz: a6d0deb01db101ba2a41dcfcd861a10c7604b17ebe5e25981eebe6d74a0b5c9a9ea345d2dcbb45a4ba30952b571b6736f3bdcd7721d7d8fe684db772cc723700
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.0".freeze
2
+ VERSION = "1.23.2".freeze
3
3
  end
data/sshkit.gemspec CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |gem|
24
24
  gem.add_runtime_dependency('net-ssh', '>= 2.8.0')
25
25
  gem.add_runtime_dependency('net-scp', '>= 1.1.2')
26
26
  gem.add_runtime_dependency('net-sftp', '>= 2.1.2')
27
+ gem.add_runtime_dependency('ostruct') if RUBY_VERSION >= "2.5"
27
28
 
28
29
  gem.add_development_dependency('danger')
29
30
  gem.add_development_dependency('minitest', '>= 5.0.0')
@@ -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.0
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-06-23 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
@@ -67,6 +66,20 @@ dependencies:
67
66
  - - ">="
68
67
  - !ruby/object:Gem::Version
69
68
  version: 2.1.2
69
+ - !ruby/object:Gem::Dependency
70
+ name: ostruct
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
70
83
  - !ruby/object:Gem::Dependency
71
84
  name: danger
72
85
  requirement: !ruby/object:Gem::Requirement
@@ -309,7 +322,6 @@ licenses:
309
322
  - MIT
310
323
  metadata:
311
324
  changelog_uri: https://github.com/capistrano/sshkit/releases
312
- post_install_message:
313
325
  rdoc_options: []
314
326
  require_paths:
315
327
  - lib
@@ -324,8 +336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
336
  - !ruby/object:Gem::Version
325
337
  version: '0'
326
338
  requirements: []
327
- rubygems_version: 3.5.13
328
- signing_key:
339
+ rubygems_version: 3.6.0.dev
329
340
  specification_version: 4
330
341
  summary: SSHKit makes it easy to write structured, testable SSH commands in Ruby
331
342
  test_files: