snapcrawl 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2794d3fe40619ef7de870f738767419cdb893fc
4
- data.tar.gz: 6a866a6ac4808e7a522e67db0415e31d1d463b62
3
+ metadata.gz: 76e5f98ee14c7d5f4c8d3d6589a22dd1b9b66335
4
+ data.tar.gz: e9389d5b2782b71854022f819ba5c93f599ca664
5
5
  SHA512:
6
- metadata.gz: 6195bff2403b3c4e7900b6c6e33e962eafa37bbbfed78940da5fce4152318bb6715073ce78bc8d7865451eb287a9e57aa77806064634e9e388c20fef8c5f929a
7
- data.tar.gz: f2b0207a6b976a34e1554adaa305f415191903cdd51b7dfd7bf70735fd225f4ef7de58589ed3aa179cde10e621be170b93897c3523f9e323cbfddf35dfca854f
6
+ metadata.gz: 60da4ba17c53a7fe8f9c61374277f75329045412f4e3ad172cf0ed9fe2684bdf62a37d05cc5cc90265034b47561917960fd74b2e8a11f156cad3062ebf4c42d6
7
+ data.tar.gz: 7d63c4de115ca54183f6933eee913b90c7c9302f1132ac0414eb75941a6564d2989516e3fd033c14c036024e21f02e99b5bb4c15f18f2b509eca9bc38ff0677f
data/README.md CHANGED
@@ -1,14 +1,18 @@
1
- # SnapCrawl - crawl a website and take screenshots
1
+ Snapcrawl - crawl a website and take screenshots
2
+ ==================================================
2
3
 
3
4
  [![Gem Version](https://badge.fury.io/rb/snapcrawl.svg)](http://badge.fury.io/rb/snapcrawl)
4
5
  [![Code Climate](https://codeclimate.com/github/DannyBen/snapcrawl/badges/gpa.svg)](https://codeclimate.com/github/DannyBen/snapcrawl)
5
6
  [![Dependency Status](https://gemnasium.com/DannyBen/snapcrawl.svg)](https://gemnasium.com/DannyBen/snapcrawl)
6
7
 
8
+ ---
7
9
 
8
- SnapCrawl is a command line utility for crawling a website and saving
10
+ Snapcrawl is a command line utility for crawling a website and saving
9
11
  screenshots.
10
12
 
11
- ## Features
13
+
14
+ Features
15
+ --------------------------------------------------
12
16
 
13
17
  - Crawls a website to any given depth and save screenshots
14
18
  - Can capture the full length of the page
@@ -17,11 +21,15 @@ screenshots.
17
21
  - Uses local caching to avoid expensive crawl operations if not needed
18
22
  - Reports broken links
19
23
 
20
- ## Install
24
+
25
+ Install
26
+ --------------------------------------------------
21
27
 
22
28
  $ gem install snapcrawl
23
29
 
24
- ## Usage
30
+
31
+ Usage
32
+ --------------------------------------------------
25
33
 
26
34
  $ snapcrawl --help
27
35
 
@@ -55,14 +63,17 @@ screenshots.
55
63
 
56
64
  ---
57
65
 
58
- ## Notes
66
+ Notes
67
+ --------------------------------------------------
59
68
 
60
- 1. If a URL cannot be found, SnapCrawl will report to stderr.
69
+ 1. If a URL cannot be found, Snapcrawl will report to stderr.
61
70
  You can create a report by running `snapcrawl go example.com 2> err.txt`
62
71
 
63
- ## Todo
72
+
73
+ Todo
74
+ --------------------------------------------------
64
75
 
65
76
  - [x] Tests (probably against some ad hoc sinatra)
66
- - [ ] Make ths test server start/stop automatically when testing
77
+ - [ ] Make the test server start/stop automatically when testing
67
78
  - [ ] Move ignored file extensions and mailto/tel links to config
68
79
  - [ ] Add screen size presets (also to user-overridable config)
@@ -170,11 +170,11 @@ module Snapcrawl
170
170
  links.each_with_index do |link|
171
171
  link = link.attribute('href').to_s
172
172
 
173
- # remove #hash
173
+ # Remove #hash
174
174
  link.gsub!(/#.+$/, '')
175
175
  next if link.empty?
176
176
 
177
- # Remove links to images and other files then to mailto/tel
177
+ # Remove links to specific extensions and protocols
178
178
  next if link =~ /\.(#{extensions})(\?.*)?$/
179
179
  next if link =~ /^(#{beginnings})/
180
180
 
@@ -196,8 +196,7 @@ module Snapcrawl
196
196
  end
197
197
 
198
198
  def doc
199
- return @doc if @doc
200
- @doc = File.read template 'docopt.txt'
199
+ @doc ||= File.read template 'docopt.txt'
201
200
  end
202
201
 
203
202
  def template(file)
@@ -217,4 +216,4 @@ module Snapcrawl
217
216
  opts
218
217
  end
219
218
  end
220
- end
219
+ end
@@ -1,3 +1,3 @@
1
1
  module Snapcrawl
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapcrawl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-05 00:00:00.000000000 Z
11
+ date: 2017-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole
@@ -66,6 +66,26 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: phantomjs
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.9.8
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '2.0'
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: 1.9.8
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '2.0'
69
89
  - !ruby/object:Gem::Dependency
70
90
  name: runfile
71
91
  requirement: !ruby/object:Gem::Requirement
@@ -170,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
190
  version: '0'
171
191
  requirements: []
172
192
  rubyforge_project:
173
- rubygems_version: 2.4.6
193
+ rubygems_version: 2.6.6
174
194
  signing_key:
175
195
  specification_version: 4
176
196
  summary: Crawl a website and take screenshots (CLI + Library)