lbspec 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/lbspec/capture.rb +1 -1
- data/lib/lbspec/request.rb +6 -6
- data/lib/lbspec/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: 54d84e1c4eaec31b2382125950e00a920f3a8060
|
4
|
+
data.tar.gz: 8625ccd2d2c09e0352b4c57ba49638a0904022a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e6b849c0db14c5f8f95c940c171352558963525ca0e16ad0a093bae2bea0d9a2dd8500e455f00d60ed60f1d5d96149763c1404b8d89f01ca776ead014a30093
|
7
|
+
data.tar.gz: 6c8fccc2d834d5cd7d67b0042d88a083febf4db5707865642280f3d8845377d97a23bd56320f8a2f94de3e0e56321caca6e1868344d3d922ed829a842cbaf2c5
|
data/README.md
CHANGED
@@ -98,6 +98,16 @@ vhost_c:443
|
|
98
98
|
vhost_c:443/test/
|
99
99
|
should transfer requests to ["node_b", "node_c"] port 80 https.
|
100
100
|
should respond 200 OK
|
101
|
+
vhost_c:80/test/
|
102
|
+
should transfer requests to node_c http from node_a.
|
103
|
+
loadbalancer
|
104
|
+
should healthcheck node_c including /test/healthcheck from 192.168.1.1.
|
105
|
+
loadbalancer
|
106
|
+
should healthcheck node_c including /test/healthcheck at interval of 5 sec.
|
107
|
+
|
108
|
+
Finished in 5.1 seconds
|
109
|
+
16 examples, 0 failures
|
110
|
+
$
|
101
111
|
```
|
102
112
|
|
103
113
|
|
data/lib/lbspec/capture.rb
CHANGED
data/lib/lbspec/request.rb
CHANGED
@@ -37,19 +37,19 @@ module Lbspec
|
|
37
37
|
|
38
38
|
def send_http(prove)
|
39
39
|
@port = 80 unless @port
|
40
|
-
uri = 'http://' + "#{@addr}:#{@port}#{@path}
|
41
|
-
command = build_curl_command(uri, @options)
|
40
|
+
uri = 'http://' + "#{@addr}:#{@port}#{@path}"
|
41
|
+
command = build_curl_command(uri, prove, @options)
|
42
42
|
Lbspec::Util.exec_command(command, @from)
|
43
43
|
end
|
44
44
|
|
45
45
|
def send_https(prove)
|
46
46
|
@port = 443 unless @port == 0
|
47
|
-
uri = 'https://' + "#{@addr}:#{@port}#{@path}
|
48
|
-
command = build_curl_command(uri, @options)
|
47
|
+
uri = 'https://' + "#{@addr}:#{@port}#{@path}"
|
48
|
+
command = build_curl_command(uri, prove, @options)
|
49
49
|
Lbspec::Util.exec_command(command, @from)
|
50
50
|
end
|
51
51
|
|
52
|
-
def build_curl_command(uri, options = {})
|
52
|
+
def build_curl_command(uri, prove, options = {})
|
53
53
|
env, opt = '', ''
|
54
54
|
opt << (options[:timeout] ? " -m #{options[:timeout]}" : '')
|
55
55
|
opt << (options[:ignore_valid_ssl] ? ' -k' : '')
|
@@ -59,7 +59,7 @@ module Lbspec
|
|
59
59
|
env << %Q(NO_PROXY="#{options[:noproxy]}" )
|
60
60
|
end
|
61
61
|
opt << header_option(options[:header])
|
62
|
-
"#{env}curl -v -i -s #{opt} '#{uri}'"
|
62
|
+
"#{env}curl -v -i -H 'X-Lbspec-Prove: #{prove}' -s #{opt} '#{uri}'"
|
63
63
|
end
|
64
64
|
|
65
65
|
def header_option(header)
|
data/lib/lbspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lbspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OTA Hiroshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|