dark-capistrano-recipes 0.6.8 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 8
3
- :major: 0
4
- :build:
5
2
  :minor: 6
3
+ :build:
4
+ :patch: 9
5
+ :major: 0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dark-capistrano-recipes}
8
- s.version = "0.6.8"
8
+ s.version = "0.6.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Phil Misiowiec", "Leonardo Bighetti"]
12
- s.date = %q{2010-09-23}
12
+ s.date = %q{2010-10-01}
13
13
  s.description = %q{Extend the Capistrano gem with these useful recipes}
14
14
  s.email = %q{leonardobighetti@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -1,10 +1,15 @@
1
+ <% if is_using_unicorn %>
1
2
  upstream <%= application %>_app_server {
2
3
  server unix:<%= unicorn_socket %> fail_timeout=0;
3
4
  }
5
+ <% end %>
4
6
  # <%= application %> Server
5
7
  server {
6
8
  listen <%= application_port %>;
7
-
9
+ <% if is_using_passenger %>
10
+ rails_env <%= rails_env %>;
11
+ passenger_enabled on;
12
+ <% end %>
8
13
  client_max_body_size 500M;
9
14
  server_name <%= application %>;
10
15
 
@@ -71,15 +76,20 @@
71
76
  }
72
77
  }
73
78
  <% if application_uses_ssl %>
79
+ <% if is_using_unicorn %>
74
80
  upstream <%= application %>_app_ssl {
75
81
  server unix:<%= unicorn_socket %> fail_timeout=0;
76
82
  }
83
+ <% end %>
77
84
  # This server is setup for ssl. Uncomment if
78
85
  # you are using ssl as well as port 80.
79
86
  server {
80
87
  listen <%= application_port_ssl%>;
81
88
  server_name <%= application %>;
82
-
89
+ <% if is_using_passenger %>
90
+ rails_env <%= rails_env %>;
91
+ passenger_enabled on;
92
+ <% end %>
83
93
  ssl on;
84
94
  ssl_certificate /etc/ssl/certs/server.crt;
85
95
  ssl_certificate_key /etc/ssl/private/server.key;
data/lib/helpers.rb CHANGED
@@ -20,6 +20,10 @@ def is_using_nginx
20
20
  is_using('nginx',:web_server)
21
21
  end
22
22
 
23
+ def is_using_passenger
24
+ is_using('passenger',:server)
25
+ end
26
+
23
27
  def is_using_unicorn
24
28
  is_using('unicorn',:server)
25
29
  end
data/lib/recipes/god.rb CHANGED
@@ -14,7 +14,7 @@ Capistrano::Configuration.instance(:must_exist).load do
14
14
  end
15
15
 
16
16
  _cset(:bin_god) { defined?(:rvm_ruby_string) ? 'bootup_god' : 'god' }
17
- _cset(:server_name) { "#{application}-unicorn" }
17
+ _cset(:server_name) { "#{application}-#{server}" }
18
18
  _cset(:god_init_local) { "#{docs_path}/god/god.init" }
19
19
  _cset :god_init_temp, '/tmp/god.init'
20
20
  _cset :god_init_remote, '/etc/init.d/god'
@@ -110,5 +110,7 @@ Capistrano::Configuration.instance(:must_exist).load do
110
110
  sudo "#{bin_god} status"
111
111
  end
112
112
  end
113
- after 'deploy:setup', 'god:setup' if is_using_god
113
+ after 'deploy:setup' do
114
+ god.setup if is_using_god && Capistrano::CLI.ui.agree("Create app.god in app's shared path? [Yn]")
115
+ end
114
116
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dark-capistrano-recipes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 8
10
- version: 0.6.8
9
+ - 9
10
+ version: 0.6.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Phil Misiowiec
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-09-23 00:00:00 -03:00
19
+ date: 2010-10-01 00:00:00 -03:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency