]>
gitweb.michael.orlitzky.com - dead/whatever-dl.git/blob - lib/whatever-dl.rb
0f3915207a7bd4069f43b0366e8afd51d12e0528
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.
23 require 'whatever-dl/configuration'
24 require 'whatever-dl/downloader'
26 # We need Pathname to get the real filesystem path
27 # of this script (and not, for example, the path of
28 # a symlink which points to it.
30 my_path
= Pathname
.new(__FILE__
).realpath
.to_s
32 # The Dir.glob that's coming up doesn't use the
33 # Ruby library path so we need to tell it where to
35 websites_pattern
= File
.dirname(my_path
) +
'whatever-dl/websites/*.rb'
37 # All of the website classes are located in one
38 # directory, so we can 'require' them automatically.
39 Dir
.glob(websites_pattern
).each
do |r
|