nginxinator 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ namespace :nginxinator do
3
3
  desc 'Write example config files'
4
4
  task :write_example_configs do
5
5
  run_locally do
6
- execute "mkdir -p config/deploy templates/nginx/sites-enabled"
6
+ execute "mkdir", "-p", "config/deploy", "templates/nginx/sites-enabled"
7
7
  {
8
8
  'examples/Capfile' => 'Capfile_example',
9
9
  'examples/config/deploy.rb' => 'config/deploy_example.rb',
@@ -26,16 +26,16 @@ set :internal_conf_path, "/etc/nginx"
26
26
  set :internal_sites_enabled_path, "/etc/nginx/sites-enabled"
27
27
  set :internal_logs_path, "/var/log/nginx"
28
28
  set :internal_sock_path, "/var/run/unicorn"
29
- set :ssh_user, ENV["USER"]
29
+ set :ssh_user, -> { ENV["USER"] }
30
30
 
31
31
 
32
32
 
33
33
  ## The values below are not meant to be changed and shouldn't
34
34
  ## need to be under the majority of circumstances:
35
- set :nginx_container_name, "#{fetch(:domain)}-nginx-#{fetch(:publish_ports).collect { |p| p['external'] }.join('-')}"
36
- set :external_conf_path, "/#{fetch(:nginx_container_name)}-conf"
37
- set :external_sites_enabled_path, "#{fetch(:external_conf_path)}/sites-enabled"
38
- set :external_sock_path, "#{fetch(:external_conf_path)}/run"
35
+ set :nginx_container_name, -> { "#{fetch(:domain)}-nginx-#{fetch(:publish_ports).collect { |p| p['external'] }.join('-')}" }
36
+ set :external_conf_path, -> { "/#{fetch(:nginx_container_name)}-conf" }
37
+ set :external_sites_enabled_path, -> { "#{fetch(:external_conf_path)}/sites-enabled" }
38
+ set :external_sock_path, -> { "#{fetch(:external_conf_path)}/run" }
39
39
  set :ports_options, -> {
40
40
  options = []
41
41
  fetch(:publish_ports).each do |port_set|
@@ -114,8 +114,8 @@ namespace :nginx do
114
114
  as 'root' do
115
115
  execute("mkdir", "-p", args.config_path) unless test("test", "-d", args.config_path)
116
116
  generated_config_file = nginx_generate_config_file("#{args.template_path}/#{args.config_file}.erb")
117
- upload! StringIO.new(generated_config_file), "/tmp/#{args.config_file}"
118
- execute("mv", "/tmp/#{args.config_file}", "#{args.config_path}/#{args.config_file}")
117
+ upload! StringIO.new(generated_config_file), "/tmp/#{args.config_file}.file"
118
+ execute("mv", "/tmp/#{args.config_file}.file", "#{args.config_path}/#{args.config_file}")
119
119
  execute("chown", "-R", "root:root", args.config_path)
120
120
  execute("chmod", "-R", "700", args.config_path)
121
121
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nginxinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-10 00:00:00.000000000 Z
12
+ date: 2014-11-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano