brightbox-server-tools 2.3.6 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
data/bin/railsapp-apache CHANGED
@@ -40,7 +40,6 @@ def standard_server_contents
40
40
  DocumentRoot #{@webroot}
41
41
  #{rails_env_if_passenger}
42
42
  <Directory "#{@webroot}">
43
- Header set Cache-Control "max-age=#{@maxage}"
44
43
  Options FollowSymLinks
45
44
  AllowOverride None
46
45
  Order allow,deny
@@ -57,6 +56,11 @@ def standard_server_contents
57
56
  # Rails specific rewrite rules
58
57
  RewriteEngine On
59
58
 
59
+ # Set cache-control header for static assets
60
+ RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -f
61
+ RewriteRule "^.*$" "$0" [L,E=CACHE:True]
62
+ Header onsuccess set "Cache-Control" "max-age=#{@maxage}" env=CACHE
63
+
60
64
  # Check for maintenance file and redirect all requests
61
65
  ErrorDocument 503 /system/maintenance.html
62
66
  RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
@@ -112,6 +116,7 @@ end
112
116
  def rails_env_if_passenger
113
117
  if @passenger && @rails_env
114
118
  %Q{RailsEnv #{@rails_env}}
119
+ %Q{RackEnv #{@rails_env}}
115
120
  end
116
121
  end
117
122
 
@@ -145,15 +150,16 @@ def https_config
145
150
  end
146
151
 
147
152
  def apt_update
148
- system %Q{sudo apt-get update}
153
+ puts "Running apt-get update"
154
+ system %Q{sudo apt-get update -qy >/dev/null}
149
155
  end
150
156
 
151
157
  def install_ree
152
- system %Q{sudo apt-get install libruby1.8 --assume-yes}
158
+ system %Q{sudo apt-get install -qy libruby1.8 >/dev/null}
153
159
  end
154
160
 
155
161
  def install_passenger
156
- system %Q{sudo apt-get install libapache2-mod-passenger --assume-yes}
162
+ system %Q{sudo apt-get install -qy libapache2-mod-passenger >/dev/null}
157
163
  end
158
164
 
159
165
  def brightbox_passenger_install
@@ -1,5 +1,5 @@
1
1
  module Brightbox
2
- VERSION = "2.3.6"
2
+ VERSION = "2.3.7"
3
3
  end
4
4
  # Set global scope version so that OptionParser picks it up.
5
5
  ::Version = Brightbox::VERSION
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightbox-server-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.6
4
+ hash: 13
5
+ prerelease: false
6
+ segments:
7
+ - 2
8
+ - 3
9
+ - 7
10
+ version: 2.3.7
5
11
  platform: ruby
6
12
  authors:
7
13
  - John Leach
@@ -12,37 +18,49 @@ autorequire:
12
18
  bindir: bin
13
19
  cert_chain: []
14
20
 
15
- date: 2010-01-26 00:00:00 +00:00
21
+ date: 2010-09-07 00:00:00 +01:00
16
22
  default_executable:
17
- dependencies: []
18
-
23
+ dependencies:
24
+ - !ruby/object:Gem::Dependency
25
+ name: bundler
26
+ prerelease: false
27
+ requirement: &id001 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ hash: 15
33
+ segments:
34
+ - 1
35
+ - 0
36
+ version: "1.0"
37
+ type: :runtime
38
+ version_requirements: *id001
19
39
  description:
20
40
  email: support@brightbox.co.uk
21
41
  executables:
22
- - railsapp-monit
23
- - railsapp-maintenance
42
+ - railsapp-apache
24
43
  - railsapp-logrotate
44
+ - railsapp-monit
25
45
  - railsapp-nginx
26
46
  - railsapp-mongrel
27
- - railsapp-apache
47
+ - railsapp-maintenance
28
48
  extensions: []
29
49
 
30
50
  extra_rdoc_files: []
31
51
 
32
52
  files:
33
53
  - LICENSE
34
- - Rakefile
35
- - brightbox-gemspec.rb
36
- - bin/railsapp-monit
37
- - bin/railsapp-maintenance
54
+ - bin/railsapp-apache
38
55
  - bin/railsapp-logrotate
56
+ - bin/railsapp-monit
39
57
  - bin/railsapp-nginx
40
58
  - bin/railsapp-mongrel
41
- - bin/railsapp-apache
42
- - lib/brightbox/maintenance.rb
59
+ - bin/railsapp-maintenance
43
60
  - lib/brightbox/version.rb
44
- - lib/brightbox/webserver-common.rb
45
61
  - lib/brightbox/passenger.rb
62
+ - lib/brightbox/maintenance.rb
63
+ - lib/brightbox/webserver-common.rb
46
64
  - lib/brightbox/maintenance-site.tar.gz
47
65
  has_rdoc: true
48
66
  homepage: http://wiki.brightbox.co.uk/docs:gemv2:start
@@ -54,21 +72,27 @@ rdoc_options: []
54
72
  require_paths:
55
73
  - lib
56
74
  required_ruby_version: !ruby/object:Gem::Requirement
75
+ none: false
57
76
  requirements:
58
77
  - - ">="
59
78
  - !ruby/object:Gem::Version
79
+ hash: 3
80
+ segments:
81
+ - 0
60
82
  version: "0"
61
- version:
62
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
+ none: false
63
85
  requirements:
64
86
  - - ">="
65
87
  - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
66
91
  version: "0"
67
- version:
68
92
  requirements: []
69
93
 
70
94
  rubyforge_project: brightbox
71
- rubygems_version: 1.3.5
95
+ rubygems_version: 1.3.7
72
96
  signing_key:
73
97
  specification_version: 3
74
98
  summary: Brightbox Server configuration scripts
data/Rakefile DELETED
@@ -1,28 +0,0 @@
1
- require 'rake/gempackagetask'
2
- require "brightbox-gemspec.rb"
3
-
4
- namespace :client do
5
- Rake::GemPackageTask.new(@client).define
6
-
7
- task :default => [:reinstall, :clobber_package]
8
-
9
- desc "Reinstall the client gem locally"
10
- task :reinstall => [:repackage] do
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}
18
- end
19
-
20
- end
21
-
22
- namespace :server do
23
- Rake::GemPackageTask.new(@server).define
24
- end
25
-
26
- task :clobber_package => "client:clobber_package"
27
- task :package => ["client:package", "server:package"]
28
- task :repackage => ["client:repackage", "server:package"]
data/brightbox-gemspec.rb DELETED
@@ -1,46 +0,0 @@
1
- # Brightbox - Easy Ruby Web Application Deployment
2
- # Copyright (C) 2008, Neil Wilson, Brightbox Systems
3
- #
4
- # This file is part of the Brightbox deployment system
5
- #
6
- # Brightbox gem is free software: you can redistribute it and/or modify it
7
- # under the terms of the GNU Affero General Public License as published
8
- # by the Free Software Foundation, either version 3 of the License,
9
- # or (at your option) any later version.
10
- #
11
- # This program is distributed in the hope that it will be useful,
12
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- # Affero General Public License for more details.
15
- #
16
- # You should have received a copy of the GNU Affero General
17
- # Public License along with this program. If not, see
18
- # <http://www.gnu.org/licenses/>.
19
- #
20
- require File.join(File.dirname(__FILE__),"lib/brightbox/version")
21
- def add_common(spec)
22
- spec.version = Brightbox::VERSION
23
- spec.authors = ["John Leach","Neil Wilson","David Smalley", "Caius Durling"]
24
- spec.email = "support@brightbox.co.uk"
25
- spec.homepage = "http://wiki.brightbox.co.uk/docs:gemv2:start"
26
- spec.rubyforge_project = 'brightbox'
27
- spec.has_rdoc = false
28
- end
29
-
30
- @server = Gem::Specification.new do |s|
31
- add_common(s)
32
- s.name = "brightbox-server-tools"
33
- s.files = FileList["LICENSE", "Rakefile", "*.rb", "bin/railsapp-*","lib/**/*.{rb,gz}"].exclude(/recipe/).to_a
34
- s.summary = "Brightbox Server configuration scripts"
35
- s.executables = FileList["bin/railsapp-*"].sub(/bin\//,'')
36
- end
37
-
38
- @client = Gem::Specification.new do |s|
39
- add_common(s)
40
- s.name = "brightbox"
41
- s.files = FileList["LICENSE", "Rakefile", "*.rb", "lib/**/*.rb","bin/brightbox"].exclude("lib/brightbox/webserver-common.rb").to_a
42
- s.add_dependency("capistrano", ">= 2.5")
43
- s.summary = "Brightbox rails deployment scripts for Capistrano"
44
- s.executable = 'brightbox'
45
- end
46
-