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 +4 -4
- data/lib/bill_hicks/base.rb +11 -3
- data/lib/bill_hicks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeac0daadb1a4b83b62eb8048b35eeb32da12c76
|
4
|
+
data.tar.gz: 32f45f82c8339ab6b770f1ac37f48e7c2745e4cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60b950f3f3742834fc2a9620bf88cbee597f7cfcd5b059fdbe4daf4e5574ca3d9b825c61dbc35427baf5ec8820afe39ff6f8b7e52914e25b60b3c8f8fd3156f2
|
7
|
+
data.tar.gz: a69ffb94cd6fb5f7dedc82012ab43ae316cc13b1f73c1e30b171e726b361a785ec8c31219ae3d41de11c1d650a91faf76c2f1225b7c3f01634261ba9b6212269
|
data/lib/bill_hicks/base.rb
CHANGED
@@ -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
|
-
|
9
|
-
|
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
|
-
|
42
|
+
begin
|
43
|
+
yield ftp
|
44
|
+
ensure
|
45
|
+
ftp.close
|
46
|
+
end
|
39
47
|
end
|
40
48
|
end
|
41
49
|
|
data/lib/bill_hicks/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smarter_csv
|