From 20cb7c798be98588225cc6729be0d938b1c74a22 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 12 Jun 2012 22:52:57 -0400 Subject: [PATCH] Eliminate the redundand 'vendor' directory. Remove the remote tests, mosts of which fail now. --- .../ruby-progressbar/progressbar.rb | 0 lib/{vendor => }/ruby-progressbar/test.rb | 0 test/fuckedtube_remote_test.rb | 32 -------------- test/infoq_remote_test.rb | 42 ------------------- test/redtube_remote_test.rb | 35 ---------------- test/remote_test_suite.rb | 23 ---------- test/test_suite.rb | 39 ----------------- test/uri_utilities_remote_test.rb | 40 ------------------ test/youporn_remote_test.rb | 34 --------------- 9 files changed, 245 deletions(-) rename lib/{vendor => }/ruby-progressbar/progressbar.rb (100%) rename lib/{vendor => }/ruby-progressbar/test.rb (100%) delete mode 100644 test/fuckedtube_remote_test.rb delete mode 100644 test/infoq_remote_test.rb delete mode 100644 test/redtube_remote_test.rb delete mode 100644 test/remote_test_suite.rb delete mode 100644 test/test_suite.rb delete mode 100644 test/uri_utilities_remote_test.rb delete mode 100644 test/youporn_remote_test.rb diff --git a/lib/vendor/ruby-progressbar/progressbar.rb b/lib/ruby-progressbar/progressbar.rb similarity index 100% rename from lib/vendor/ruby-progressbar/progressbar.rb rename to lib/ruby-progressbar/progressbar.rb diff --git a/lib/vendor/ruby-progressbar/test.rb b/lib/ruby-progressbar/test.rb similarity index 100% rename from lib/vendor/ruby-progressbar/test.rb rename to lib/ruby-progressbar/test.rb diff --git a/test/fuckedtube_remote_test.rb b/test/fuckedtube_remote_test.rb deleted file mode 100644 index eeca066..0000000 --- a/test/fuckedtube_remote_test.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# 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 'test/unit' -require 'src/websites/fuckedtube' - - -class FuckedtubeRemoteTest < Test::Unit::TestCase - - def test_get_video_filename_works_on_good_urls - ft = Fuckedtube.new('http://www.fuckedtube.com/video/161/Pumped-Pussy/') - expected_filename = 'br_pumpedpussy.flv' - actual_filename = ft.get_video_filename() - assert_equal(expected_filename, actual_filename) - end - -end diff --git a/test/infoq_remote_test.rb b/test/infoq_remote_test.rb deleted file mode 100644 index e66fad9..0000000 --- a/test/infoq_remote_test.rb +++ /dev/null @@ -1,42 +0,0 @@ -# -# 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 'test/unit' -require 'src/websites/infoq' - -# Remote Infoq tests. Actually hit their website -# and attempt to parse the data returned. - -class InfoqRemoteTest < Test::Unit::TestCase - - def test_get_page_data - iq = Infoq.new('http://www.infoq.com/interviews/jim-weirich-discusses-rake') - expected_result = 'http://flv.thruhere.net/interviews/JimWeirich.flv' - actual_result = iq.get_video_url() - assert_equal(expected_result, actual_result) - end - - - def test_superclass_get_filename_works - iq = Infoq.new('http://www.infoq.com/interviews/jim-weirich-discusses-rake') - expected_result = 'JimWeirich.flv' - actual_result = iq.get_video_filename() - assert_equal(expected_result, actual_result) - end - -end diff --git a/test/redtube_remote_test.rb b/test/redtube_remote_test.rb deleted file mode 100644 index 239e59b..0000000 --- a/test/redtube_remote_test.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# 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 'test/unit' -require 'src/websites/redtube' - - -class RedtubeRemoteTest < Test::Unit::TestCase - - # This is a remote test because the default get_video_filename() - # relies on the video URL. Of course, we don't know the video URL - # unless we download and parse the page. - def test_get_video_filename - rt = Redtube.new('http://www.redtube.com/6807') - expected_result = 'X57OBH08G.flv' - actual_result = rt.get_video_filename() - assert_equal(expected_result, actual_result) - end - -end diff --git a/test/remote_test_suite.rb b/test/remote_test_suite.rb deleted file mode 100644 index be135f7..0000000 --- a/test/remote_test_suite.rb +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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 'test/fuckedtube_remote_test' -require 'test/infoq_remote_test' -require 'test/redtube_remote_test' -require 'test/uri_utilities_remote_test' -require 'test/youporn_remote_test' diff --git a/test/test_suite.rb b/test/test_suite.rb deleted file mode 100644 index 89b5550..0000000 --- a/test/test_suite.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# 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 'bin/configuration' -require 'test/bliptv_test' -require 'test/dailymotion_test' -require 'test/efukt_test' -require 'test/fuckedtube_test' -require 'test/howcast_test' -require 'test/infoq_test' -require 'test/megaporn_test' -require 'test/motherless_test' -require 'test/redtube_test' -require 'test/tnaflix_test' -require 'test/uri_utilities_test' -require 'test/veoh_test' -require 'test/vimeo_test' -require 'test/website_test' -require 'test/yikers_test' -require 'test/youporn_test' -require 'test/youtube_test' - -# Vendor tests -require 'vendor/ruby-progressbar/test' diff --git a/test/uri_utilities_remote_test.rb b/test/uri_utilities_remote_test.rb deleted file mode 100644 index f8c6b8d..0000000 --- a/test/uri_utilities_remote_test.rb +++ /dev/null @@ -1,40 +0,0 @@ -# -# 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 'test/unit' -require 'src/uri_utilities.rb' - -class UriUtilitiesTest < Test::Unit::TestCase - - # Test that we get a 404 error for a nonexistent page. - def test_404_on_nonexistent_page - uu = UriUtilities.new() - - # *Hopefully* this connection is refused. - example_uri = 'http://www.example.com/test-nonexistent-page.html' - uri = URI.parse(example_uri) - - assert_raise OpenURI::HTTPError do - uu.download_with_progress_bar(uri, 'dummy.tmp') - end - - # This should be gone since there was an HTTP error. - assert(!File.exists?('dummy.tmp')) - end - -end diff --git a/test/youporn_remote_test.rb b/test/youporn_remote_test.rb deleted file mode 100644 index 79bcb37..0000000 --- a/test/youporn_remote_test.rb +++ /dev/null @@ -1,34 +0,0 @@ -# -# 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 'test/unit' -require 'src/websites/youporn' - -# Remote Youporn tests. Actually hit their website -# and attempt to parse the data returned. - -class YoupornRemoteTest < Test::Unit::TestCase - - def test_get_page_data - yp = Youporn.new('http://www.youporn.com/watch/65778') - expected_result = 'http://download.youporn.com/download/112911/flv/65778_moaning_mom_fucked_at_night.flv' - actual_result = yp.get_video_url() - assert_equal(expected_result, actual_result) - end - -end -- 2.43.2