capistrano3-nginx 2.1.2 → 2.1.3

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: 9316c106530f6bc76e2a5773e5c2ba4011d5e673
4
- data.tar.gz: 729b6b5a88fbff7200acb05c879103d543cdb848
3
+ metadata.gz: 4f6e7d1368a04ff2f7d4fe12d7f4039ddc3ef016
4
+ data.tar.gz: 08f71ee4dbe9d161ed1f701359af32a1cd144013
5
5
  SHA512:
6
- metadata.gz: 8edc74c79f72b672e86e97a3226810d2a121571880e4182cca1000640035d920ebd8838b29cb108ae38d48a34ed0feb521d5f7b80433da3fb104a3a8d3ece0e9
7
- data.tar.gz: 3348c0adc01760d9ecf994d485a8adaa7df9efb17b11f70f9a0625f7a010d85a0a19de9cc4b115501a128d36d6fa1ab1bd4a08ebd3a040237d0e750dea4a33d4
6
+ metadata.gz: 6c2fcaf7da40ce09f14f5f00133fc28ea9b2298399b004bf06febd4c85b54d0466bfd764c66c65832abbb2beb33ba0be64b9a6c42896246cf452130915c43b4a
7
+ data.tar.gz: fb425faaa2b1c1c9d7e52c5d96eb15f7a485330ae09e0800a6b84a72030c0c0de7faaa446694545f584ced32767ad7769090459f21241f2803ef9246117de6c5
data/README.md CHANGED
@@ -75,21 +75,21 @@ set :nginx_roles, :web
75
75
  # default value: "#{shared_path}/log"
76
76
  # set :nginx_log_path, "#{shared_path}/log"
77
77
 
78
- # Path where nginx is installed
79
- # default value: "/etc/nginx"
80
- set :nginx_root_path, "/etc/nginx"
81
-
82
78
  # Path where to look for static files
83
79
  # default value: "public"
84
80
  set :nginx_static_dir, "my_static_folder"
85
81
 
86
82
  # Path where nginx available site are stored
87
- # default value: "sites-available"
88
- set :nginx_sites_available_dir, "sites-available"
83
+ # default value: "/etc/nginx/sites-available"
84
+ set :nginx_sites_available_dir, "/opt/nginx/sites-available"
85
+
86
+ # Name of file stored in site-enabled/available
87
+ # default value: "#{fetch :application}"
88
+ set :nginx_application_name, "#{fetch :application}-#{fetch :stage}"
89
89
 
90
90
  # Path where nginx available site are stored
91
- # default value: "sites-enabled"
92
- set :nginx_sites_enabled_dir, "sites-enabled"
91
+ # default value: "/etc/nginx/sites-enabled"
92
+ set :nginx_sites_enabled_dir, "/opt/nginx/sites-enabled"
93
93
 
94
94
  # Path to look for custom config template
95
95
  # `:default` will use the bundled nginx template
@@ -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.1.2'
7
+ spec.version = '2.1.3'
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}
@@ -3,11 +3,11 @@ namespace :load do
3
3
  set :nginx_sudo_paths, -> { [:nginx_log_path, :nginx_sites_enabled_dir, :nginx_sites_available_dir] }
4
4
  set :nginx_sudo_tasks, -> { ['nginx:start', 'nginx:stop', 'nginx:restart', 'nginx:reload', 'nginx:configtest', 'nginx:site:add', 'nginx:site:disable', 'nginx:site:enable', 'nginx:site:remove' ] }
5
5
  set :nginx_log_path, -> { "#{shared_path}/log" }
6
- set :nginx_root_path, -> { "/etc/nginx" }
7
6
  set :nginx_service_path, -> { 'service nginx' }
8
7
  set :nginx_static_dir, -> { "public" }
9
- set :nginx_sites_enabled_dir, -> { "sites-enabled" }
10
- set :nginx_sites_available_dir, -> { "sites-available" }
8
+ set :nginx_application_name, -> { fetch(:application) }
9
+ set :nginx_sites_enabled_dir, -> { "/etc/nginx/sites-enabled" }
10
+ set :nginx_sites_available_dir, -> { "/etc/nginx/sites-available" }
11
11
  set :nginx_roles, -> { :web }
12
12
  set :nginx_template, -> { :default }
13
13
  set :nginx_use_ssl, -> { false }
@@ -42,10 +42,10 @@ namespace :nginx do
42
42
  end
43
43
 
44
44
  task :load_vars do
45
- set :sites_available, -> { File.join(fetch(:nginx_root_path), fetch(:nginx_sites_available_dir)) }
46
- set :sites_enabled, -> { File.join(fetch(:nginx_root_path), fetch(:nginx_sites_enabled_dir)) }
47
- set :enabled_application, -> { File.join(fetch(:sites_enabled), fetch(:application)) }
48
- set :available_application, -> { File.join(fetch(:sites_available), fetch(:application)) }
45
+ set :sites_available, -> { fetch(:nginx_sites_available_dir) }
46
+ set :sites_enabled, -> { fetch(:nginx_sites_enabled_dir) }
47
+ set :enabled_application, -> { File.join(fetch(:sites_enabled), fetch(:nginx_application_name)) }
48
+ set :available_application, -> { File.join(fetch(:sites_available), fetch(:nginx_application_name)) }
49
49
  end
50
50
 
51
51
  # validate_sudo_settings
@@ -108,7 +108,7 @@ namespace :nginx do
108
108
  end
109
109
  config = ERB.new(File.read(config_file)).result(binding)
110
110
  upload! StringIO.new(config), '/tmp/nginx.conf'
111
- arguments = :mv, '/tmp/nginx.conf', fetch(:application)
111
+ arguments = :mv, '/tmp/nginx.conf', fetch(:nginx_application_name)
112
112
  add_sudo_if_required arguments, 'nginx:sites:add', :nginx_sites_available_dir
113
113
  execute *arguments
114
114
  end
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.1.2
4
+ version: 2.1.3
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-06-24 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.4.6
79
+ rubygems_version: 2.4.8
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Adds suuport to nginx for Capistrano 3.x