capistrano3-unicorn-nginx 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 822fb6189bd5e45ea0109dcc69f9291b89ddfb46
|
4
|
+
data.tar.gz: 41ddcf88bf99358359c904eb7983c873f20ba9b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecbf2a903a8a372f14edad78e3b61a145831955749544573d808449c05f435715582b7ef3db9add16063ada57ff7189f902c265a5c7ab3cd5ae544cff0e18206
|
7
|
+
data.tar.gz: 6be3e727b1565c3ce8d8d06b9d6f192dd23177c2ee5c5b253fa392c36d6aeddde80e0c1b9fa08caaba29eb9250a6f953cc6b34bc21adb9e670706018b87407a0
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'capistrano3-unicorn-nginx'
|
7
|
-
s.version = '0.0.
|
7
|
+
s.version = '0.0.2'
|
8
8
|
s.date = '2019-02-01'
|
9
9
|
s.summary = "Capistrano tasks for automatic and sensible unicorn configuration"
|
10
10
|
s.description = <<-EOF.gsub(/^\s+/, '')
|
@@ -118,7 +118,7 @@ namespace :unicorn do
|
|
118
118
|
end
|
119
119
|
|
120
120
|
desc "Unicorn generate config file"
|
121
|
-
task :
|
121
|
+
task :setup do
|
122
122
|
on roles(fetch(:unicorn_roles)) do
|
123
123
|
execute(:mkdir, '-pv', File.dirname(fetch(:unicorn_config_path))) unless file_exists?(fetch(:unicorn_config_file))
|
124
124
|
upload! template('unicorn.rb.erb'), fetch(:unicorn_config_path)
|
@@ -3,6 +3,15 @@ require "erb"
|
|
3
3
|
module Capistrano3
|
4
4
|
module UnicornNginx
|
5
5
|
module Helpers
|
6
|
+
def template template_name
|
7
|
+
StringIO.new(template_to_s(template_name))
|
8
|
+
end
|
9
|
+
|
10
|
+
def template_to_s template_name
|
11
|
+
config_file = File.join(File.dirname(__FILE__), "../../generators/capistrano/simple_unicorn/templates/#{template_name}")
|
12
|
+
ERB.new(File.read(config_file), nil, '-').result(binding)
|
13
|
+
end
|
14
|
+
|
6
15
|
def sudo_upload!(from, to)
|
7
16
|
filename = File.basename(to)
|
8
17
|
to_dir = File.dirname(to)
|