crossroads_capistrano 1.4.35 → 1.4.36
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.
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "crossroads_capistrano"
|
|
6
|
-
s.version = "1.4.
|
|
6
|
+
s.version = "1.4.36"
|
|
7
7
|
s.platform = Gem::Platform::RUBY
|
|
8
8
|
s.authors = ["Steve Kenworthy", "Ben Tillman", "Nathan Broadbent"]
|
|
9
9
|
s.email = ["it_dept@crossroads.org.hk"]
|
|
@@ -10,7 +10,7 @@ load File.join(File.dirname(__FILE__), "config.rb")
|
|
|
10
10
|
|
|
11
11
|
# Settings
|
|
12
12
|
# ---------------------------------------------------------
|
|
13
|
-
set :default_stage, "
|
|
13
|
+
set :default_stage, "staging"
|
|
14
14
|
set :rails_env, "production"
|
|
15
15
|
|
|
16
16
|
set :scm, :git
|
|
@@ -33,7 +33,7 @@ def needs_ssh_key?; repository.include?("github.com"); end
|
|
|
33
33
|
|
|
34
34
|
# Hooks
|
|
35
35
|
# ---------------------------------------------------------
|
|
36
|
-
|
|
36
|
+
after "deploy:update_code", "deploy:symlink_config"
|
|
37
37
|
after "deploy:restart", "deploy:cleanup"
|
|
38
38
|
|
|
39
39
|
# Deployment tasks that need an after hook to notify hoptoad/newrelic/etc.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Capistrano recipe to generate a self-signed ssl certificate
|
|
3
|
+
#
|
|
4
|
+
# Requires :site_domain_name be defined.
|
|
5
|
+
#
|
|
6
|
+
# It also "sets us up the bomb"
|
|
7
|
+
#
|
|
8
|
+
|
|
9
|
+
require File.join(File.dirname(__FILE__), 'yum.rb')
|
|
10
|
+
|
|
11
|
+
namespace :ssl do
|
|
12
|
+
|
|
13
|
+
desc "Generates a self-signed ssl certificate."
|
|
14
|
+
task :generate do
|
|
15
|
+
install_deps
|
|
16
|
+
sudo "openssl genrsa -out /etc/pki/tls/private/#{site_domain_name}.key 2048"
|
|
17
|
+
sudo "chown root:root /etc/pki/tls/private/#{site_domain_name}.key && chmod 640 /etc/pki/tls/private/#{site_domain_name}.key"
|
|
18
|
+
sudo "openssl req -batch -new -key /etc/pki/tls/private/#{site_domain_name}.key -out /etc/pki/tls/certs/#{site_domain_name}.csr"
|
|
19
|
+
sudo "openssl x509 -req -days 365 -in /etc/pki/tls/certs/#{site_domain_name}.csr -signkey /etc/pki/tls/private/#{site_domain_name}.key -out /etc/pki/tls/certs/#{site_domain_name}.crt"
|
|
20
|
+
sudo "rm -f /etc/pki/tls/certs/#{site_domain_name}.csr"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
task :install_deps do
|
|
24
|
+
yum.install( {:base => %w(openssl openssl-devel)}, :stable )
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: crossroads_capistrano
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 79
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 4
|
|
9
|
-
-
|
|
10
|
-
version: 1.4.
|
|
9
|
+
- 36
|
|
10
|
+
version: 1.4.36
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Steve Kenworthy
|
|
@@ -17,7 +17,7 @@ autorequire:
|
|
|
17
17
|
bindir: bin
|
|
18
18
|
cert_chain: []
|
|
19
19
|
|
|
20
|
-
date: 2011-
|
|
20
|
+
date: 2011-09-03 00:00:00 Z
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|
|
23
23
|
name: capistrano
|
|
@@ -115,6 +115,7 @@ files:
|
|
|
115
115
|
- lib/crossroads_capistrano/recipes/postgresql.rb
|
|
116
116
|
- lib/crossroads_capistrano/recipes/revisions.rb
|
|
117
117
|
- lib/crossroads_capistrano/recipes/rvm.rb
|
|
118
|
+
- lib/crossroads_capistrano/recipes/ssl.rb
|
|
118
119
|
- lib/crossroads_capistrano/recipes/stack.rb
|
|
119
120
|
- lib/crossroads_capistrano/recipes/thinking_sphinx.rb
|
|
120
121
|
- lib/crossroads_capistrano/recipes/user_permissions.rb
|