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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35bcbe45f5b867eb42634dbdf9a059f1c1c045f5fa16723b8d76a53891f04305
4
- data.tar.gz: 1d0ebc9a45a9bf4959064715fa7e3455ae12338cd78c9659b7b69a251b106a2a
3
+ metadata.gz: 547db74274971a154fb424671e3fe26123498095eebbfa6ee74d4d5745a1420c
4
+ data.tar.gz: 6f009574bc53717cc16b9874ec4b678dd10d3387ee96f29ad2fd90574a617d45
5
5
  SHA512:
6
- metadata.gz: 420f29d55e1526fbeab06298541bb5faa81fb80401dcf61792059ce456a340e116feedbab833a0f397dc606529200f184cbf409f25ece4a85677882a03d64366
7
- data.tar.gz: '083c619ca4aed7ae3d07af6fd33cbacb332242e0a5d1ad2c5e4b61bd06afded6b3b0dae32928f3ba9d22da42edc3d1f31e6518d290b4dc62538fa4469a5c7590'
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", "< 7"
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
- 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.5'.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.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: 2022-11-23 00:00:00.000000000 Z
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.0.9
144
+ rubygems_version: 3.4.8
151
145
  signing_key:
152
146
  specification_version: 4
153
147
  summary: Ruby library for Gun Accessory Supply