ruby_bittorrent 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +14 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +23 -0
- data/Rakefile +48 -0
- data/VERSION +1 -0
- data/lib/bit_torrent.rb +61 -0
- data/lib/ruby_bittorrent.rb +1 -0
- data/ruby_bittorrent.gemspec +67 -0
- data/spec/bit_torrent_spec.rb +141 -0
- data/spec/spec_helper.rb +16 -0
- data/test/helper.rb +18 -0
- data/test/test_ruby_bittorrent.rb +7 -0
- metadata +131 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d414bccb8ae337061e4e52c33fc3c290fe27e263
|
4
|
+
data.tar.gz: c06b01fc80b167b15822e1e7e89b2be7e5590262
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3274ee4c62a91d6fd070113a9e4a1e0c33a00b5c73eb8efb84d82a359514bff77a7e02c26980e1c9923dcbc1a9ec95f23e32bf9f7027ef9561160870c4872dec
|
7
|
+
data.tar.gz: 83ad6ca6329c9df9a9768b4341e47ffae1991a17539f440e4ad7e7088851ca783285e1b164c947319c13e6e2faebae02656ff12f3432b8874860298e8b4597f2
|
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby_bittorrent
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0
|
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "rspec", "~> 2.8.0"
|
10
|
+
gem "rdoc", "~> 3.12"
|
11
|
+
gem "bundler", "~> 1.0"
|
12
|
+
gem "jeweler", "~> 1.8.7"
|
13
|
+
gem 'simplecov', :require => false
|
14
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Marcin Nowicki
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
= ruby_bittorrent
|
2
|
+
|
3
|
+
Ruby bittorrent download cli.
|
4
|
+
|
5
|
+
= requirements
|
6
|
+
Installed aria2 package in system (with bittorrent support).
|
7
|
+
|
8
|
+
|
9
|
+
== Contributing to ruby_bittorrent
|
10
|
+
|
11
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
12
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
13
|
+
* Fork the project.
|
14
|
+
* Start a feature/bugfix branch.
|
15
|
+
* Commit and push until you are happy with your contribution.
|
16
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
17
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
18
|
+
|
19
|
+
== Copyright
|
20
|
+
|
21
|
+
Copyright (c) 2013 Marcin Nowicki. See LICENSE.txt for
|
22
|
+
further details.
|
23
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "ruby_bittorrent"
|
18
|
+
gem.homepage = "http://github.com/pr0d1r2/ruby_bittorrent"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Ruby bittorrent download cli.}
|
21
|
+
gem.description = %Q{Ruby bittorrent download cli.}
|
22
|
+
gem.email = "pr0d1r2@gmail.com"
|
23
|
+
gem.authors = ["Marcin Nowicki"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rspec/core'
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
end
|
37
|
+
|
38
|
+
task :default => :spec
|
39
|
+
|
40
|
+
require 'rdoc/task'
|
41
|
+
Rake::RDocTask.new do |rdoc|
|
42
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
43
|
+
|
44
|
+
rdoc.rdoc_dir = 'rdoc'
|
45
|
+
rdoc.title = "ruby_bittorrent #{version}"
|
46
|
+
rdoc.rdoc_files.include('README*')
|
47
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
48
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0
|
data/lib/bit_torrent.rb
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
class BitTorrent
|
2
|
+
|
3
|
+
class DownloadError < StandardError
|
4
|
+
end
|
5
|
+
|
6
|
+
DEFAULTS = {
|
7
|
+
:upload_rate_limit => 0,
|
8
|
+
:seed_ratio => 1.5,
|
9
|
+
:connect_timeout => 60,
|
10
|
+
:timeout => 60,
|
11
|
+
:stop_timeout => 0,
|
12
|
+
:destination_directory => "."
|
13
|
+
}
|
14
|
+
|
15
|
+
attr :sources
|
16
|
+
attr *DEFAULTS.keys
|
17
|
+
|
18
|
+
def initialize(source, options = {})
|
19
|
+
@sources = [ source ].flatten
|
20
|
+
DEFAULTS.keys.each do |option|
|
21
|
+
self.instance_variable_set("@#{option}", (options[option] || DEFAULTS[option]))
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.download(sources, options = {})
|
26
|
+
new(sources, options).download
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.download!(sources, options = {})
|
30
|
+
new(sources, options).download!
|
31
|
+
end
|
32
|
+
|
33
|
+
def download
|
34
|
+
system(download_commmand)
|
35
|
+
end
|
36
|
+
|
37
|
+
def download!
|
38
|
+
download or raise DownloadError
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def download_commmand
|
44
|
+
[
|
45
|
+
'aria2c',
|
46
|
+
"--dir=#{destination_directory}",
|
47
|
+
'--bt-enable-lpd',
|
48
|
+
'--bt-min-crypto-level=arc4',
|
49
|
+
'--bt-require-crypto=true',
|
50
|
+
'--enable-dht=true',
|
51
|
+
'--enable-peer-exchange=true',
|
52
|
+
"--max-overall-upload-limit=#{upload_rate_limit}",
|
53
|
+
"--seed-ratio=#{seed_ratio}",
|
54
|
+
"--bt-tracker-connect-timeout=#{connect_timeout}",
|
55
|
+
"--bt-tracker-timeout=#{timeout}",
|
56
|
+
"--bt-stop-timeout=#{stop_timeout}",
|
57
|
+
sources.map { |s| "'#{s}'" }
|
58
|
+
].flatten.join(' ')
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative 'bit_torrent'
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "ruby_bittorrent"
|
8
|
+
s.version = "1.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Marcin Nowicki"]
|
12
|
+
s.date = "2013-08-16"
|
13
|
+
s.description = "Ruby bittorrent download cli."
|
14
|
+
s.email = "pr0d1r2@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".rspec",
|
22
|
+
".ruby-gemset",
|
23
|
+
".ruby-version",
|
24
|
+
"Gemfile",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"README.rdoc",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"lib/bit_torrent.rb",
|
30
|
+
"lib/ruby_bittorrent.rb",
|
31
|
+
"ruby_bittorrent.gemspec",
|
32
|
+
"spec/bit_torrent_spec.rb",
|
33
|
+
"spec/spec_helper.rb",
|
34
|
+
"test/helper.rb",
|
35
|
+
"test/test_ruby_bittorrent.rb"
|
36
|
+
]
|
37
|
+
s.homepage = "http://github.com/pr0d1r2/ruby_bittorrent"
|
38
|
+
s.licenses = ["MIT"]
|
39
|
+
s.require_paths = ["lib"]
|
40
|
+
s.rubygems_version = "2.0.3"
|
41
|
+
s.summary = "Ruby bittorrent download cli."
|
42
|
+
|
43
|
+
if s.respond_to? :specification_version then
|
44
|
+
s.specification_version = 4
|
45
|
+
|
46
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
48
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
49
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
50
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.7"])
|
51
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
52
|
+
else
|
53
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
54
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
55
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
56
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
57
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
58
|
+
end
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
61
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
|
64
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
@@ -0,0 +1,141 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe BitTorrent do
|
4
|
+
|
5
|
+
let(:source) { "magnet:?xt=urn:btih:source" }
|
6
|
+
let(:sources) { source }
|
7
|
+
let(:options) { {} }
|
8
|
+
let(:the_class) { BitTorrent }
|
9
|
+
let(:the_object) { the_class.new(sources, options) }
|
10
|
+
|
11
|
+
describe "object" do
|
12
|
+
subject { the_object }
|
13
|
+
|
14
|
+
its(:upload_rate_limit) { should == 0 }
|
15
|
+
its(:seed_ratio) { 1.5 }
|
16
|
+
its(:connect_timeout) { 60 }
|
17
|
+
its(:timeout) { 60 }
|
18
|
+
its(:stop_timeout) { 0 }
|
19
|
+
its(:destination_directory) { "." }
|
20
|
+
|
21
|
+
its(:download_commmand) { should == "aria2c --dir=. --bt-enable-lpd --bt-min-crypto-level=arc4 --bt-require-crypto=true --enable-dht=true --enable-peer-exchange=true --max-overall-upload-limit=0 --seed-ratio=1.5 --bt-tracker-connect-timeout=60 --bt-tracker-timeout=60 --bt-stop-timeout=0 '#{source}'" }
|
22
|
+
|
23
|
+
context "when change upload rate limit" do
|
24
|
+
let(:options) { {:upload_rate_limit => "5K" } }
|
25
|
+
|
26
|
+
its(:upload_rate_limit) { should == "5K" }
|
27
|
+
|
28
|
+
its(:download_commmand) { should == "aria2c --dir=. --bt-enable-lpd --bt-min-crypto-level=arc4 --bt-require-crypto=true --enable-dht=true --enable-peer-exchange=true --max-overall-upload-limit=5K --seed-ratio=1.5 --bt-tracker-connect-timeout=60 --bt-tracker-timeout=60 --bt-stop-timeout=0 '#{source}'" }
|
29
|
+
end
|
30
|
+
|
31
|
+
context "when change seed ratio" do
|
32
|
+
let(:options) { {:seed_ratio => 1 } }
|
33
|
+
|
34
|
+
its(:seed_ratio) { should == 1 }
|
35
|
+
|
36
|
+
its(:download_commmand) { should == "aria2c --dir=. --bt-enable-lpd --bt-min-crypto-level=arc4 --bt-require-crypto=true --enable-dht=true --enable-peer-exchange=true --max-overall-upload-limit=0 --seed-ratio=1 --bt-tracker-connect-timeout=60 --bt-tracker-timeout=60 --bt-stop-timeout=0 '#{source}'" }
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when change connect timeout" do
|
40
|
+
let(:options) { {:connect_timeout => 120 } }
|
41
|
+
|
42
|
+
its(:connect_timeout) { should == 120 }
|
43
|
+
|
44
|
+
its(:download_commmand) { should == "aria2c --dir=. --bt-enable-lpd --bt-min-crypto-level=arc4 --bt-require-crypto=true --enable-dht=true --enable-peer-exchange=true --max-overall-upload-limit=0 --seed-ratio=1.5 --bt-tracker-connect-timeout=120 --bt-tracker-timeout=60 --bt-stop-timeout=0 '#{source}'" }
|
45
|
+
end
|
46
|
+
|
47
|
+
context "when change timeout" do
|
48
|
+
let(:options) { {:timeout => 120 } }
|
49
|
+
|
50
|
+
its(:timeout) { should == 120 }
|
51
|
+
|
52
|
+
its(:download_commmand) { should == "aria2c --dir=. --bt-enable-lpd --bt-min-crypto-level=arc4 --bt-require-crypto=true --enable-dht=true --enable-peer-exchange=true --max-overall-upload-limit=0 --seed-ratio=1.5 --bt-tracker-connect-timeout=60 --bt-tracker-timeout=120 --bt-stop-timeout=0 '#{source}'" }
|
53
|
+
end
|
54
|
+
|
55
|
+
context "when change stop timeout" do
|
56
|
+
let(:options) { {:stop_timeout => 120 } }
|
57
|
+
|
58
|
+
its(:stop_timeout) { should == 120 }
|
59
|
+
|
60
|
+
its(:download_commmand) { should == "aria2c --dir=. --bt-enable-lpd --bt-min-crypto-level=arc4 --bt-require-crypto=true --enable-dht=true --enable-peer-exchange=true --max-overall-upload-limit=0 --seed-ratio=1.5 --bt-tracker-connect-timeout=60 --bt-tracker-timeout=60 --bt-stop-timeout=120 '#{source}'" }
|
61
|
+
end
|
62
|
+
|
63
|
+
context "when change destination directory" do
|
64
|
+
let(:options) { {:destination_directory => "/tmp" } }
|
65
|
+
|
66
|
+
its(:destination_directory) { should == "/tmp" }
|
67
|
+
|
68
|
+
its(:download_commmand) { should == "aria2c --dir=/tmp --bt-enable-lpd --bt-min-crypto-level=arc4 --bt-require-crypto=true --enable-dht=true --enable-peer-exchange=true --max-overall-upload-limit=0 --seed-ratio=1.5 --bt-tracker-connect-timeout=60 --bt-tracker-timeout=60 --bt-stop-timeout=0 '#{source}'" }
|
69
|
+
end
|
70
|
+
|
71
|
+
context "when have 2 sources" do
|
72
|
+
let(:source2) { "magnet:?xt=urn:btih:source2" }
|
73
|
+
let(:sources) { [source, source2] }
|
74
|
+
|
75
|
+
it "TODO"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe ".download" do
|
80
|
+
before do
|
81
|
+
the_object.stub(:download => true)
|
82
|
+
the_class.stub(:new => the_object)
|
83
|
+
end
|
84
|
+
after { the_class.download(source, options) }
|
85
|
+
|
86
|
+
it "should create new instance" do
|
87
|
+
the_class.should_receive(:new).with(source, options)
|
88
|
+
end
|
89
|
+
|
90
|
+
it "should call #download on new instance" do
|
91
|
+
the_object.should_receive(:download)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
describe ".download!" do
|
96
|
+
before do
|
97
|
+
the_object.stub(:download! => true)
|
98
|
+
the_class.stub(:new => the_object)
|
99
|
+
end
|
100
|
+
|
101
|
+
after { the_class.download!(source, options) }
|
102
|
+
|
103
|
+
it "should create new instance" do
|
104
|
+
the_class.should_receive(:new).with(source, options)
|
105
|
+
end
|
106
|
+
|
107
|
+
it "should call #download on new instance" do
|
108
|
+
the_object.should_receive(:download!)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
describe "#download" do
|
113
|
+
after { the_object.download }
|
114
|
+
|
115
|
+
it "should run download command in system" do
|
116
|
+
the_object.should_receive(:system).with("aria2c --dir=. --bt-enable-lpd --bt-min-crypto-level=arc4 --bt-require-crypto=true --enable-dht=true --enable-peer-exchange=true --max-overall-upload-limit=0 --seed-ratio=1.5 --bt-tracker-connect-timeout=60 --bt-tracker-timeout=60 --bt-stop-timeout=0 '#{source}'")
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
describe "#download!" do
|
121
|
+
let(:download_status) { true }
|
122
|
+
before { the_object.stub(:download => download_status) }
|
123
|
+
|
124
|
+
it "should run download" do
|
125
|
+
the_object.should_receive(:download).and_return(true)
|
126
|
+
the_object.download!
|
127
|
+
end
|
128
|
+
|
129
|
+
context "when download failed" do
|
130
|
+
let(:download_status) { false }
|
131
|
+
|
132
|
+
it {
|
133
|
+
expect {
|
134
|
+
the_object.download!
|
135
|
+
}.to raise_error(BitTorrent::DownloadError)
|
136
|
+
}
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
|
141
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start
|
3
|
+
SimpleCov.minimum_coverage 100
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
7
|
+
require 'rspec'
|
8
|
+
require 'ruby_bittorrent'
|
9
|
+
|
10
|
+
# Requires supporting files with custom matchers and macros, etc,
|
11
|
+
# in ./support/ and its subdirectories.
|
12
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
|
16
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'ruby_bittorrent'
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby_bittorrent
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marcin Nowicki
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.8.0
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.8.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.12'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jeweler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.8.7
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.8.7
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simplecov
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Ruby bittorrent download cli.
|
84
|
+
email: pr0d1r2@gmail.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files:
|
88
|
+
- LICENSE.txt
|
89
|
+
- README.rdoc
|
90
|
+
files:
|
91
|
+
- .document
|
92
|
+
- .rspec
|
93
|
+
- .ruby-gemset
|
94
|
+
- .ruby-version
|
95
|
+
- Gemfile
|
96
|
+
- LICENSE.txt
|
97
|
+
- README.rdoc
|
98
|
+
- Rakefile
|
99
|
+
- VERSION
|
100
|
+
- lib/bit_torrent.rb
|
101
|
+
- lib/ruby_bittorrent.rb
|
102
|
+
- ruby_bittorrent.gemspec
|
103
|
+
- spec/bit_torrent_spec.rb
|
104
|
+
- spec/spec_helper.rb
|
105
|
+
- test/helper.rb
|
106
|
+
- test/test_ruby_bittorrent.rb
|
107
|
+
homepage: http://github.com/pr0d1r2/ruby_bittorrent
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options: []
|
113
|
+
require_paths:
|
114
|
+
- lib
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
requirements: []
|
126
|
+
rubyforge_project:
|
127
|
+
rubygems_version: 2.0.3
|
128
|
+
signing_key:
|
129
|
+
specification_version: 4
|
130
|
+
summary: Ruby bittorrent download cli.
|
131
|
+
test_files: []
|