lib/anemone/core.rb in spk-anemone-0.3.0 vs lib/anemone/core.rb in spk-anemone-0.3.1

- old
+ new

@@ -5,11 +5,11 @@ require 'anemone/page_store' require 'anemone/storage' module Anemone - VERSION = '0.3.0'; + VERSION = '0.3.1'; # # Convenience method to start a crawl # def Anemone.crawl(urls, options = {}, &block) @@ -191,10 +191,10 @@ @opts[:threads] = 1 if @opts[:delay] > 0 @pages = PageStore.new(@opts[:storage] || Anemone::Storage.Hash) @robots = Robots.new(@opts[:user_agent]) if @opts[:obey_robots_txt] end - # Generate Authorization string only if not already set + # Generate Authorization string and set authorization opts def authorization(auth=nil) require 'base64' if auth.is_a?(String) && auth.include?(':') self.authorization = "Basic #{Base64.b64encode(auth)}" elsif auth.is_a?(Array)