]>
gitweb.michael.orlitzky.com - dead/whatever-dl.git/blob - lib/whatever-dl.rb
2 # Copyright Michael Orlitzky
4 # http://michael.orlitzky.com/
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # http://www.fsf.org/licensing/licenses/gpl.html
20 # Load everything the main script and tests will require.
24 require 'whatever-dl/exit_codes'
25 require 'whatever-dl/configuration'
26 require 'whatever-dl/downloader'
28 # We need Pathname to get the real filesystem path
29 # of this script (and not, for example, the path of
30 # a symlink which points to it.
32 my_path
= Pathname
.new(__FILE__
).realpath
.to_s
34 # The Dir.glob that's coming up doesn't use the
35 # Ruby library path so we need to tell it where to
37 websites_pattern
= File
.dirname(my_path
) +
'/whatever-dl/websites/*.rb'
39 # All of the website classes are located in one
40 # directory, so we can 'require' them automatically.
41 Dir
.glob(websites_pattern
).each
do |r
|