doublecheck 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/doublecheck CHANGED
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'doublecheck'
4
+ require 'doublecheck_command_line'
4
5
 
5
6
  if ARGV[0].nil?
6
7
  puts "USAGE: doublecheck http://example.com/sitemap.xml"
7
8
  else
8
- sitemap = DoubleCheck::Sitemap.new(ARGV[0])
9
+ sitemap = DoubleCheck::CommandLine.new(ARGV[0])
9
10
  sitemap.process
10
11
  data = sitemap.data
11
12
  data.each do |code, urls|
12
- puts "Status Code: #{code}"
13
+ puts "\nStatus Code: #{code}"
13
14
  puts "#{urls.size} urls"
14
15
  urls.each do |url|
15
16
  puts "\t#{url}"
@@ -0,0 +1,7 @@
1
+ class DoubleCheck::CommandLine < DoubleCheck::Sitemap
2
+ def record_result(url, response)
3
+ super(url, response)
4
+ $stdout.write_nonblock('.')
5
+
6
+ end
7
+ end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doublecheck
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
9
- version: "0.2"
8
+ - 3
9
+ version: "0.3"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Humbert
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-24 00:00:00 -07:00
17
+ date: 2011-03-25 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -78,6 +78,7 @@ files:
78
78
  - lib/check_url.rb
79
79
  - lib/doublecheck.rb
80
80
  - lib/sitemap.rb
81
+ - lib/doublecheck_command_line.rb
81
82
  has_rdoc: true
82
83
  homepage: https://github.com/nathanhumbert/doublecheck
83
84
  licenses: