ece_prewarmer 0.1.7 → 0.1.8

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: 9fa3b7069fc8f89bd42d70f4bfed21bf4fd9e503
4
- data.tar.gz: ebcba5d2b7e75b3d565ef31d05b686d899b9f456
3
+ metadata.gz: 0714e0cb596ed27aa27cab82620bc036a0b7ac88
4
+ data.tar.gz: 182780118a3b8bc1e3357d6d67cf46596e829f1d
5
5
  SHA512:
6
- metadata.gz: 6f8df83c1233d5da4e062a2a50be5f86764de3a12988d7f19fba6696dd00a55c476464f3f9a8cda84fd27703a225774ed9789efaaeb3c49381c71fea14e8dcbf
7
- data.tar.gz: c6f8c2e9420cc12aa62fba7e8378a2d522ec4fc7e998621d7aba090196e7248ab2cb2159a1532246bb97abe8aefeae1ffa1997f45b54680238d32108394086f5
6
+ metadata.gz: f8b2bf6a389a15272ee6c5f332e8cc6dae1fd21ff07fd3fdbd23a30f6b069ec067e971193680b8db5f9bafa9cd78a963a3781080366dcd05a9322b2315e4a960
7
+ data.tar.gz: 84c5327f4249bdc1c1c55e7bc81c0c7c906aaf5c669f90a7fb1d3c130f70fc73c27d5065c337800ee218f1e1bd92031fd3a93723aec32e4c567505eea4f57301
data/bin/ece-prewarmer CHANGED
@@ -36,6 +36,10 @@ optparse = OptionParser.new do |opts|
36
36
  options[:threads] = o.nil? ? nil : o.to_i
37
37
  end
38
38
 
39
+ opts.on('-aTHREADS', '--addparam=PARAMS', '?PARAMS....') do |o|
40
+ options[:params] = o.nil? ? nil : o.to_s
41
+ end
42
+
39
43
  opts.on('-V', '--version', 'Version') do |o|
40
44
  puts EcePrewarmer::VERSION
41
45
  exit
@@ -60,6 +64,7 @@ opts[:port] = options[:port]
60
64
  opts[:threads] = options[:threads]
61
65
  opts[:depth_limit] = options[:depth_limit]
62
66
  opts[:user_agent] = options[:user_agent]
67
+ opts[:params] = options[:params]
63
68
 
64
69
  def shutdown
65
70
  Thread.list.each do |thread|
@@ -1,3 +1,3 @@
1
1
  module EcePrewarmer
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
data/lib/ece_prewarmer.rb CHANGED
@@ -31,6 +31,7 @@ module EcePrewarmer
31
31
  opts = parse_opts opts
32
32
  url = "http://#{website}:#{opts[:port]}/"
33
33
  add_host_alias(host, website, opts[:hostfile])
34
+ url = opts[:params].nil? ? url : url + opts[:params].nil?
34
35
  results = crawl(url, opts[:port], opts[:verbose], opts[:threads], opts[:depth_limit], opts[:user_agent])
35
36
  remove_host_alias(website, opts[:hostfile])
36
37
  results
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ece_prewarmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patricio Bruna