shunt_cache 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shunt_cache/checker.rb +2 -0
- data/lib/shunt_cache/shunt_cache.rake +4 -1
- data/lib/shunt_cache/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39c3f7ded4d85c229ffbab1ab49f057546f0a085
|
4
|
+
data.tar.gz: 92f0a038faa2c9b1794961ad34bfa814d9475ad7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2e33a75f494f736d596fcb242efeaab92200f656d76d8b05c36731b4e7e3b4fe2040cc2d11debd97f14f8feb49c8328a31aa14161657d3e85e60d8a08738fb5
|
7
|
+
data.tar.gz: c93546798368cb2abe22051131d712e670c28c99a130c29bd46da64de2088bb7e9966b443323f14783e975b0480a41db0b0b706b24b8b1bf0c3884666402fb21
|
data/lib/shunt_cache/checker.rb
CHANGED
@@ -29,7 +29,9 @@ module ShuntCache
|
|
29
29
|
response = nil
|
30
30
|
Net::HTTP.start(uri.host, uri.port) do |http|
|
31
31
|
http.read_timeout = timeout
|
32
|
+
|
32
33
|
request = Net::HTTP::Get.new(uri.path)
|
34
|
+
request['Host'] = options[:host] if options[:host]
|
33
35
|
response = http.request(request)
|
34
36
|
end
|
35
37
|
response
|
@@ -17,7 +17,10 @@ namespace :shunt_cache do
|
|
17
17
|
desc "Wait until we get a 200 or 300 ranged http response code for ENV['URL']"
|
18
18
|
task :wait_for_http => :environment do
|
19
19
|
url = ENV.fetch('URL')
|
20
|
-
|
20
|
+
options = {
|
21
|
+
:host => ENV['HOST']
|
22
|
+
}
|
23
|
+
success = ShuntCache::Checker.wait_for_http(url, options)
|
21
24
|
unless success
|
22
25
|
puts "error checking: #{url} - never returned with status within 200..399"
|
23
26
|
exit(1)
|
data/lib/shunt_cache/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shunt_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Ching
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|