spidr_cli 0.1.0 → 0.2.0

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
  SHA256:
3
- metadata.gz: c474f12ce4328ca292990e2e0132a436dca3e99f1a18ac3f3e0c2efbd780ba5b
4
- data.tar.gz: 70a46ac79acc21bb34b2c78a442d0cc0299286f0a39946fdf017d92a2d789c19
3
+ metadata.gz: 122d1ee2879d8333bae8fda51cbaa5adcc0a3810344a925593cfdc9dfc459916
4
+ data.tar.gz: 7f5471d05f5b977b531fccca29b07f3c5278b1b1b23e2c625f1ae832c0b57481
5
5
  SHA512:
6
- metadata.gz: 90a4939a6a532f7dfdb77ce61c9a250bbf222df5238de947594e35337d6365b0747ddd597073f02400a157aff5351baebfa54d414060dcbb37fc69555092e83e
7
- data.tar.gz: 964c638ba0b24265507f6afca17ece303556e95f156ad00345e7bcaabce7b6f957d81177a0f2f15d29c0a8e688d725297ac0646a66fe7c733e3dbe4bb5fd25a0
6
+ metadata.gz: 4dfc79d60c5f5a6a3dd119eee44af28f31d92b915fe4ebe4fcb07a0a00781e111e260adacae6d0bb860223902478f6550e4ba39e6f82c1865237bf1f5a8de939
7
+ data.tar.gz: c577c737be56e1b1009a343354bef7aae2fc2dc3e1a829a358430e54772623d252ae24080a1800370f2c670a04c6f55598e91cd462e64ab81709682104cfaffb
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # SpidrCLI
1
+ # SpidrCLI [![Build Status](https://travis-ci.org/buren/spidr_cli.svg?branch=master)](https://travis-ci.org/buren/spidr_cli)
2
2
 
3
3
  Command Line Interface (CLI) for the excellent [`spidr`](https://github.com/postmodern/spidr) gem.
4
4
 
@@ -51,10 +51,13 @@ $ spidr --columns=code,content_type,url \
51
51
  Full usage instructions
52
52
 
53
53
  ```
54
- Usage: spidr [<strategy>] [options] <url>
54
+ Usage: spidr [<method>] [options] <url>
55
55
  --columns=[val1,val2] Columns in output
56
56
  --content-types=[val1,val2] Formats to output (html, javascript, css, json, ..)
57
57
  --[no-]header Include the header
58
+ --hosts=[example.com] Only spider links on certain hosts
59
+ --ignore-hosts=[www.example.com]
60
+ Do not spider links on certain hosts
58
61
  --ports=[80, 443] Only spider links on certain ports
59
62
  --ignore-ports=[8000, 8080, 3000]
60
63
  Do not spider links on certain ports
@@ -48,13 +48,13 @@ module SpidrCLI
48
48
 
49
49
  # NOTE: --hosts and --ignore-hosts are overriden when using Spidr::site
50
50
  # @see https://github.com/postmodern/spidr/blob/master/lib/spidr/agent.rb#L273
51
- # parser.on('--hosts=[example.com]', Array, 'Only spider links on certain hosts') do |value|
52
- # spidr_options[:hosts] = value.map { |v| Regexp.new(v) } if value
53
- # end
54
- #
55
- # parser.on('--ignore-hosts=[www.example.com]', Array, 'Do not spider links on certain hosts') do |value|
56
- # spidr_options[:ignore_hosts] = value.map { |v| Regexp.new(v) } if value
57
- # end
51
+ parser.on('--hosts=[example.com]', Array, 'Only spider links on certain hosts') do |value|
52
+ spidr_options[:hosts] = to_option_regexp_array(value) if value
53
+ end
54
+
55
+ parser.on('--ignore-hosts=[www.example.com]', Array, 'Do not spider links on certain hosts') do |value|
56
+ spidr_options[:ignore_hosts] = to_option_regexp_array(value) if value
57
+ end
58
58
 
59
59
  parser.on('--ports=[80, 443]', Array, 'Only spider links on certain ports') do |value|
60
60
  spidr_options[:ports] = to_option_int_array(value) if value
@@ -1,3 +1,3 @@
1
1
  module SpidrCLI
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spidr_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Burenstam