diff --git a/cloud-crawler/lib/cloud-crawler.rb b/cloud-crawler/lib/cloud-crawler.rb index 91af08c..f078727 100644 --- a/cloud-crawler/lib/cloud-crawler.rb +++ b/cloud-crawler/lib/cloud-crawler.rb @@ -20,17 +20,18 @@ # require 'rubygems' require 'bundler/setup' -require 'cloud-crawler' -require 'cloud-crawler/logger' -require 'cloud-crawler/cookie_store' -require 'cloud-crawler/http' -require 'cloud-crawler/page' -require 'cloud-crawler/redis_page_store' -require 'cloud-crawler/driver' -require 'cloud-crawler/dsl_core' -require 'cloud-crawler/dsl_front_end' -require 'cloud-crawler/crawl_job' -require 'cloud-crawler/batch_crawl_job' -require 'cloud-crawler/batch_curl_job' -require 'cloud-crawler/worker' +%w[logger + cookie_store + http + page + redis_page_store + driver + dsl_core + dsl_front_end + crawl_job + batch_crawl_job + batch_curl_job + worker].each do |f| + require "cloud-crawler/#{f}" +end diff --git a/cloud-crawler/lib/cloud-crawler/redis_page_store.rb b/cloud-crawler/lib/cloud-crawler/redis_page_store.rb index 70abe2f..ea3acaa 100644 --- a/cloud-crawler/lib/cloud-crawler/redis_page_store.rb +++ b/cloud-crawler/lib/cloud-crawler/redis_page_store.rb @@ -97,7 +97,7 @@ def merge!(hash) end def size - @pages.keys("*").size + @pages.dbsize end def keys diff --git a/cloud-crawler/lib/cloud-crawler/version.rb b/cloud-crawler/lib/cloud-crawler/version.rb new file mode 100644 index 0000000..ceb6d16 --- /dev/null +++ b/cloud-crawler/lib/cloud-crawler/version.rb @@ -0,0 +1,27 @@ +# +# Copyright (c) 2013 Charles H Martin, PhD +# +# Calculated Content (TM) +# http://calculatedcontent.com +# charles@calculatedcontent.com +# +# All rights reserved. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL MADE BY MADE LTD BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +module CloudCrawler + MAJOR = 0 + MINOR = 2 + PATCH = 0 + VERSION = [MAJOR, MINOR, PATCH].join('.') +end \ No newline at end of file