fiverr_copy 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,7 +53,7 @@ class FiverrCopy::Client
53
53
 
54
54
  @real_file_name = ""
55
55
  temp_file = "fiverr_copy_#{Time.now.to_i}"
56
- TempFile.open(temp_file) do |f|
56
+ Tempfile.open(temp_file) do |f|
57
57
  while (session = server.accept)
58
58
  Thread.start do
59
59
  ## I want to be sure to output something on the server side
@@ -17,7 +17,7 @@ class FiverrCopy::Recipe
17
17
  raise "No clients specified" if clients_array.empty?
18
18
  clients_array.uniq!
19
19
  next_hop = nil
20
- clients_array.each do |client|
20
+ clients_array.reverse.each do |client|
21
21
  self.initialized_clients << FiverrCopy::Client.new(:client_ip => client,
22
22
  :username => self.username,
23
23
  :next_client => next_hop,
@@ -17,14 +17,15 @@ class FiverrCopy::Server
17
17
  self.recipe.initialized_clients.each do |client|
18
18
  threads << Thread.new(client) do |current_client|
19
19
  current_client.setup!
20
+ puts "Connecting to #{current_client.client_ip}"
20
21
  Net::SSH.start(current_client.client_ip, current_client.username) do |ssh|
21
22
  next_client = "--nexthop #{current_client.next_client}" if current_client.next_client
23
+ puts "Running: fiverr_copy --client --port #{current_client.port} #{next_client} - #{current_client.client_ip}"
22
24
  ssh.exec("fiverr_copy --client --port #{current_client.port} #{next_client}")
23
25
  end
24
- end
26
+ end.join
25
27
  end
26
28
 
27
- threads.collect(&:join)
28
29
  compressed_file_name = "fiverr_copy_compressed_#{Time.now.to_i}"
29
30
 
30
31
  begin
@@ -1,3 +1,3 @@
1
1
  module FiverrCopy
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
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: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 9
10
- version: 0.0.9
9
+ - 10
10
+ version: 0.0.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Elad Meidar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-01 00:00:00 +03:00
18
+ date: 2012-04-02 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency