diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d87d4be66f458acd52878902bbf1391732ad21e1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*.gem +*.rbc +.bundle +.config +.yardoc +Gemfile.lock +InstalledFiles +_yardoc +coverage +doc/ +lib/bundler/man +pkg +rdoc +spec/reports +test/tmp +test/version_tmp +tmp diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000000000000000000000000000000000000..fa75df15632305f9badb9a7ac0028e4b2ef4d221 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gemspec diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000000000000000000000000000000000000..29955274e0d42e164337c411ad9144e8ffd7e46e --- /dev/null +++ b/Rakefile @@ -0,0 +1 @@ +require "bundler/gem_tasks" diff --git a/jekyll-torrent.gemspec b/jekyll-torrent.gemspec new file mode 100644 index 0000000000000000000000000000000000000000..1ae052998157f3ea0345868ad80a0be25fe1d70a --- /dev/null +++ b/jekyll-torrent.gemspec @@ -0,0 +1,23 @@ +# encoding: utf-8 +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'jekyll-torrent/version' + +Gem::Specification.new do |gem| + gem.name = "jekyll-torrent" + gem.version = JekyllTorrent::VERSION + gem.authors = ["Mauricio Pasquier Juan"] + gem.email = ["mauricio@pasquierjuan.com.ar"] + gem.description = %q{A simple plugin that creates a .torrent file with your + whole site after it's generated by jekyll. It + monkeypatches `Jekyll::Site.process`.} + gem.summary = %q{Create a .torrent file with your whole site!} + gem.homepage = "https://github.com/mauriciopasquier/jekyll-torrent" + + gem.files = `git ls-files`.split($/) + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) + gem.require_paths = ["lib"] + + gem.add_dependency('jekyll') +end diff --git a/torrent.rb b/lib/jekyll-torrent.rb similarity index 95% rename from torrent.rb rename to lib/jekyll-torrent.rb index 0d092663e7a50fdcff3204d277d8bfe8d6f6ad4d..e793a389789eedbc49979fb6be8eb1a138a230a8 100644 --- a/torrent.rb +++ b/lib/jekyll-torrent.rb @@ -1,3 +1,5 @@ +require 'jekyll-torrent/version' + # Creates a torrent file with your generated site. You should serve the files # with your cliente. # @@ -36,7 +38,7 @@ module Jekyll private # Merges config with default values def torrent - @torrent_config ||= { + @torrent_config ||= { 'announce' => 'udp://tracker.publicbt.com:80', 'file' => 'site.torrent', 'flags' => '--verbose', diff --git a/lib/jekyll-torrent/version.rb b/lib/jekyll-torrent/version.rb new file mode 100644 index 0000000000000000000000000000000000000000..d5d8ffc7cf7a28a152296dc7bf2c1bd899764d31 --- /dev/null +++ b/lib/jekyll-torrent/version.rb @@ -0,0 +1,3 @@ +module JekyllTorrent + VERSION = "0.0.1" +end