capistrano_deploy_generator 0.0.2 → 0.0.4
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8942e067c319902b187e20da57688c1d07ec4cc4
|
4
|
+
data.tar.gz: 77636f7fa4c53a592c3045774a282d1eed69b680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 167a1a2dc91b55bdb89376d888f4eba4b8d3b742a598f9da8f934fe9c8c65cbb27837551df37c258cf0d479aee0e8c2a5a08e704c50d535e1b4b951e7bee6263
|
7
|
+
data.tar.gz: febe42cdfbfb2f288c00b68ff000dbe090e722d1230cb27efd47445ca627a4305d744b5953d5854eef68f6903862efefae6ba3f4b6e7d7d22f841c609873d55c
|
@@ -21,6 +21,18 @@ class CapistranoDeployGenerator < Rails::Generators::NamedBase
|
|
21
21
|
|
22
22
|
private
|
23
23
|
|
24
|
+
def select_asset_precompile
|
25
|
+
files = Dir.glob("./config/deploy/recipes/asset**rb").map { |x| File.basename(x, ".rb") }
|
26
|
+
loop do
|
27
|
+
choose do |menu|
|
28
|
+
menu.readline = true
|
29
|
+
menu.header = "Which asset precompile recipe to use: "
|
30
|
+
menu.choices(*files) { |f| return f }
|
31
|
+
menu.choice("Help") { puts File.read "./config/deploy/recipes/README.assets_precompile.md"}
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
24
36
|
def capify
|
25
37
|
template "Capfile"
|
26
38
|
end
|
@@ -116,6 +128,9 @@ EOF
|
|
116
128
|
|
117
129
|
|
118
130
|
# Select version for :rvm_ruby_string
|
131
|
+
#
|
132
|
+
# Read `rvm list` and set as default rvm version that is current
|
133
|
+
# now.
|
119
134
|
def ruby_version
|
120
135
|
default = %x{ rvm current}.strip
|
121
136
|
items = %x{ rvm ls strings }.split.compact
|
@@ -21,7 +21,7 @@ set :rails_env, 'production'
|
|
21
21
|
}-%>
|
22
22
|
set :user, '<%= ask_default "User to deploy as: ", 'ubuntu' %>'
|
23
23
|
set :use_sudo, <%= agree_default "Use sudo for deployment? " , :yes %>
|
24
|
-
set :deploy_to, "<%= ask_default "Deploy directory: ", '/home/#{user}/#{application}' %>"
|
24
|
+
set :deploy_to, "<%= ask_default "Deploy directory: ", '/home/#{user}/apps/#{application}' %>"
|
25
25
|
set :keep_releases, <%= ask("Number of rollback releases : ", Integer) { |q| q.in = 1..30; q.default = 5 } %>
|
26
26
|
|
27
27
|
set :web_domain, "#{application}.com"
|
@@ -61,6 +61,8 @@ set :default_stage, '<%= x[:default] %>'
|
|
61
61
|
<%= File.read "#{CapistranoDeployGenerator.source_root}/#{@scm}.tpl" -%>
|
62
62
|
<% if @scm =~ /git/ -%>
|
63
63
|
set :repository, "<%= git_remote %>"
|
64
|
+
set :deploy_via, :<%= menu_with_default "Deploy strategy:", %w(remote_cache copy), :remote_cache -%>
|
65
|
+
set :git_enable_submodules, 1
|
64
66
|
<% end -%>
|
65
67
|
|
66
68
|
|
@@ -86,12 +88,20 @@ set :production_password, ""
|
|
86
88
|
|
87
89
|
<%= comment_block %Q{
|
88
90
|
|
91
|
+
# --------------------------------------------
|
92
|
+
# Asset precompile configuration
|
93
|
+
# --------------------------------------------
|
94
|
+
}-%>
|
95
|
+
<%= recipe select_asset_precompile -%>
|
96
|
+
|
97
|
+
<%= comment_block %Q{
|
98
|
+
|
89
99
|
# --------------------------------------------
|
90
100
|
# Web server configuration
|
91
101
|
# --------------------------------------------
|
92
102
|
|
93
103
|
}-%>
|
94
|
-
|
104
|
+
set :domain_name, <%= ask_default "Domain name for web server configuration : ", application %>
|
95
105
|
<%
|
96
106
|
case menu_with_default "Production uses Unicorn server. Which webserver to use with it?",
|
97
107
|
['nginx', 'apache'],
|
@@ -118,6 +128,7 @@ set :unicorn_workers, <%= ask("Number of Unicorn workers : ", Integer) { |q| q.i
|
|
118
128
|
# Common tasks
|
119
129
|
# --------------------------------------------
|
120
130
|
}-%>
|
131
|
+
<%= recipe 'setup' %>
|
121
132
|
task :setup do
|
122
133
|
top.deploy.setup
|
123
134
|
top.unicorn.setup
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano_deploy_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmytro Kovalov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|