gun_accessory_supply 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/lib/gun_accessory_supply/base.rb +15 -7
- data/lib/gun_accessory_supply/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 750de4d07298347153bf667730f43f33253676bb0fcedecc669705fb3fa21757
|
4
|
+
data.tar.gz: 1a440469ea3e4f03b703bf08d38ca6d97264de5d82e9edd296939ae7b1af5c52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
|
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.
|
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-
|
12
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|