fiverr_copy 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fiverr_copy/client.rb +1 -2
- data/lib/fiverr_copy/server.rb +1 -1
- data/lib/fiverr_copy/version.rb +1 -1
- metadata +3 -3
data/lib/fiverr_copy/client.rb
CHANGED
@@ -56,7 +56,7 @@ class FiverrCopy::Client
|
|
56
56
|
end
|
57
57
|
|
58
58
|
temp_file = Tempfile.new("fiverr_copy_#{Time.now.to_i}.tgz")
|
59
|
-
|
59
|
+
File.new(filename, "w+") do |f|
|
60
60
|
Thread.start do
|
61
61
|
while (stream = session.read(chunk)) do
|
62
62
|
|
@@ -72,6 +72,5 @@ class FiverrCopy::Client
|
|
72
72
|
end #end thread conversation
|
73
73
|
end
|
74
74
|
puts "Done."
|
75
|
-
FileUtils.mv(temp_file.path, "#{Dir.pwd}/#{filename}")
|
76
75
|
end
|
77
76
|
end
|
data/lib/fiverr_copy/server.rb
CHANGED
@@ -65,7 +65,7 @@ class FiverrCopy::Server
|
|
65
65
|
File.open("#{compressed_file_name}") do |transmitted_file|
|
66
66
|
client_session.puts "FILENAME:#{"#{compressed_file_name}"}"
|
67
67
|
puts "Transmitting #{transmitted_file.to_s} (#{File.size(transmitted_file)})"
|
68
|
-
while !(client_session.closed?) && (
|
68
|
+
while !(client_session.closed?) && (buffer = transmitted_file.read(self.recipe.chunk_size)) do
|
69
69
|
puts "Sending #{buffer.size}B"
|
70
70
|
client_session.puts buffer
|
71
71
|
end
|
data/lib/fiverr_copy/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fiverr_copy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 15
|
10
|
+
version: 0.0.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Elad Meidar
|