Sha256: 9ad0da9b957b5e5451458ed814e55e648dd31dbcd3818fcc54a754bf28ca9ce7
Contents?: true
Size: 874 Bytes
Versions: 1
Compression:
Stored size: 874 Bytes
Contents
#!/usr/bin/env ruby lib = File.expand_path(File.dirname(__FILE__) + '/../lib') $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib) require 'cohesion' require 'slop' opts = Slop.parse(:help => true) do banner 'Usage: cohesion check [options]' on 'u', 'url', 'URL to start crawl from' on 'i', 'internal_urls', 'Url patterns to include', :as => Array on 'e', 'external_urls', 'Url patterns to exclude', :as => Array on 's', 'seed_urls', "Seed urls", :as => Array on 'v', 'verbose', 'Display crawl information' on 'd', 'debug', 'Display debug information' on 'l', 'crawl_limit', 'Limit the crawl to a number of urls' on 't', 'thread_count', "Set the number of threads used" end if opts[:url] failures = Cohesion::Check.site(opts[:url], opts) if failures.count == 0 exit(true) else exit(false) end else puts end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cohesion-0.0.5 | bin/cohesion |