Replace the makefile with a Rakefile.
Update all of the test code to run under `rake test`.
Add a short README.
--- /dev/null
+require 'rake/testtask'
+
+desc "Clean up generated files"
+task :clean do
+ `rm -f whatever-dl-*.gem`
+end
+
+
+desc "Build the gem"
+task :build => :clean do
+ `gem build whatever-dl.gemspec`
+end
+
+
+desc "Install the gem locally (user install)"
+task :install => :build do
+ `gem install --user-install whatever-dl-*.gem`
+end
+
+Rake::TestTask.new do |t|
+ t.pattern = 'test/*test.rb'
+ t.libs << 'test'
+end
+
+desc "Run tests"
+task :default => :test
--- /dev/null
+Installation
+------------
+
+To install the gem locally (as the current user), simply run,
+
+ rake install
+
+You should then be able to run the script out of,
+
+ $HOME/.gem/ruby/*/bin
+
+It might make sense to add that to your path. I don't know how this
+gem thing works so much yet.
#
require 'open-uri'
-require 'vendor/ruby-progressbar/progressbar'
+require 'ruby-progressbar/progressbar'
# Just a couple of convenience methods for URIs.
# These could be monkey-patched in, but with only
+++ /dev/null
-.PHONY : build test
-
-all: install
-
-# Ruby 1.9 doesn't include the current directory in the load path, so
-# we pass them on the command-line.
-test:
- ruby -I. test/test_suite.rb
-
-remote_test:
- ruby -I. test/remote_test_suite.rb
-
-clean:
- rm -f whatever-dl-*.gem
-
-build: clean
- gem build whatever-dl.gemspec
-
-install: build
- gem install --user-install whatever-dl-*.gem
#
require 'test/unit'
-require 'src/websites/bliptv'
+require 'whatever-dl/websites/bliptv'
class BliptvTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/websites/dailymotion'
+require 'whatever-dl/websites/dailymotion'
class DailymotionTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/websites/efukt'
+require 'whatever-dl/websites/efukt'
class EfuktTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/websites/fuckedtube'
+require 'whatever-dl/websites/fuckedtube'
class FuckedtubeTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/websites/howcast'
+require 'whatever-dl/websites/howcast'
# Unit tests for the Howcast class.
# This class is easy because get_video_url is
#
require 'test/unit'
-require 'src/websites/infoq'
+require 'whatever-dl/websites/infoq'
# Unit tests for the Infoq class. Basically just checking
# the results of parse_video_url for now.
#
require 'test/unit'
-require 'src/websites/megaporn'
+require 'whatever-dl/websites/megaporn'
class MegapornTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/websites/motherless'
+require 'whatever-dl/websites/motherless'
class MotherlessTest < Test::Unit::TestCase
--- /dev/null
+#
+# Copyright Michael Orlitzky
+#
+# http://michael.orlitzky.com/
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# http://www.fsf.org/licensing/licenses/gpl.html
+#
+
+require 'ruby-progressbar/test'
#
require 'test/unit'
-require 'src/websites/redtube'
+require 'whatever-dl/websites/redtube'
# Unit tests for the Redtube class. Basically just checking
# the results of get_video_url for known ids.
#
require 'test/unit'
-require 'src/websites/tnaflix'
+require 'whatever-dl/websites/tnaflix'
class TnaflixTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/uri_utilities.rb'
+require 'whatever-dl/uri_utilities.rb'
class UriUtilitiesTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/websites/veoh'
+require 'whatever-dl/websites/veoh'
class VeohTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/websites/vimeo'
+require 'whatever-dl/websites/vimeo'
# There are no remote tests for Vimeo because they use
# an expiration timestamp to change certain values in the
#
require 'test/unit'
+require 'whatever-dl'
# Tests common to all websites.
-# All of the website classes are located in one
-# directory, so we can 'require' them automatically.
-Dir.glob('src/websites/*.rb').each do |r|
- require r
-end
-
class WebsiteTest < Test::Unit::TestCase
def test_nobody_owns_misc_urls
#
require 'test/unit'
-require 'src/websites/yikers'
+require 'whatever-dl/websites/yikers'
class YikersTest < Test::Unit::TestCase
#
require 'test/unit'
-require 'src/websites/youporn'
+require 'whatever-dl/websites/youporn'
# Unit tests for the Youporn class. Basically just checking
# the results of parse_video_url for now.
#
require 'test/unit'
-require 'src/websites/youtube'
+require 'whatever-dl/websites/youtube'
class YoutubeTest < Test::Unit::TestCase