bill_hicks 1.3.5 → 1.3.6

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
  SHA1:
3
- metadata.gz: 6784b224ae8c58121d96c9dffc28344b6a937e78
4
- data.tar.gz: 3ff224e10f9aa272b9a49a5c6e3a95a24b73d34d
3
+ metadata.gz: aeac0daadb1a4b83b62eb8048b35eeb32da12c76
4
+ data.tar.gz: 32f45f82c8339ab6b770f1ac37f48e7c2745e4cf
5
5
  SHA512:
6
- metadata.gz: 77b2662dfac9162782593a4d9bec8f4972e21909917078959eee31568b8add3fc7f93509af0dccb1dd89879b00ad85fbf8cf998b42c66265eba65e24453cefb5
7
- data.tar.gz: 1e4bc7a9cb8a85a5353f947282bfd9f2e93e2541fb4a789843a182553fc53ca666519ba6bf65702e2ab6a1c44e4a30cc37c39dc1b60fed1a148937e8d8b6fc19
6
+ metadata.gz: 60b950f3f3742834fc2a9620bf88cbee597f7cfcd5b059fdbe4daf4e5574ca3d9b825c61dbc35427baf5ec8820afe39ff6f8b7e52914e25b60b3c8f8fd3156f2
7
+ data.tar.gz: a69ffb94cd6fb5f7dedc82012ab43ae316cc13b1f73c1e30b171e726b361a785ec8c31219ae3d41de11c1d650a91faf76c2f1225b7c3f01634261ba9b6212269
@@ -5,8 +5,12 @@ module BillHicks
5
5
  requires!(options, :username, :password)
6
6
 
7
7
  Net::FTP.open(BillHicks.config.ftp_host, options[:username], options[:password]) do |ftp|
8
- ftp.passive = true
9
- yield ftp
8
+ begin
9
+ ftp.passive = true
10
+ yield ftp
11
+ ensure
12
+ ftp.close
13
+ end
10
14
  end
11
15
  rescue Net::FTPPermError
12
16
  raise BillHicks::NotAuthenticated
@@ -35,7 +39,11 @@ module BillHicks
35
39
  # Instance methods become class methods through inheritance
36
40
  def connect(options)
37
41
  self.class.connect(options) do |ftp|
38
- yield ftp
42
+ begin
43
+ yield ftp
44
+ ensure
45
+ ftp.close
46
+ end
39
47
  end
40
48
  end
41
49
 
@@ -1,3 +1,3 @@
1
1
  module BillHicks
2
- VERSION = '1.3.5'
2
+ VERSION = '1.3.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bill_hicks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Campbell
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-03 00:00:00.000000000 Z
11
+ date: 2017-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: smarter_csv