gun_accessory_supply 1.0.3 → 1.0.5
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/gun_accessory_supply.gemspec +1 -1
- data/lib/gun_accessory_supply/base.rb +15 -7
- data/lib/gun_accessory_supply/version.rb +1 -1
- metadata +3 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 547db74274971a154fb424671e3fe26123498095eebbfa6ee74d4d5745a1420c
|
4
|
+
data.tar.gz: 6f009574bc53717cc16b9874ec4b678dd10d3387ee96f29ad2fd90574a617d45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c72c1a84bd165f3b37cacd04ca4aafeccf85dadbfa5e01dd2ece55ffb7b5573478aa038fe126df355f01bc8006a05cf87e0e5ce094cb789d900d09bbbd12658
|
7
|
+
data.tar.gz: d314752bfcdd9225934986d2ec4b942f09637771fe639b76c03bc078bcb0187bb26675d036eefee50d7bd762c562b4797db9129694edfac8537d753a0cd6fbeb
|
data/.DS_Store
CHANGED
Binary file
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_runtime_dependency "activesupport", ">= 5"
|
24
|
+
spec.add_runtime_dependency "activesupport", ">= 5"
|
25
25
|
spec.add_runtime_dependency "net-sftp"
|
26
26
|
spec.add_runtime_dependency "cxml"
|
27
27
|
|
@@ -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.5
|
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:
|
12
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -18,9 +18,6 @@ dependencies:
|
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '5'
|
21
|
-
- - "<"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '7'
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -28,9 +25,6 @@ dependencies:
|
|
28
25
|
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '5'
|
31
|
-
- - "<"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '7'
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: net-sftp
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
141
|
- !ruby/object:Gem::Version
|
148
142
|
version: '0'
|
149
143
|
requirements: []
|
150
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.4.8
|
151
145
|
signing_key:
|
152
146
|
specification_version: 4
|
153
147
|
summary: Ruby library for Gun Accessory Supply
|