fiverr_copy 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/fiverr_copy +10 -7
- data/lib/fiverr_copy/server.rb +1 -1
- data/lib/fiverr_copy/version.rb +1 -1
- metadata +3 -3
data/bin/fiverr_copy
CHANGED
@@ -45,12 +45,15 @@ end
|
|
45
45
|
|
46
46
|
optparse.parse!
|
47
47
|
|
48
|
-
if options[:
|
49
|
-
|
50
|
-
|
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
|
-
|
data/lib/fiverr_copy/server.rb
CHANGED
@@ -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
|
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
|
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: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Elad Meidar
|