capistrano3-nginx 2.0.5 → 2.0.6

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: 7b4ac0f162c3e1b7494a00fde9943c3fdb9bc589
4
- data.tar.gz: 956305eadf4ab3a78951d3ffb336423856bf243c
3
+ metadata.gz: c867ad6d037e01770064576c6e85a70aeff7318c
4
+ data.tar.gz: 6b90862beb0df8cab615861a877651dd47ae8c31
5
5
  SHA512:
6
- metadata.gz: 42d85f90f1357f154c846ca109f5b53896bd07fc0248f8319281b65cf37381a3a83132c60cf1822667aca5b4ad4e46d26c331d78e397bc2dd8746a719368a4b9
7
- data.tar.gz: 0e072b72e70e96a9bab437d3bac7a571e27be73aa93ca1b473b9bbe370052e71c4121529c3b7f4011fec992432130bdcefa31a9853519c998f6dc12cb87556da
6
+ metadata.gz: c87428ca45ff2e91aca9f4823a04582eaf2c53b767918dcc7bbb900d32f46083d99499b204adb3c3f669263d83b374ed11de9d99445153a7802669500f269e15
7
+ data.tar.gz: 057185608ba4a7e5e37471c92d72a9a0a334e0c9805d09fe38b7bc02334e29320429180a882368c565689e93f574fd73758e216f694b89a30756e69c399d94aa
data/README.md CHANGED
@@ -42,9 +42,13 @@ cap nginx:gzip_static # Compress all js and css files in :nginx_sta
42
42
  Configurable options (copy into deploy.rb), shown here with examples:
43
43
 
44
44
  ```ruby
45
- # Server name for nginx
46
- # No default vaue
47
- set :nginx_domains, "foo.bar.com"
45
+ # Server name for nginx, space separated values
46
+ # No default value
47
+ set :nginx_domains, "foo.bar.com foo.other.com"
48
+
49
+ # Redirected domains, all these will have a permanent redirect to the first of :nginx_domains
50
+ # No default value
51
+ set :nginx_redirected_domains, "bar.com other.com"
48
52
 
49
53
  # Sudo usage can be enables on task and/or path level.
50
54
  # If sudo is enabled for a specific task (i.e. 'nginx:site:add') every
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'capistrano3-nginx'
7
- spec.version = '2.0.5'
7
+ spec.version = '2.0.6'
8
8
  spec.authors = ['Juan Ignacio Donoso']
9
9
  spec.email = ['jidonoso@gmail.com']
10
10
  spec.description = %q{Adds suuport to nginx for Capistrano 3.x}
@@ -11,6 +11,14 @@ upstream <%= fetch(:application) %>-app-server {
11
11
 
12
12
  # HTTP Server
13
13
 
14
+ <% if fetch(:nginx_redirected_domains) %>
15
+ server {
16
+ listen 80;
17
+ server_name <%= fetch(:nginx_redirected_domains) %>;
18
+ rewrite ^(.*) http://<%= fetch(:nginx_domains).gsub(/\s.*/,'') %> permanent;
19
+ }
20
+ <% end %>
21
+
14
22
  <% if fetch(:nginx_use_ssl) %>
15
23
  server {
16
24
  listen 80;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-nginx
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Ignacio Donoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-08 00:00:00.000000000 Z
11
+ date: 2015-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano