nginx_config_generator 1.5 → 1.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'echoe'
3
3
 
4
- Echoe.new('nginx_config_generator', '1.5') do |p|
4
+ Echoe.new('nginx_config_generator', '1.6') do |p|
5
5
  p.rubyforge_name = 'err'
6
6
  p.author = 'Chris Wanstrath'
7
7
  p.email = 'chris@ozmm.org'
@@ -9,10 +9,11 @@ root:
9
9
  sites:
10
10
  # We're naming this vhost 'errtheblog'
11
11
  errtheblog:
12
- # Two upstream servers to proxy balance.
12
+ # Two upstream servers to proxy balance fairly.
13
13
  upstream:
14
14
  - 127.0.0.1:8000
15
15
  - 127.0.0.1:8001
16
+ fair: true
16
17
  # Just a string of server names.
17
18
  server_name: errtheblog.com www.errtheblog.com
18
19
  # www.errtheblog.com => errtheblog.com
@@ -56,6 +56,9 @@ http {
56
56
  <% Array(config['sites']).each do |name, site| %>
57
57
  <% next unless site['upstream'] %>
58
58
  upstream <%= name %> {
59
+ <% if site['fair'] %>
60
+ fair;
61
+ <% end %>
59
62
  <% Array(site['upstream'] || site['upstreams']).each do |server| %>
60
63
  server <%= server %>;
61
64
  <% end %>
@@ -178,6 +181,13 @@ http {
178
181
  location = /50x.html {
179
182
  root html;
180
183
  }
184
+
185
+ <% Array(site['location'] || site['locations']).each do |path, setting| %>
186
+ location = <%= path %> {
187
+ <%= setting %>
188
+ }
189
+ <% end %>
190
+
181
191
  }
182
192
  <% end %>
183
193
  <% end %>
@@ -1,11 +1,11 @@
1
1
 
2
- # Gem::Specification for Nginx_config_generator-1.5
2
+ # Gem::Specification for Nginx_config_generator-1.6
3
3
  # Originally generated by Echoe
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{nginx_config_generator}
7
- s.version = "1.5"
8
- s.date = %q{2007-10-24}
7
+ s.version = "1.6"
8
+ s.date = %q{2007-11-19}
9
9
  s.summary = %q{}
10
10
  s.email = %q{chris@ozmm.org}
11
11
  s.homepage = %q{http://require.errtheblog.com/projects}
@@ -24,7 +24,7 @@ end
24
24
  # require 'rubygems'
25
25
  # require 'echoe'
26
26
  #
27
- # Echoe.new('nginx_config_generator', '1.5') do |p|
27
+ # Echoe.new('nginx_config_generator', '1.6') do |p|
28
28
  # p.rubyforge_name = 'err'
29
29
  # p.author = 'Chris Wanstrath'
30
30
  # p.email = 'chris@ozmm.org'
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: nginx_config_generator
5
5
  version: !ruby/object:Gem::Version
6
- version: "1.5"
7
- date: 2007-10-24 00:00:00 -07:00
6
+ version: "1.6"
7
+ date: 2007-11-19 00:00:00 -08:00
8
8
  summary: ""
9
9
  require_paths:
10
10
  - lib