haproxy-tools 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -116,7 +116,7 @@ module HAProxy::Treetop
116
116
  end
117
117
 
118
118
  rule dns_host
119
- [a-zA-Z\-\.] 4..255 <Host>
119
+ [a-zA-Z\-\.\d] 4..255 <Host>
120
120
  end
121
121
 
122
122
  rule proxy_name
@@ -1,3 +1,3 @@
1
1
  module HAProxy
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -52,3 +52,4 @@ backend logs
52
52
  server fake_logger 127.0.0.1:9999 backup
53
53
  server prd_log_1 10.245.174.75:8000 cookie i-prd_log_1 check inter 3000 rise 2 fall 3 maxconn 1000
54
54
  server prd_log_2 10.215.157.10:8000 cookie i-prd_log_2 check inter 3000 rise 2 fall 3 maxconn 1000
55
+ server prd_log_3 cloudloghost1:8000 cookie i-prd_log_2 check inter 3000 rise 2 fall 3 maxconn 1000
@@ -18,6 +18,6 @@ listen http_proxy 55.55.55.55:80
18
18
  option forwardfor # This sets X-Forwarded-For
19
19
 
20
20
  ## Define your servers to balance
21
- server web1 66.66.66.66:80 weight 1 maxconn 512 check
21
+ server web1 dnshost66:80 weight 1 maxconn 512 check
22
22
  server web2 77.77.77.77:80 weight 1 maxconn 512 check
23
23
  server web3 88.88.88.88:80
@@ -12,7 +12,7 @@ describe "HAProxy::Parser" do
12
12
  @config.backends.size.should == 2
13
13
  logs_backend = @config.backend('logs')
14
14
 
15
- logs_backend.servers.size.should == 3
15
+ logs_backend.servers.size.should == 4
16
16
 
17
17
  server1 = logs_backend.servers['prd_log_1']
18
18
  server1.name.should == 'prd_log_1'
@@ -28,6 +28,11 @@ describe "HAProxy::Parser" do
28
28
  server3.name.should == 'prd_log_2'
29
29
  server3.host.should == '10.215.157.10'
30
30
  server3.port.should == '8000'
31
+
32
+ server3 = logs_backend.servers['prd_log_3']
33
+ server3.name.should == 'prd_log_3'
34
+ server3.host.should == 'cloudloghost1'
35
+ server3.port.should == '8000'
31
36
  end
32
37
  end
33
38
 
@@ -74,7 +79,7 @@ describe "HAProxy::Parser" do
74
79
 
75
80
  server1 = listener.servers['web1']
76
81
  server1.name.should == 'web1'
77
- server1.host.should == '66.66.66.66'
82
+ server1.host.should == 'dnshost66'
78
83
  server1.port.should == '80'
79
84
  server1.attributes['weight'].should == '1'
80
85
  server1.attributes['maxconn'].should == '512'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haproxy-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Wadsworth
@@ -141,6 +141,7 @@ files:
141
141
  - TODO
142
142
  - docs/haproxy-1.3-configuration.txt
143
143
  - docs/haproxy-1.4-configuration.txt
144
+ - docs/haproxy-1.5-configuration.txt
144
145
  - haproxy-tools.gemspec
145
146
  - lib/haproxy-tools.rb
146
147
  - lib/haproxy/config.rb