fiverr_copy 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/fiverr_copy CHANGED
@@ -45,12 +45,15 @@ end
45
45
 
46
46
  optparse.parse!
47
47
 
48
- if options[:recipe].nil? || !(FileTest.exists?(options[:recipe]))
49
- puts "No recipe specified, do it with -r or --recipe"
50
- exit 0
48
+ if options[:mode] == :server
49
+ if (options[:recipe].nil? || !(FileTest.exists?(options[:recipe]))
50
+ puts "No recipe specified, do it with -r or --recipe"
51
+ exit 0
52
+ else
53
+ require options[:recipe]
54
+ FiverrCopy::Server.run!
55
+ end
56
+ else
57
+ FiverrCopy::Client.run!(options[:port], options[:next_hop])
51
58
  end
52
59
 
53
- require options[:recipe]
54
-
55
- FiverrCopy::Server.run!
56
-
@@ -18,7 +18,7 @@ class FiverrCopy::Server
18
18
  threads << Thread.new(client) do |current_client|
19
19
  current_client.setup!
20
20
  Net::SSH.start(current_client.client_ip, current_client.username) do |ssh|
21
- ssh.exec("fiverr_copy --client -p #{current_client.port} -n #{current_client.next_client}")
21
+ ssh.exec("fiverr_copy --client --port #{current_client.port} --next_hop #{current_client.next_client}")
22
22
  end
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module FiverrCopy
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
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: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Elad Meidar