gun_accessory_supply 1.0.3 → 1.0.4

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: 35bcbe45f5b867eb42634dbdf9a059f1c1c045f5fa16723b8d76a53891f04305
4
- data.tar.gz: 1d0ebc9a45a9bf4959064715fa7e3455ae12338cd78c9659b7b69a251b106a2a
3
+ metadata.gz: 750de4d07298347153bf667730f43f33253676bb0fcedecc669705fb3fa21757
4
+ data.tar.gz: 1a440469ea3e4f03b703bf08d38ca6d97264de5d82e9edd296939ae7b1af5c52
5
5
  SHA512:
6
- metadata.gz: 420f29d55e1526fbeab06298541bb5faa81fb80401dcf61792059ce456a340e116feedbab833a0f397dc606529200f184cbf409f25ece4a85677882a03d64366
7
- data.tar.gz: '083c619ca4aed7ae3d07af6fd33cbacb332242e0a5d1ad2c5e4b61bd06afded6b3b0dae32928f3ba9d22da42edc3d1f31e6518d290b4dc62538fa4469a5c7590'
6
+ metadata.gz: 2e0fe03e016100ce83766af5c24bcf513c1f33efbe334c5cb7711c9700187577acac6bf775b4864795c14c501afc073f8b34a01e34abe2a246961d049046d192
7
+ data.tar.gz: a7325fac181cb9c2b6944041cfb7e1eb726efc570689e2c382847ea777762570440465e18c6b4dfea63e7b15f5254ab52fe102d7a3cdee918ae8b4eaace4e6ad
data/.DS_Store CHANGED
Binary file
@@ -4,13 +4,21 @@ module GunAccessorySupply
4
4
  def self.connect(options = {})
5
5
  requires!(options, :username, :password)
6
6
 
7
- Net::SFTP.start(
8
- GunAccessorySupply.config.proxy_host || GunAccessorySupply.config.sftp_host,
9
- options[:username],
10
- password: options[:password],
11
- port: GunAccessorySupply.config.proxy_port || GunAccessorySupply.config.sftp_port
12
- ) do |sftp|
13
- yield(sftp)
7
+ begin
8
+ ssh_connection = Net::SSH.start(
9
+ GunAccessorySupply.config.proxy_host || GunAccessorySupply.config.sftp_host,
10
+ options[:username],
11
+ password: options[:password],
12
+ port: GunAccessorySupply.config.proxy_port || GunAccessorySupply.config.sftp_port
13
+ )
14
+ sftp_session = Net::SFTP::Session.new(ssh_connection)
15
+
16
+ sftp_session.connect!
17
+
18
+ yield(sftp_session)
19
+ ensure
20
+ sftp_session&.close_channel
21
+ ssh_connection&.close
14
22
  end
15
23
  end
16
24
 
@@ -1,3 +1,3 @@
1
1
  module GunAccessorySupply
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gun_accessory_supply
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Beninate
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-11-23 00:00:00.000000000 Z
12
+ date: 2022-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport