krawler 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/krawler/version.rb +1 -1
  2. data/lib/krawler.rb +8 -3
  3. metadata +4 -4
@@ -1,3 +1,3 @@
1
1
  module Krawler
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
data/lib/krawler.rb CHANGED
@@ -81,9 +81,14 @@ module Krawler
81
81
  return
82
82
  ensure
83
83
  @mutex.synchronize do
84
- real = Time.now - start
85
- runtime = page.header['x-runtime'].to_f
86
- network = (real - runtime).round(10)
84
+ real = Time.now - start
85
+ if page
86
+ runtime = page.header['x-runtime'].to_f
87
+ network = (real - runtime).round(10)
88
+ else
89
+ runtime = '0'
90
+ network = '0'
91
+ end
87
92
  puts link
88
93
  puts " [#{real}s real] [#{runtime}s runtime] [#{network}s network] #{@links_to_crawl.size} links..."
89
94
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: krawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-05 00:00:00.000000000 Z
12
+ date: 2012-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mechanize
16
- requirement: &70223227850320 !ruby/object:Gem::Requirement
16
+ requirement: &70098728720940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 2.5.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70223227850320
24
+ version_requirements: *70098728720940
25
25
  description: Simple little website crawler.
26
26
  email:
27
27
  - mike@urlgonomics.com