filbunke 1.8.4 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/filbunke.gemspec +3 -3
- data/lib/filbunke/client.rb +7 -2
- metadata +6 -6
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ begin
|
|
9
9
|
gem.description = %Q{Filbunke client and library}
|
10
10
|
gem.email = "info@deltaprojects.com"
|
11
11
|
gem.homepage = "http://github.com/deltaprojects/filbunke"
|
12
|
-
gem.authors = ["
|
12
|
+
gem.authors = ["Bjorn Sperber", "Karl Ravn"]
|
13
13
|
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
|
14
14
|
gem.files.exclude 'pkg'
|
15
15
|
gem.executables = ['filbunked']
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.9.0
|
data/filbunke.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{filbunke}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.9.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["
|
12
|
-
s.date = %q{
|
11
|
+
s.authors = ["Bjorn Sperber", "Karl Ravn"]
|
12
|
+
s.date = %q{2013-01-03}
|
13
13
|
s.default_executable = %q{filbunked}
|
14
14
|
s.description = %q{Filbunke client and library}
|
15
15
|
s.email = %q{info@deltaprojects.com}
|
data/lib/filbunke/client.rb
CHANGED
@@ -141,7 +141,7 @@ module Filbunke
|
|
141
141
|
|
142
142
|
if file.url =~ /^http:\/\//
|
143
143
|
update_http_file!(file, local_file_path)
|
144
|
-
elsif file.url =~ /^hdfs:\/\//
|
144
|
+
elsif (file.url =~ /^hdfs:\/\//) || (file.url =~ /^hftp:\/\//)
|
145
145
|
success = update_hdfs_file!(file, local_file_path)
|
146
146
|
run_callbacks(file, local_file_path) if success
|
147
147
|
else
|
@@ -238,7 +238,12 @@ module Filbunke
|
|
238
238
|
begin
|
239
239
|
::FileUtils.mkdir_p(::File.dirname(local_file_path))
|
240
240
|
::FileUtils.rm_f("#{local_file_path}.tmp")
|
241
|
-
|
241
|
+
url = file.url
|
242
|
+
if (url =~ /^hdfs:\/\//)
|
243
|
+
url.gsub!(/hdfs:\/\//, "hftp://")
|
244
|
+
url.gsub!(/:8020/, "")
|
245
|
+
end
|
246
|
+
hdfs_cmd = "#{@repository.hadoop_binary} fs -copyToLocal #{url} #{local_file_path}.tmp"
|
242
247
|
@logger.log "Trying to update #{local_file_path} with '#{hdfs_cmd}'"
|
243
248
|
|
244
249
|
pid, stdin, stdout, stderr = Open4::popen4 hdfs_cmd
|
metadata
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filbunke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 51
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 9
|
9
|
+
- 0
|
10
|
+
version: 1.9.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
13
|
+
- Bjorn Sperber
|
14
14
|
- Karl Ravn
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2013-01-03 00:00:00 +01:00
|
20
20
|
default_executable: filbunked
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|