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 +4 -4
- data/bin/ece-prewarmer +5 -0
- data/lib/ece_prewarmer/version.rb +1 -1
- data/lib/ece_prewarmer.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0714e0cb596ed27aa27cab82620bc036a0b7ac88
|
4
|
+
data.tar.gz: 182780118a3b8bc1e3357d6d67cf46596e829f1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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|
|
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
|