torrent 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'fakefs', path: '~/Dropbox/Code/Ruby/Forks/fakefs'
7
+ end
@@ -0,0 +1,82 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ torrent (0.0.1)
5
+ bencode (~> 0.8.0)
6
+ version (~> 1.0.0)
7
+
8
+ PATH
9
+ remote: ~/Dropbox/Code/Ruby/Forks/fakefs
10
+ specs:
11
+ fakefs (0.4.2)
12
+
13
+ GEM
14
+ remote: https://rubygems.org/
15
+ specs:
16
+ bencode (0.8.0)
17
+ coderay (1.0.9)
18
+ diff-lcs (1.2.2)
19
+ formatador (0.2.4)
20
+ fuubar (1.1.0)
21
+ rspec (~> 2.0)
22
+ rspec-instafail (~> 0.2.0)
23
+ ruby-progressbar (~> 1.0.0)
24
+ github-markup (0.7.5)
25
+ guard (1.7.0)
26
+ formatador (>= 0.2.4)
27
+ listen (>= 0.6.0)
28
+ lumberjack (>= 1.0.2)
29
+ pry (>= 0.9.10)
30
+ thor (>= 0.14.6)
31
+ guard-bundler (1.0.0)
32
+ bundler (~> 1.0)
33
+ guard (~> 1.1)
34
+ guard-rspec (2.5.2)
35
+ guard (>= 1.1)
36
+ rspec (~> 2.11)
37
+ guard-yard (2.1.0)
38
+ guard (>= 1.1.0)
39
+ yard (>= 0.7.0)
40
+ listen (0.7.3)
41
+ lumberjack (1.0.3)
42
+ metaclass (0.0.1)
43
+ method_source (0.8.1)
44
+ mocha (0.13.3)
45
+ metaclass (~> 0.0.1)
46
+ pry (0.9.12)
47
+ coderay (~> 1.0.5)
48
+ method_source (~> 0.8)
49
+ slop (~> 3.4)
50
+ rake (10.0.4)
51
+ rb-fsevent (0.9.3)
52
+ redcarpet (2.2.2)
53
+ rspec (2.13.0)
54
+ rspec-core (~> 2.13.0)
55
+ rspec-expectations (~> 2.13.0)
56
+ rspec-mocks (~> 2.13.0)
57
+ rspec-core (2.13.1)
58
+ rspec-expectations (2.13.0)
59
+ diff-lcs (>= 1.1.3, < 2.0)
60
+ rspec-instafail (0.2.4)
61
+ rspec-mocks (2.13.1)
62
+ ruby-progressbar (1.0.2)
63
+ slop (3.4.4)
64
+ thor (0.18.1)
65
+ version (1.0.0)
66
+ yard (0.8.5.2)
67
+
68
+ PLATFORMS
69
+ ruby
70
+
71
+ DEPENDENCIES
72
+ fakefs!
73
+ fuubar (~> 1.1.0)
74
+ github-markup (~> 0.7.0)
75
+ guard-bundler (~> 1.0.0)
76
+ guard-rspec (~> 2.5.0)
77
+ guard-yard (~> 2.1.0)
78
+ mocha (~> 0.13.0)
79
+ rake (~> 10.0.0)
80
+ rb-fsevent (~> 0.9.0)
81
+ redcarpet (~> 2.2.0)
82
+ torrent!
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Ryan Scott Lewis <ryan@rynet.us>.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,27 @@
1
+ # Torrent
2
+
3
+ A Ruby BitTorrent Library.
4
+
5
+ ## Install
6
+
7
+ ### Bundler: `gem 'torrent'`
8
+
9
+ ### RubyGems: `gem install torrent`
10
+
11
+ ## Usage
12
+
13
+
14
+
15
+ ## Contributing
16
+
17
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
18
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
19
+ * Fork the project
20
+ * Start a feature/bugfix branch
21
+ * Commit and push until you are happy with your contribution
22
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
23
+ * 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.
24
+
25
+ ## Copyright
26
+
27
+ Copyright (c) 2013 Ryan Scott Lewis. See LICENSE for details.
@@ -0,0 +1,14 @@
1
+ require 'pathname'
2
+ require 'rake/version_task'
3
+ require 'rubygems/package_task'
4
+
5
+ gemspec = Pathname.glob( Pathname.new(__FILE__).join('..', '*.gemspec') ).first
6
+ $spec = Gem::Specification.load( gemspec.to_s )
7
+
8
+ Gem::PackageTask.new($spec) do |task|
9
+ task.need_zip = false
10
+ end
11
+
12
+ Rake::VersionTask.new do |task|
13
+ task.with_git_tag = true
14
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,6 @@
1
+ require 'version'
2
+ require 'torrent/file'
3
+
4
+ module Torrent
5
+ is_versioned
6
+ end
@@ -0,0 +1,9 @@
1
+ require 'pathname'
2
+
3
+ module Torrent
4
+
5
+ class File
6
+
7
+ end
8
+
9
+ end
@@ -0,0 +1,10 @@
1
+ require 'torrent'
2
+ require 'mocha/api'
3
+ require 'pp'
4
+
5
+ RSpec.configure do |config|
6
+ config.treat_symbols_as_metadata_keys_with_true_values = true
7
+ config.order = 'random'
8
+
9
+ config.before(:suite) { system('clear') }
10
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Torrent::File do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Torrent do
4
+
5
+ end
@@ -0,0 +1,34 @@
1
+ require 'pathname'
2
+
3
+ Gem::Specification.new do |s|
4
+
5
+ # Variables
6
+ s.author = 'Ryan Scott Lewis'
7
+ s.email = 'ryan@rynet.us'
8
+ s.summary = 'A Ruby BitTorrent Library.'
9
+ s.license = 'MIT'
10
+
11
+ # Dependencies
12
+ s.add_dependency 'version', '~> 1.0.0'
13
+ s.add_dependency 'bencode', '~> 0.8.0'
14
+ s.add_development_dependency 'guard-bundler', '~> 1.0.0'
15
+ s.add_development_dependency 'guard-rspec', '~> 2.5.0'
16
+ s.add_development_dependency 'guard-yard', '~> 2.1.0'
17
+ s.add_development_dependency 'rake', '~> 10.0.0'
18
+ s.add_development_dependency 'fuubar', '~> 1.1.0'
19
+ s.add_development_dependency 'rb-fsevent', '~> 0.9.0'
20
+ s.add_development_dependency 'redcarpet', '~> 2.2.0'
21
+ s.add_development_dependency 'github-markup', '~> 0.7.0'
22
+ s.add_development_dependency 'mocha', '~> 0.13.0'
23
+ # s.add_development_dependency 'fakefs', '~> 0.4.0'
24
+
25
+ # Pragmatically set variables
26
+ s.homepage = "http://github.com/RyanScottLewis/#{s.name}"
27
+ s.version = Pathname.glob('VERSION*').first.read rescue '0.0.0'
28
+ s.description = s.summary
29
+ s.name = Pathname.new(__FILE__).basename('.gemspec').to_s
30
+ s.require_paths = ['lib']
31
+ s.files = Dir['{{Rake,Gem}file{.lock,},README*,VERSION,LICENSE,*.gemspec,lib/**/*}']
32
+ s.test_files = Dir['{examples,spec,test}/**/*']
33
+
34
+ end
metadata ADDED
@@ -0,0 +1,242 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: torrent
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ryan Scott Lewis
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-04-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: version
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.0.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.0.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: bencode
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 0.8.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.8.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: guard-bundler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.0.0
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: guard-rspec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 2.5.0
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.5.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: guard-yard
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 2.1.0
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 2.1.0
94
+ - !ruby/object:Gem::Dependency
95
+ name: rake
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 10.0.0
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 10.0.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: fuubar
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 1.1.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 1.1.0
126
+ - !ruby/object:Gem::Dependency
127
+ name: rb-fsevent
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: 0.9.0
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: 0.9.0
142
+ - !ruby/object:Gem::Dependency
143
+ name: redcarpet
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ~>
148
+ - !ruby/object:Gem::Version
149
+ version: 2.2.0
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: 2.2.0
158
+ - !ruby/object:Gem::Dependency
159
+ name: github-markup
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ~>
164
+ - !ruby/object:Gem::Version
165
+ version: 0.7.0
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ~>
172
+ - !ruby/object:Gem::Version
173
+ version: 0.7.0
174
+ - !ruby/object:Gem::Dependency
175
+ name: mocha
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ~>
180
+ - !ruby/object:Gem::Version
181
+ version: 0.13.0
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ~>
188
+ - !ruby/object:Gem::Version
189
+ version: 0.13.0
190
+ description: A Ruby BitTorrent Library.
191
+ email: ryan@rynet.us
192
+ executables: []
193
+ extensions: []
194
+ extra_rdoc_files: []
195
+ files:
196
+ - Rakefile
197
+ - Gemfile.lock
198
+ - Gemfile
199
+ - README.md
200
+ - VERSION
201
+ - LICENSE
202
+ - torrent.gemspec
203
+ - lib/torrent/file.rb
204
+ - lib/torrent.rb
205
+ - spec/spec_helper.rb
206
+ - spec/torrent/file_spec.rb
207
+ - spec/torrent_spec.rb
208
+ homepage: http://github.com/RyanScottLewis/
209
+ licenses:
210
+ - MIT
211
+ post_install_message:
212
+ rdoc_options: []
213
+ require_paths:
214
+ - lib
215
+ required_ruby_version: !ruby/object:Gem::Requirement
216
+ none: false
217
+ requirements:
218
+ - - ! '>='
219
+ - !ruby/object:Gem::Version
220
+ version: '0'
221
+ segments:
222
+ - 0
223
+ hash: 2852235099228143082
224
+ required_rubygems_version: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ segments:
231
+ - 0
232
+ hash: 2852235099228143082
233
+ requirements: []
234
+ rubyforge_project:
235
+ rubygems_version: 1.8.25
236
+ signing_key:
237
+ specification_version: 3
238
+ summary: A Ruby BitTorrent Library.
239
+ test_files:
240
+ - spec/spec_helper.rb
241
+ - spec/torrent/file_spec.rb
242
+ - spec/torrent_spec.rb