remotus 1.1.0 → 1.1.1

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: e6b07dbe42ab741bdb688bed9f6ce1d09ed2af8643291c57ec9aeedaaad0a19a
4
- data.tar.gz: a39ecf434564157c1e72d98cf840abadc1a406f91988ee7c47cf7c22d9643760
3
+ metadata.gz: 66301e654fe9408264dbf7d7313fb93ff7cc3e5b8758cd5584f9d69aef477a4e
4
+ data.tar.gz: 5c8793e11d677261f6db58fb415030b23262b0c61559777282ea29413e0203ba
5
5
  SHA512:
6
- metadata.gz: f48c3e374b870a60664cf35838204755a83599a534113309abfecb40e5a5862f10091bd7bc19d8353a8a5716c71fe02dea043f891db998dd521451a998be4419
7
- data.tar.gz: 0c3d1f3e5dfbae5c2aeaec9d18f3eb4f4b99759b4c883e3298691e7cad7a91fa71d03f595cffb9bab07f9191844284a211c5fb76ff7900af56791ea6ed9a6f2a
6
+ metadata.gz: 2567a652c903e2538ceb352b01ec606e983b5aa6f64a64d707ac35302121462cd15373f6463920053831d169f1cb37c0287be206798f81b28afb5e0c30de357a
7
+ data.tar.gz: cacd8478695fbac5ea33d76356a5d553af541249615c3ff57b60adf497e99593784a16d8ae5d2fb61803565f49b40d7e6ab0ee7a4c7b019d0502d57cf5406c14
data/.rubocop.yml CHANGED
@@ -46,3 +46,6 @@ Metrics/ParameterLists:
46
46
 
47
47
  Gemspec/RequireMFA:
48
48
  Enabled: false
49
+
50
+ Gemspec/DevelopmentDependencies:
51
+ EnforcedStyle: gemspec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## [1.1.1] - 2023-05-26
2
+ * Handle close failures and improve logging around connection status.
3
+
1
4
  ## [1.1.0] - 2023-05-25
2
5
  * Improve exponential backoff during SSH retries.
3
6
  * Force connection close on IOError (closed stream).
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- remotus (1.1.0)
4
+ remotus (1.1.1)
5
5
  connection_pool (~> 2.4)
6
6
  net-scp (~> 4.0)
7
7
  net-ssh (~> 7.1)
@@ -15,7 +15,7 @@ GEM
15
15
  specs:
16
16
  ast (2.4.2)
17
17
  builder (3.2.4)
18
- connection_pool (2.4.0)
18
+ connection_pool (2.4.1)
19
19
  diff-lcs (1.5.0)
20
20
  erubi (1.12.0)
21
21
  ffi (1.15.5)
@@ -57,7 +57,7 @@ GEM
57
57
  diff-lcs (>= 1.2.0, < 2.0)
58
58
  rspec-support (~> 3.12.0)
59
59
  rspec-support (3.12.0)
60
- rubocop (1.50.2)
60
+ rubocop (1.51.0)
61
61
  json (~> 2.3)
62
62
  parallel (~> 1.10)
63
63
  parser (>= 3.2.0.0)
@@ -67,15 +67,18 @@ GEM
67
67
  rubocop-ast (>= 1.28.0, < 2.0)
68
68
  ruby-progressbar (~> 1.7)
69
69
  unicode-display_width (>= 2.4.0, < 3.0)
70
- rubocop-ast (1.28.0)
70
+ rubocop-ast (1.28.1)
71
71
  parser (>= 3.2.1.0)
72
72
  rubocop-capybara (2.18.0)
73
73
  rubocop (~> 1.41)
74
+ rubocop-factory_bot (2.23.1)
75
+ rubocop (~> 1.33)
74
76
  rubocop-rake (0.6.0)
75
77
  rubocop (~> 1.0)
76
- rubocop-rspec (2.20.0)
78
+ rubocop-rspec (2.22.0)
77
79
  rubocop (~> 1.33)
78
80
  rubocop-capybara (~> 2.17)
81
+ rubocop-factory_bot (~> 2.22)
79
82
  ruby-progressbar (1.13.0)
80
83
  rubyntlm (0.6.3)
81
84
  rubyzip (2.3.2)
@@ -154,9 +154,21 @@ module Remotus
154
154
  # Closes the current SSH connection if it is active
155
155
  #
156
156
  def close
157
- @connection&.close
157
+ Remotus.logger.debug { "Closing SSH connection." }
158
158
 
159
- @gateway&.connection&.shutdown! if via_gateway?
159
+ begin
160
+ @connection&.close
161
+ rescue StandardError => e
162
+ Remotus.logger.warn { "Failed to close existing SSH connection with error #{e}" }
163
+ end
164
+
165
+ begin
166
+ @gateway&.connection&.shutdown! if via_gateway?
167
+ rescue StandardError => e
168
+ Remotus.logger.warn { "Failed to close existing SSH gateway connection with error #{e}" }
169
+ end
170
+
171
+ Remotus.logger.debug { "Setting @gateway and @connection to nil." }
160
172
 
161
173
  @gateway = nil
162
174
  @connection = nil
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Remotus
4
4
  # Remotus gem version
5
- VERSION = "1.1.0"
5
+ VERSION = "1.1.1"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remotus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Newell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-25 00:00:00.000000000 Z
11
+ date: 2023-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool