]> gitweb.michael.orlitzky.com - dead/whatever-dl.git/blobdiff - bin/whatever-dl
Whitespace cleanup.
[dead/whatever-dl.git] / bin / whatever-dl
index b9ea02ca79eeab9e4690db8b49792b40d78ac48d..a40af28fab676f14b3ac36084c3bbdb7ca7cb731 100755 (executable)
@@ -58,9 +58,11 @@ opts.each do |opt, arg|
   end
 end
 
+cfg = Configuration.new()
+
 # Warn about nonsensical options.
-if options[:continue] and not Configuration::DOWNLOAD_METHOD == :wget
-  log.warn('The --continue flag does nothing unless DOWNLOAD_METHOD is :wget.')
+if options[:continue] and not cfg.download_method == 'wget'
+  log.warn("The --continue flag does nothing unless download_method is wget.")
 end
 
 # Note that GetoptLong steals its arguments from ARGV, so we don't need
@@ -73,6 +75,7 @@ if (ARGV.length < 1) then
   Kernel.exit(ExitCodes::EXIT_NO_URL)
 end
 
+
 # Factory method.
 site = Website.create(ARGV[0])
 
@@ -92,7 +95,8 @@ end
 
 # The Downloader class is a factory; it should decide
 # which subclass we get.
-downloader = Downloader.create(Configuration::DOWNLOAD_METHOD)
+puts "download_method: #{cfg.download_method}"
+downloader = Downloader.create(cfg.download_method)
 
 # Attempt to download the file, and rescue and report
 # any (predictable) exceptions. The wget downloader will