]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blob - lib/whatever-dl.rb
Add the base 'rb' file which includes all of the other requirements.
[dead/whatever-dl.git] / lib / whatever-dl.rb
1 #
2 # Copyright Michael Orlitzky
3 #
4 # http://michael.orlitzky.com/
5 #
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.
10 #
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.
15 #
16 # http://www.fsf.org/licensing/licenses/gpl.html
17 #
18
19 #
20 # Load everything the main script and tests will require.
21 #
22
23 require 'whatever-dl/configuration'
24 require 'whatever-dl/downloader'
25
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.
29 require 'pathname'
30 my_path = Pathname.new(__FILE__).realpath.to_s
31
32 # The Dir.glob that's coming up doesn't use the
33 # Ruby library path so we need to tell it where to
34 # look explicitly.
35 websites_pattern = File.dirname(my_path) + 'whatever-dl/websites/*.rb'
36
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|
40 require r
41 end