Module: C3D
- Extended by:
- C3D
- Included in:
- C3D
- Defined in:
- lib/c3d/util/blobber.rb,
lib/c3d.rb,
lib/c3d/util/util.rb,
lib/c3d/util/setup.rb,
lib/c3d/util/trees.rb,
lib/c3d/util/watch.rb,
lib/c3d/util/purger.rb,
lib/c3d/actors/getter.rb,
lib/c3d/actors/crawler.rb,
lib/c3d/util/processes.rb,
lib/c3d/actors/assemble.rb,
lib/c3d/actors/blacklist.rb,
lib/c3d/actors/subscribe.rb,
lib/c3d/connectors/connect_torrent.rb,
lib/c3d/connectors/connect_ethereum.rb
Overview
Defined Under Namespace
Modules: EthRunner, EyeOfZorax, Getter, TransmissionRunner, Utility
Classes: Assemble, Blacklist, Blobber, ConnectEth, ConnectTorrent, Crawler, Purger, SetupC3D, Subscribe, TreeBuilder
Instance Method Summary
collapse
Instance Method Details
#blob(args) ⇒ Object
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/c3d.rb', line 51
def blob args
C3D::SetupC3D.new true
C3D::ConnectTorrent.supervise_as :puller, {
username: ENV['TORRENT_USER'],
password: ENV['TORRENT_PASS'],
url: ENV['TORRENT_RPC'] }
until args.empty?
file = args.shift
c = C3D::Blobber.new file
print "The magnet link for the file is: #{c.mag_link}\n"
end
end
|
#restart ⇒ Object
45
46
47
48
49
|
# File 'lib/c3d.rb', line 45
def restart
key = Celluloid::Actor[:eth].get_key
C3D.stop
C3D.start key
end
|
#start(key = '', cli = false) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/c3d.rb', line 27
def start key='', cli=false
unless key == ''
ENV['ETH_KEY'] = key
end
C3D::SetupC3D.new cli
C3D::ConnectTorrent.supervise_as :puller, {
username: ENV['TORRENT_USER'],
password: ENV['TORRENT_PASS'],
url: ENV['TORRENT_RPC'] }
C3D::ConnectEth.supervise_as :eth, :cpp
C3D::Utility.save_key
sleep
end
|
#stop ⇒ Object
41
42
43
|
# File 'lib/c3d.rb', line 41
def stop
exit 0
end
|
#version ⇒ Object
64
65
66
|
# File 'lib/c3d.rb', line 64
def version
return VERSION
end
|