nginx_config_generator 1.3 → 1.4

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.3') do |p|
4
+ Echoe.new('nginx_config_generator', '1.4') do |p|
5
5
  p.rubyforge_name = 'err'
6
6
  p.author = 'Chris Wanstrath'
7
7
  p.email = 'chris@ozmm.org'
@@ -17,7 +17,15 @@ error "Usage: generate_nginx_config [config file] [out file]" if ARGV.empty? &&
17
17
  overwrite = %w(-y -o -f --force --overwrite).any? { |f| ARGV.delete(f) }
18
18
 
19
19
  config = YAML.load(ERB.new(File.read(env_in || ARGV.shift || 'config.yml')).result)
20
- template = file:'nginx.erb'
20
+ template = if custom_template_index = (ARGV.index('--template') || ARGV.index('-t'))
21
+ custom = ARGV[custom_template_index+1]
22
+ error "=> Specified template file #{custom} does not exist." unless File.exist?(custom)
23
+ ARGV.delete_at(custom_template_index) # delete the --argument
24
+ ARGV.delete_at(custom_template_index) # and its value
25
+ custom
26
+ else
27
+ file:'nginx.erb'
28
+ end
21
29
 
22
30
  if File.exists?(out_file = env_out || ARGV.shift || 'nginx.conf') && !overwrite
23
31
  error "=> #{out_file} already exists, won't overwrite it. Quitting."
@@ -1,11 +1,11 @@
1
1
 
2
- # Gem::Specification for Nginx_config_generator-1.3
2
+ # Gem::Specification for Nginx_config_generator-1.4
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.3"
8
- s.date = %q{2007-08-23}
7
+ s.version = "1.4"
8
+ s.date = %q{2007-10-16}
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.3') do |p|
27
+ # Echoe.new('nginx_config_generator', '1.4') 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.3"
7
- date: 2007-08-23 00:00:00 -07:00
6
+ version: "1.4"
7
+ date: 2007-10-16 00:00:00 -07:00
8
8
  summary: ""
9
9
  require_paths:
10
10
  - lib