brightbox-server-tools 2.3.5 → 2.3.6

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.
data/Rakefile CHANGED
@@ -8,8 +8,13 @@ namespace :client do
8
8
 
9
9
  desc "Reinstall the client gem locally"
10
10
  task :reinstall => [:repackage] do
11
- sh %Q{sudo gem uninstall -x -v #{@client.version} #{@client.name} }
12
- sh %q{sudo gem install pkg/*.gem}
11
+ begin
12
+ sh %Q{sudo gem uninstall -x -v #{@client.version} #{@client.name} }
13
+ rescue RuntimeError => e
14
+ puts "Gem not installed, continuing."
15
+ end
16
+
17
+ sh %Q{sudo gem install pkg/#{@client.name}-#{@client.version}.gem}
13
18
  end
14
19
 
15
20
  end
data/bin/railsapp-apache CHANGED
@@ -23,7 +23,13 @@ require "brightbox/webserver-common"
23
23
 
24
24
  def ssl_certificate_key
25
25
  if @key_file
26
- " SSLCertificateKeyFile #{key_file}"
26
+ "SSLCertificateKeyFile #{key_file}"
27
+ end
28
+ end
29
+
30
+ def ssl_intermediate_certificate
31
+ if @intermediate_cert
32
+ "SSLCertificateChainFile #{intermediate_cert_file}"
27
33
  end
28
34
  end
29
35
 
@@ -131,6 +137,7 @@ def https_config
131
137
  SSLEngine On
132
138
  SSLCertificateFile #{@certificate_file}
133
139
  #{ssl_certificate_key}
140
+ #{ssl_intermediate_certificate}
134
141
  #{mongrel_ssl_header}
135
142
  #{standard_server_contents}
136
143
  </VirtualHost>
data/brightbox-gemspec.rb CHANGED
@@ -20,9 +20,9 @@
20
20
  require File.join(File.dirname(__FILE__),"lib/brightbox/version")
21
21
  def add_common(spec)
22
22
  spec.version = Brightbox::VERSION
23
- spec.authors = ["John Leach","Neil Wilson","David Smalley"]
23
+ spec.authors = ["John Leach","Neil Wilson","David Smalley", "Caius Durling"]
24
24
  spec.email = "support@brightbox.co.uk"
25
- spec.homepage = "http://wiki.brightbox.co.uk/docs:thebrightboxgem"
25
+ spec.homepage = "http://wiki.brightbox.co.uk/docs:gemv2:start"
26
26
  spec.rubyforge_project = 'brightbox'
27
27
  spec.has_rdoc = false
28
28
  end
@@ -1,5 +1,5 @@
1
1
  module Brightbox
2
- VERSION = "2.3.5"
2
+ VERSION = "2.3.6"
3
3
  end
4
4
  # Set global scope version so that OptionParser picks it up.
5
5
  ::Version = Brightbox::VERSION
@@ -42,11 +42,11 @@ def certificate_file
42
42
  test_path = File.join('','etc','ssl','certs', cert_base + '.*')
43
43
  candidates = Dir[test_path]
44
44
  if candidates.empty?
45
- abort "#{@opts.program_name}: Unable to find certificate file for #{@cert_base}"
45
+ abort "#{@opts.program_name}: Unable to find certificate file for #{cert_base}"
46
46
  end
47
47
  result = candidates.pop
48
48
  unless candidates.empty?
49
- abort "#{@opts.program_name}: #{@cert_base} resolves to more than one file. Please be more specific"
49
+ abort "#{@opts.program_name}: #{cert_base} resolves to more than one file. Please be more specific"
50
50
  end
51
51
  result
52
52
  end
@@ -68,6 +68,21 @@ def key_file
68
68
  result
69
69
  end
70
70
 
71
+ def intermediate_cert_file
72
+ return @intermediate_cert if File.file?(@intermediate_cert)
73
+ cert_base = File.basename(@intermediate_cert, File.extname(@intermediate_cert))
74
+ test_path = File.join('','etc','ssl','certs', cert_base + '.*')
75
+ candidates = Dir[test_path]
76
+ if candidates.empty?
77
+ abort "#{@opts.program_name}: Unable to find certificate file for #{cert_base}"
78
+ end
79
+ result = candidates.pop
80
+ unless candidates.empty?
81
+ abort "#{@opts.program_name}: #{cert_base} resolves to more than one file. Please be more specific"
82
+ end
83
+ result
84
+ end
85
+
71
86
  @opts = OptionParser.new do |opts|
72
87
  opts.banner = "#{opts.program_name} creates an #{WEBSERVER} config for a Rails app\n#{opts.banner}"
73
88
 
@@ -128,6 +143,11 @@ end
128
143
  "Name of private key to use CERTIFICATE"
129
144
  ) { |value| @certificate_key = value }
130
145
 
146
+ # Optional
147
+ opts.on("-i", "--ssl-cert-intermediate INTERMEDIATE_NAME",
148
+ "name of intermediate certificate"
149
+ ) { |value| @intermediate_cert = value }
150
+
131
151
  opts.on("-m", "--max-age MAX_AGE",
132
152
  "Number of seconds to keep static assets","in cache",
133
153
  "(default: #{@maxage})"
@@ -145,6 +165,8 @@ end
145
165
  if @certificate
146
166
  @certificate_file = certificate_file
147
167
  @key_file = key_file
168
+ # Intermediate is optional
169
+ @intermediate_cert = intermediate_cert_file if @intermediate_cert
148
170
  end
149
171
  end
150
172
 
metadata CHANGED
@@ -1,29 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightbox-server-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.5
4
+ version: 2.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Leach
8
8
  - Neil Wilson
9
9
  - David Smalley
10
+ - Caius Durling
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
14
 
14
- date: 2009-05-05 00:00:00 +01:00
15
+ date: 2010-01-26 00:00:00 +00:00
15
16
  default_executable:
16
17
  dependencies: []
17
18
 
18
19
  description:
19
20
  email: support@brightbox.co.uk
20
21
  executables:
21
- - railsapp-apache
22
- - railsapp-logrotate
23
- - railsapp-maintenance
24
- - railsapp-mongrel
25
22
  - railsapp-monit
23
+ - railsapp-maintenance
24
+ - railsapp-logrotate
26
25
  - railsapp-nginx
26
+ - railsapp-mongrel
27
+ - railsapp-apache
27
28
  extensions: []
28
29
 
29
30
  extra_rdoc_files: []
@@ -32,19 +33,19 @@ files:
32
33
  - LICENSE
33
34
  - Rakefile
34
35
  - brightbox-gemspec.rb
35
- - bin/railsapp-apache
36
- - bin/railsapp-logrotate
37
- - bin/railsapp-maintenance
38
- - bin/railsapp-mongrel
39
36
  - bin/railsapp-monit
37
+ - bin/railsapp-maintenance
38
+ - bin/railsapp-logrotate
40
39
  - bin/railsapp-nginx
40
+ - bin/railsapp-mongrel
41
+ - bin/railsapp-apache
41
42
  - lib/brightbox/maintenance.rb
42
- - lib/brightbox/passenger.rb
43
43
  - lib/brightbox/version.rb
44
44
  - lib/brightbox/webserver-common.rb
45
+ - lib/brightbox/passenger.rb
45
46
  - lib/brightbox/maintenance-site.tar.gz
46
- has_rdoc: false
47
- homepage: http://wiki.brightbox.co.uk/docs:thebrightboxgem
47
+ has_rdoc: true
48
+ homepage: http://wiki.brightbox.co.uk/docs:gemv2:start
48
49
  licenses: []
49
50
 
50
51
  post_install_message:
@@ -67,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
68
  requirements: []
68
69
 
69
70
  rubyforge_project: brightbox
70
- rubygems_version: 1.3.2
71
+ rubygems_version: 1.3.5
71
72
  signing_key:
72
73
  specification_version: 3
73
74
  summary: Brightbox Server configuration scripts