driller 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDhmMmFiMzVmNTk0N2NiMjQ0MTMxZWVmMWRkZGZkODQxZmYxZjk2Ng==
4
+ MmNjNmVkYjZhODQxMjI3ZTAyOWMxYzk0YzVkYmVkNzU0YTJmZjI0OQ==
5
5
  data.tar.gz: !binary |-
6
- NDBmMzE3NWM5NjU3NWUxNjczYTk0NWMzNWNlNDVkZDAxMDFhZGI4NQ==
6
+ OTE4YWE5ZThmMDgwNWFlNGNiZWZkZGQ0MmU1NDRiYjNmMGUwNDQ2Ng==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWRkOTg2NDVkMTI3NWY2MGFmNDM2NGViY2MxYzRkODQ5YTc3NWM2YjE4YjU1
10
- MmZlYTU3ZTc1NzBjNTg1N2Q0NGVlMjdjYjBiOTkzYjllYTNmNDBmYWQwNGI3
11
- ZTAxZDNjYjA2YThkMDRhZWYzNWI0ODQ1OTkyYzI2OTY2ZGE2MzY=
9
+ ZTgzNDVjODQ4ZTI0ZmE3YmEzNjM0Y2E1MjcyMmVjZTI5MWM3MDg1ZjZlMGY0
10
+ MjQzZWMwZmRlZmQzMmRjZTk5OTRkODEwNGI3YzU4NTIyN2JlYjlkOTM0ODFi
11
+ MzU4MzBiMTczNzE1NDY1ZTliZTIxNGQyZGIwOGM4Y2I1NjFhMDQ=
12
12
  data.tar.gz: !binary |-
13
- YTAzMWQ2N2YyZjNiZjljODM1NDFkMzczY2VjMDU3NzRmZjg1ZWZiMzhkMmJk
14
- MGQ0M2ExNWIxNTI3MTg2ZjY2MzVkMDg1NmZlOWUwNzY1OWRlMTQ1Y2Y2MzNh
15
- OTA4ZDkzYjY1MTY5NWVkYWI2NWZhYTlkMjdiOWZjMjlhOTg1MmI=
13
+ ODIyM2M1MDI3Nzk0N2NhMTdhNjllMmU2ZGUyNDNiOWJhNWNmYjg0MjU4ZmI5
14
+ MmNjM2E3YjA0MDdlYWJlYTVkNmIyNWM2NjM3ZjhjMDNjNzJiNzFiOTdiNTE2
15
+ MDI0NTdhOGNhNWM0ZjcxMzIyYmFjY2Q3NDZiN2JjYmRkMDE5M2U=
@@ -1,3 +1,3 @@
1
1
  module Driller
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/lib/driller.rb CHANGED
@@ -4,42 +4,5 @@ require "driller/crawler"
4
4
  require "anemone"
5
5
 
6
6
  module Driller
7
- URL = ARGV[0]
8
- Anemone.crawl(URL) do |anemone|
9
-
10
- anemone.depth_limit = 2
11
-
12
- anemone.focus_crawl do |page|
13
- page.links.select { |url| url.starts_with? URL }
14
- end
15
-
16
- file = File.new('valid_pages.html', 'w')
17
- file = File.new('broken.html', 'w')
18
- file = File.new('slow_pages.html', 'w')
19
-
20
- anemone.on_every_page do |page|
21
-
22
- if page.code = 200 && page.code = 301
23
- file = File.open('valid_pages.html', 'a')
24
- file.puts page.url
25
- end
26
-
27
- if page.code != 200 && page.code != 301
28
- puts "=======broken======\n"
29
- puts page.url
30
- file = File.open('broken.html', 'a')
31
- file.puts page.url
32
- end
33
-
34
-
35
- if page.response_time > 5000
36
- puts "=======Slow Page======\n"
37
- puts page.url
38
- file = File.open('slow_pages.html', 'a')
39
- file.puts page.url
40
- end
41
-
42
- end
43
-
44
- end
7
+
45
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: driller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant86