Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few improvements #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

A few improvements #13

wants to merge 2 commits into from

Conversation

essjayhch
Copy link

  1. Adds the ability to use blocks within the initializers for instances.

  2. Adds Torrent.from_file to create an object based on the contents of a file

  3. Removes version constraint on Rake and makes it a development dependency rather than an install dependency (this breaks when it interacts with other gems that rely on rake, it's not needed at run-time).

  4. Adds the comparable interface, so you can tell if one torrent is equal to another, either because the info segment is the same (via == ) (they have the same files) or because the whole torrent hash is the same (via eql?) (they share tracker information as well).

  5. Removes nil.empty? conflicts for when you are not running this against rails environments

Also allows Torrent constructor to consume a block

Adds comparable methods to determine if a torrent is equal to others

Adds a Torrent.from_file function to read in torrent files and populate
Torrent objects.

Makes set_infohash be invoked by build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant