driller 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTY1MTY1OWRmMDAxYmMzOGY2MDUwYjAyMmQyYTMwZjQwMGFlNGUxZA==
4
+ ZWQzNGUxOWVjMmE4ZThmMjVmMTYwMTA2OTk4ZTYxZjk0ZGIzNDUzOQ==
5
5
  data.tar.gz: !binary |-
6
- NGRmM2FiNzhiMmNjZjc4YWMzNGNhODM5YzQ1YTJlODI3MGQ3NjMyOA==
6
+ ZjFkNmFlOWE5Njg0YzhlODlmODcxMWI5NGI4MTZkYzM4NzQyZmFlZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWJiMTVhZThiZmE2ZTQxZTU0NzEwNjZhOWJkZDMwZjUyOWEyNWRhNGYwMzY0
10
- ZTE5OWQ1NzI1NmY2NGQ0Yzg5NTkwYzZhZjdiZjg4YTNkMWNiYTdhOWI2Mjdl
11
- NDdkY2NhMzdlZmQwNTQ5OTc1YjkwMmY0NjI2ZGU2Mjg2ZjZjNzU=
9
+ NGM5ZjcyMDk1MjU2NzZmYzZhZWVkNmFjODk0M2Y5Nzg3Y2VjOWFiYmU0ZWEz
10
+ NDM5MDFlMDhjZDhjZjQ0NjBiNTg4NzAyNjVlNzYzY2ZmNzY5MDUyMTMwYWUx
11
+ NzY4MDkxNDU2ZTk2NjRlYTI0NWVhMjI3YjlmNGViOGNlMDQ4YjA=
12
12
  data.tar.gz: !binary |-
13
- ZGIzNzkzMWY4MzY1YTQ1MzJjZjM4YWRiYWM3YmZiZDZlMTNmZjE5ZTA2NDg3
14
- ODZmOGVhOWEzZmFkYWRmNThhZjhjMWRiOTIyZTk0OTc5M2RhMmVlNDJkMzQy
15
- YTk2MGUwNThlZDM2OThmMjc4M2E5MmZjYTI4OTFhNjA3ZDU3NzE=
13
+ NzAxNmE4Y2VmZDkyZTM0MjVkNTM3Y2QxOGM1NmRlODhmZDQyYTViOWQ3Mjg0
14
+ NjQyMzUyYTNjMDViODg0Y2M3YzU1OWYzZjE0MjU2YTQ3YzZhMzZlOWUyZGFk
15
+ MzEyODVkODQyN2I0OTAyYjk1ZGJhNmM2OTg4OWJhZmJhZDE4ZjM=
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: driller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant86
8
+ - Qambar
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
@@ -56,21 +57,10 @@ description: Driller is a command line Ruby based web crawler based on Anemone.
56
57
  can crawl website and reports error pages which are not 200 or 301.
57
58
  email:
58
59
  - shashikant.jagtap@aol.co.uk
59
- executables:
60
- - driller
60
+ executables: []
61
61
  extensions: []
62
62
  extra_rdoc_files: []
63
- files:
64
- - .gitignore
65
- - Gemfile
66
- - LICENSE.txt
67
- - README.md
68
- - Rakefile
69
- - bin/driller
70
- - driller.gemspec
71
- - lib/driller.rb
72
- - lib/driller/uri_helper.rb
73
- - lib/driller/version.rb
63
+ files: []
74
64
  homepage: https://github.com/Shashikant86/driller
75
65
  licenses:
76
66
  - MIT
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2015 Shashikant86
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md DELETED
@@ -1,52 +0,0 @@
1
- # Driller
2
-
3
- Driller is a command line Ruby based web crawler based on Anemone. Driller can
4
-
5
- * Crawl website and reports error pages which are not 200 or 301. This will report all other HTTP codes.
6
- * Driller will report slow pages which are returned response time > 5000
7
- * This will create three HTML files valid_urls.html which are 200 response. broken.html wich are not 200. slow_pages.html which are retuned reaponse time > 5000
8
-
9
-
10
-
11
- ## Installation
12
-
13
- Add this line to your application's Gemfile:
14
-
15
- ```ruby
16
- gem 'driller'
17
- ```
18
-
19
- And then execute:
20
-
21
- $ bundle
22
-
23
- Or install it yourself as:
24
-
25
- $ gem install driller
26
-
27
- ## Usage
28
-
29
- Driller takes two arguments
30
-
31
- * URL of the page to be crawled
32
- * Depth of the crawling
33
-
34
-
35
- $ driller http://www.example.com 2
36
-
37
- If you have installed it from bundle the
38
-
39
- $ bundle exec driller http://www.example.com 2
40
-
41
-
42
- This will crawl website upto level 2. You can increase depth as per your need. This will create three HTML files valid_urls.html which are 200 response. broken.html wich are not 200. slow_pages.html which are retuned reaponse time > 5000
43
-
44
- You an display these html files to CI server.
45
-
46
- ## Contributing
47
-
48
- 1. Fork it ( https://github.com/[my-github-username]/driller/fork )
49
- 2. Create your feature branch (`git checkout -b my-new-feature`)
50
- 3. Commit your changes (`git commit -am 'Add some feature'`)
51
- 4. Push to the branch (`git push origin my-new-feature`)
52
- 5. Create a new Pull Request
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
data/bin/driller DELETED
@@ -1,68 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'driller/version'
3
- require 'driller/uri_helper'
4
- require 'fileutils'
5
- require "rubygems"
6
- require "anemone"
7
-
8
- webpage = ARGV[0]
9
- depth = ARGV[1]
10
-
11
- Anemone.crawl(webpage) do |anemone|
12
-
13
- anemone.depth_limit = depth.to_i
14
- puts "============= Driller is now checking your website links. If any of the link returned non 200, it will be displayed here========="
15
- anemone.focus_crawl do |page|
16
- page.links.select { |url| url.starts_with? webpage }
17
- end
18
-
19
- file = File.new('valid_pages.html', 'w')
20
- file = File.new('broken.html', 'w')
21
- file = File.new('slow_pages.html', 'w')
22
- file = File.new('extremely_slow_pages.html', 'w')
23
-
24
- anemone.on_every_page do |page|
25
-
26
- if page.code != 200
27
- puts "=======This page is broken ======\n"
28
- puts page.url
29
- puts "\n returned response code of\n"
30
- puts page.code
31
- puts "=======Plese fix it ======\n"
32
- file = File.open('broken.html', 'a+')
33
- file.puts page.url
34
- file.write("\n")
35
- file.write("Returned with response code \n")
36
- file.write("\n")
37
- file.puts page.code
38
- else if
39
- page.code == 200
40
- file = File.open('valid_pages.html', 'a+')
41
- file.puts page.url
42
- file.write("\n")
43
- else if
44
- page.response_time > 5000
45
- puts "=======Slow Page======\n"
46
- puts page.url
47
- file = File.open('slow_pages.html', 'a+')
48
- file.puts page.url
49
- file.write("\n")
50
- file.write("Returned with response time \n")
51
- file.write("\n")
52
- file.puts page.response_time
53
- else if
54
- page.response_time > 10000
55
- puts "=======Very Slow Page======\n"
56
- puts page.url
57
- file = File.open('extremely_slow_pages.html', 'a+')
58
- file.puts page.url
59
- file.write("\n")
60
- file.write("Returned with response time which is not acceptable at all \n")
61
- file.write("\n")
62
- file.puts page.response_time
63
- end
64
- end
65
- end
66
- end
67
- end
68
- end
data/driller.gemspec DELETED
@@ -1,25 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'driller/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "driller"
8
- spec.version = Driller::VERSION
9
- spec.authors = ["Shashikant86"]
10
- spec.email = ["shashikant.jagtap@aol.co.uk"]
11
- spec.summary = %q{Drill your website for error and slow pages}
12
- spec.description = %q{Driller is a command line Ruby based web crawler based on Anemone. Driller can crawl website and reports error pages which are not 200 or 301.}
13
- spec.homepage = "https://github.com/Shashikant86/driller"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
-
22
- spec.add_runtime_dependency "bundler", "~> 1.0"
23
- spec.add_runtime_dependency "rake"
24
- spec.add_runtime_dependency "anemone"
25
- end
data/lib/driller.rb DELETED
@@ -1,8 +0,0 @@
1
- require "driller/version"
2
- require "driller/uri_helper"
3
- require "driller/crawler"
4
- require "anemone"
5
-
6
- module Driller
7
-
8
- end
@@ -1,8 +0,0 @@
1
- module URI
2
- class Generic
3
- def starts_with?(prefix)
4
- prefix = prefix.to_s
5
- self.to_s[0, prefix.length] == prefix
6
- end
7
- end
8
- end
@@ -1,3 +0,0 @@
1
- module Driller
2
- VERSION = "0.1.0"
3
- end