ftp-ext 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ftp-ext.gemspec +2 -2
- data/lib/ftp-ext.rb +5 -3
- metadata +6 -6
data/ftp-ext.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ftp-ext}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Zach Pendleton"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-01-03}
|
13
13
|
s.description = %q{FTPExt adds two methods (put_dir and rmrf_dir) to Net::FTP to copy, sync, and delete whole folders over FTP.}
|
14
14
|
s.email = %q{zachpendleton@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/ftp-ext.rb
CHANGED
@@ -31,8 +31,8 @@ module Net
|
|
31
31
|
fpath = File.join(file_segments[0..n])
|
32
32
|
|
33
33
|
unless remote_file_exists?(fpath) || fpath == ""
|
34
|
-
puts "mkdir #{fpath}" if options[:verbose] == true
|
35
34
|
mkdir(fpath)
|
35
|
+
puts "mkdir #{fpath}" if options[:verbose] == true
|
36
36
|
end
|
37
37
|
end
|
38
38
|
else
|
@@ -131,11 +131,13 @@ module Net
|
|
131
131
|
else
|
132
132
|
fname = fpath.pop
|
133
133
|
fpath.map! { |v| v == "" ? File::SEPARATOR : v }
|
134
|
-
fpath =
|
134
|
+
fpath = File.join(fpath)
|
135
135
|
|
136
136
|
# Wrap return in begin..rescue because nlst errors on empty directory
|
137
137
|
begin
|
138
|
-
|
138
|
+
# Standardize output across Windows, Linux, OS X
|
139
|
+
dirlist = nlst(fpath).map { |f| f.match(/[^\/\\]+$/)[0] }
|
140
|
+
return dirlist.include?(fname)
|
139
141
|
rescue Exception => e
|
140
142
|
return false if e.message.match("450")
|
141
143
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ftp-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Zach Pendleton
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-01-03 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements: []
|
100
100
|
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 1.
|
102
|
+
rubygems_version: 1.4.1
|
103
103
|
signing_key:
|
104
104
|
specification_version: 3
|
105
105
|
summary: Folder copying and deletion methods for Net::FTP
|