apacheconf 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -24,21 +24,26 @@ template = file:'vhost.erb'
24
24
 
25
25
  if should_enable
26
26
  enable(config)
27
- reload_apache
28
- error "=> #{config['site_name']} enabled"
27
+ puts "=> #{config['site_name']} enabled"
29
28
  end
30
29
 
31
30
  if should_disable
32
31
  disable(config)
33
- reload_apache
34
- error "=> #{config['site_name']} disabled"
32
+ puts "=> #{config['site_name']} disabled"
35
33
  end
36
34
 
37
35
  if File.exists?(out_file = get_out_file(config)) && !overwrite
36
+ reload_apache
38
37
  error "=> #{out_file} already exists, won't overwrite it. Quitting."
39
38
  else
40
- open(out_file, 'w+').write(ERB.new(File.read(template), nil, '>').result(binding))
39
+ begin
40
+ open(out_file, 'w+').write(ERB.new(File.read(template), nil, '>').result(binding))
41
+ rescue Errno::EACCES => msg
42
+ reload_apache
43
+ error "=> Unable to write config. You must run apacheconf as sudo."
44
+ end
41
45
  puts "=> Wrote #{out_file} successfully."
46
+ reload_apache
42
47
  end
43
48
 
44
49
 
data/lib/apacheconf.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Apacheconf
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
4
4
 
5
5
  module ApacheHelper
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: apacheconf
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2007-09-27 00:00:00 +01:00
6
+ version: 1.0.1
7
+ date: 2007-09-28 00:00:00 +01:00
8
8
  summary: Simple config generator for apache the debian way.
9
9
  require_paths:
10
10
  - lib
metadata.gz.sig CHANGED
Binary file