From e756e0b650774f2503702512ccdc02e86eee1788 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 1 Apr 2009 02:49:37 -0400 Subject: [PATCH] Added the net/http requirement to the Website class (which now needs it). Removed some redundant requires from the website subclasses. --- src/website.rb | 3 +++ src/websites/veoh.rb | 5 ----- src/websites/vimeo.rb | 6 ------ src/websites/yikers.rb | 4 ---- src/websites/youporn.rb | 5 ----- src/websites/youtube.rb | 5 ----- 6 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/website.rb b/src/website.rb index 5e06479..ef96dc1 100644 --- a/src/website.rb +++ b/src/website.rb @@ -20,6 +20,9 @@ # to parse the server name out of our URL. require 'uri' +# Needed to download.. things. +require 'net/http' + # This class keeps track of all its subclasses # We use this to loop through every "website" in an # attempt to determine to which site a URL belongs. diff --git a/src/websites/veoh.rb b/src/websites/veoh.rb index 8978feb..5830e8f 100644 --- a/src/websites/veoh.rb +++ b/src/websites/veoh.rb @@ -18,11 +18,6 @@ require 'src/website' -# Needed to download the page, which is in turn -# needed because it contains the video (redirect) URL. -require 'net/http' -require 'uri' - class Veoh < Website diff --git a/src/websites/vimeo.rb b/src/websites/vimeo.rb index b3dfe74..72ed313 100644 --- a/src/websites/vimeo.rb +++ b/src/websites/vimeo.rb @@ -18,12 +18,6 @@ require 'src/website' -# Needed to download the video XML file, which is in turn -# needed because it contains the junk we need to construct -# the video URL. -require 'net/http' -require 'uri' - class Vimeo < Website diff --git a/src/websites/yikers.rb b/src/websites/yikers.rb index c1153ee..4b13a02 100644 --- a/src/websites/yikers.rb +++ b/src/websites/yikers.rb @@ -18,10 +18,6 @@ require 'src/website' -# Needed to download the page, which is in turn -# needed because it contains the video URL. -require 'net/http' - class Yikers < Website diff --git a/src/websites/youporn.rb b/src/websites/youporn.rb index 07d7ca0..3e98e9b 100644 --- a/src/websites/youporn.rb +++ b/src/websites/youporn.rb @@ -18,11 +18,6 @@ require 'src/website' -# Needed to download the page, which is in turn -# needed because it contains the video URL. -require 'net/http' -require 'uri' - class Youporn < Website diff --git a/src/websites/youtube.rb b/src/websites/youtube.rb index c124f53..c8a1cad 100644 --- a/src/websites/youtube.rb +++ b/src/websites/youtube.rb @@ -18,11 +18,6 @@ require 'src/website' -# Needed to download the page, which is in turn -# needed because it contains the video URL. -require 'net/http' -require 'uri' - class Youtube < Website -- 2.44.2