capistrano3-nginx 3.0.2 → 3.0.3

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: 1cd2f09a2acbfea4167a80f137e91199cbdda9f8
4
- data.tar.gz: 9055e6d59553634fcb90734cd90e93c9b652dc23
3
+ metadata.gz: 806b122408993b8313192cfe4a32b5a1df6bc856
4
+ data.tar.gz: 2bf7151b55702dc1066d9f9aba032eba0e35d3be
5
5
  SHA512:
6
- metadata.gz: 88058f112ad2a24121786bebee80ad1e58f66fb12e623d7a792d113f7f4457a6d2e01db6e1be24398b0fda6d335ff3bc3afb75dcc5219adcc0ff33e769a05d4c
7
- data.tar.gz: '0539201fc4de81f2dd393ecab942dc5e68ede5a25645cbaac57162f33d317f65efa161e9e1a33d5eb118bbdcec1a44aa552097e4dadb44838802a3cf7114d8c3'
6
+ metadata.gz: eac9680f431adfd8993e20144f1a89bdcdc91da0ecd4aed6aed42b59da6a9c5ee243e6266322f0bcb54cbc10fdec68708c0b03db582afc280570b0a3c3ab044e
7
+ data.tar.gz: 709a75d85ce8b08a77b536dad1e4e78cc18ccd791fb4c81ec8c1cd4c92d6036b0f0c89e95ad28005ba892485894c185d62ee6b8001c556e49dcb750cc75550f8
data/README.md CHANGED
@@ -5,7 +5,7 @@ Nginx support for Capistrano 3.x, with sudo password prompt
5
5
 
6
6
  Add this line to your application's Gemfile:
7
7
 
8
- gem 'capistrano3-nginx', '~> 3.0'
8
+ gem 'capistrano3-nginx', '~> 3.0.2'
9
9
 
10
10
 
11
11
  And then execute:
@@ -41,6 +41,10 @@ server 'example.com',
41
41
 
42
42
  You will get the following tasks
43
43
 
44
+ ```sh
45
+ cap -T | grep "cap nginx"
46
+ ```
47
+
44
48
  ```ruby
45
49
  cap nginx:start # Start nginx service
46
50
  cap nginx:stop # Stop nginx service
@@ -51,8 +55,12 @@ cap nginx:site:disable # Disables the site removing the symbolic lin
51
55
  cap nginx:site:enable # Enables the site creating a symbolic link into the enabled folder
52
56
  cap nginx:site:remove # Removes the site removing the configuration file from the available folder
53
57
  cap nginx:gzip_static # Compress all js and css files in :nginx_static_dir with gzip
58
+ cap nginx:configtest # Configtest nginx service
54
59
  ```
55
60
 
61
+
62
+
63
+
56
64
  Configurable options (copy into deploy.rb), shown here with examples:
57
65
 
58
66
  ```ruby
@@ -1,3 +1,3 @@
1
1
  module Capistrano
2
- NGINX_VERSION = '3.0.2'
2
+ NGINX_VERSION = '3.0.3'
3
3
  end
@@ -59,7 +59,9 @@ namespace :nginx do
59
59
  task :gzip_static => ['nginx:load_vars'] do
60
60
  on release_roles fetch(:nginx_roles) do
61
61
  within release_path do
62
- execute :find, "'#{fetch(:nginx_static_dir)}' -type f -name '*.js' -o -name '*.css' -exec gzip -v -9 -f -k {} \\;"
62
+ arguments = :find, "'#{fetch(:nginx_static_dir)}' -type f -name '*.js' -o -name '*.css' -exec gzip -v -9 -f -k {} \\;"
63
+ git_plugin.add_sudo_if_required arguments, :gzip_static
64
+ execute *arguments, interaction_handler: PasswdInteractionHandler.new
63
65
  end
64
66
  end
65
67
  end
@@ -71,13 +73,13 @@ namespace :nginx do
71
73
  within fetch(:sites_available) do
72
74
  config_file = fetch(:nginx_template)
73
75
  if config_file == :default
74
- config_file = File.expand_path('../../../../templates/nginx.conf.erb', __FILE__)
76
+ config_file = File.expand_path('../../../../templates/nginx.conf.erb', __FILE__)
75
77
  end
76
78
  config = ERB.new(File.read(config_file)).result(binding)
77
79
  upload! StringIO.new(config), '/tmp/nginx.conf'
78
80
  arguments = :mv, '/tmp/nginx.conf', fetch(:nginx_application_name)
79
81
  git_plugin.add_sudo_if_required arguments, 'nginx:sites:add', :nginx_sites_available_dir
80
- execute *arguments
82
+ execute *arguments, interaction_handler: PasswdInteractionHandler.new
81
83
  end
82
84
  end
83
85
  end
@@ -89,7 +91,7 @@ namespace :nginx do
89
91
  within fetch(:sites_enabled) do
90
92
  arguments = :ln, '-nfs', fetch(:available_application), fetch(:enabled_application)
91
93
  git_plugin.add_sudo_if_required arguments, 'nginx:sites:enable', :nginx_sites_enabled_dir
92
- execute *arguments
94
+ execute *arguments, interaction_handler: PasswdInteractionHandler.new
93
95
  end
94
96
  end
95
97
  end
@@ -102,7 +104,7 @@ namespace :nginx do
102
104
  within fetch(:sites_enabled) do
103
105
  arguments = :rm, '-f', fetch(:nginx_application_name)
104
106
  git_plugin.add_sudo_if_required arguments, 'nginx:sites:disable', :nginx_sites_enabled_dir
105
- execute *arguments
107
+ execute *arguments, interaction_handler: PasswdInteractionHandler.new
106
108
  end
107
109
  end
108
110
  end
@@ -115,7 +117,7 @@ namespace :nginx do
115
117
  within fetch(:sites_available) do
116
118
  arguments = :rm, fetch(:nginx_application_name)
117
119
  git_plugin.add_sudo_if_required arguments, 'nginx:sites:remove', :nginx_sites_available_dir
118
- execute *arguments
120
+ execute *arguments, interaction_handler: PasswdInteractionHandler.new
119
121
  end
120
122
  end
121
123
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-nginx
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Ignacio Donoso
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-25 00:00:00.000000000 Z
12
+ date: 2019-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano