capistrano-unformatt 1.5 → 1.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: c2918452e86a76b981eb3cafadc8fa96c27790f9
4
- data.tar.gz: 502276582f9866f6ae6b3d0e0ba8f510157a0b4d
3
+ metadata.gz: 5202bff3be5601c4adbefe63f822118d36fe4487
4
+ data.tar.gz: 41f6ab7d6abdd62a04d03112fc9846e11a6f2690
5
5
  SHA512:
6
- metadata.gz: ce7c77db67e8cacd38f6a4553b3fad6f81e2dbbb7e81734fb4df375501fcb41f2a5f5e0245a24f1eb3bd7c6381c6370fb0ad74a3469b83eee6ddd0dea106a7b7
7
- data.tar.gz: 7816fa073c0d5fda5ed658c51404d5716ccd3c07e61c039556982b9eeb17ebd77c09f3177d22c737552a5a637b7cf3cd00661f362e12ff73884c6bb16d6c9080
6
+ metadata.gz: 7bc83f3da390b43987c1ed07843e3f3804b04e7936b71d79bc8a851d1b69e46c5a616c5cb32b1ac6f23dbf058b9920010472cd0a4d3b140f2594d1d5ace95719
7
+ data.tar.gz: 81f415e17d0c3de5351f7f380419b706c1dae16fc09698604756048918cba777a2dc2e4211d50681b6d2857ba1c741c1a77b15419c155457b45756a1dbdb46dc
data/CHANGELOG.md CHANGED
@@ -45,3 +45,7 @@
45
45
  ## v1.5
46
46
 
47
47
  * Changes on sidekiq method to reject new jobs
48
+
49
+ ## v1.6
50
+
51
+ * Added options on setup to skip some configurations
@@ -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 = "capistrano-unformatt"
7
- spec.version = '1.5'
7
+ spec.version = '1.6'
8
8
  spec.authors = ["unformatt"]
9
9
  spec.email = ["unformatt@gmail.com"]
10
10
  spec.description = "Custom recipes for Unformatt projects"
@@ -7,32 +7,38 @@ namespace :deploy do
7
7
  # yaml files
8
8
  execute "mkdir -p #{shared_path}/{config,tmp}"
9
9
 
10
- fetch(:setup_yamls, []).each do |yaml|
11
- template "#{yaml}.yml.erb", "#{shared_path}/config/#{yaml}.yml"
10
+ unless ENV['SKIP_YAML'] == 'true'
11
+ fetch(:setup_yamls, []).each do |yaml|
12
+ template "#{yaml}.yml.erb", "#{shared_path}/config/#{yaml}.yml"
13
+ end
12
14
  end
13
15
 
14
- fetch(:setup_daemons, []).each do |daemon|
15
- if daemon[:config] == true
16
- template "#{daemon[:name]}.rb.erb", "#{shared_path}/config/#{daemon[:name]}.rb", 0644
17
- end
16
+ unless ENV['SKIP_DAEMONS'] == 'true'
17
+ fetch(:setup_daemons, []).each do |daemon|
18
+ if daemon[:config] == true
19
+ template "#{daemon[:name]}.rb.erb", "#{shared_path}/config/#{daemon[:name]}.rb", 0644
20
+ end
18
21
 
19
- template "#{daemon[:name]}.daemon.erb", "#{shared_path}/tmp/#{daemon[:name]}.daemon", 0755
20
- execute "sudo mv -f #{shared_path}/tmp/#{daemon[:name]}.daemon #{fetch(:daemons_path)}/#{fetch(:application)}-#{daemon[:name]}"
22
+ template "#{daemon[:name]}.daemon.erb", "#{shared_path}/tmp/#{daemon[:name]}.daemon", 0755
23
+ execute "sudo mv -f #{shared_path}/tmp/#{daemon[:name]}.daemon #{fetch(:daemons_path)}/#{fetch(:application)}-#{daemon[:name]}"
21
24
 
22
- template "#{daemon[:name]}.monit.erb", "#{shared_path}/tmp/#{daemon[:name]}.monit", 0644
23
- execute "sudo mv -f #{shared_path}/tmp/#{daemon[:name]}.monit #{fetch(:monit_scripts_path)}/#{fetch(:application)}-#{daemon[:name]}"
24
- end
25
+ template "#{daemon[:name]}.monit.erb", "#{shared_path}/tmp/#{daemon[:name]}.monit", 0644
26
+ execute "sudo mv -f #{shared_path}/tmp/#{daemon[:name]}.monit #{fetch(:monit_scripts_path)}/#{fetch(:application)}-#{daemon[:name]}"
27
+ end
25
28
 
26
- execute "sudo service monit reload"
29
+ execute "sudo service monit reload"
30
+ end
27
31
  end
28
32
 
29
- if fetch(:setup_nginx, false) == true
30
- on roles :web do
31
- execute "mkdir -p #{fetch(:deploy_to)}"
32
- template "nginx.conf.erb", "#{shared_path}/tmp/nginx.conf", 0644
33
- execute "sudo mv -f #{shared_path}/tmp/nginx.conf #{fetch(:nginx_path)}/sites-available/#{fetch(:application)}"
34
- execute "sudo ln -snf #{fetch(:nginx_path)}/sites-available/#{fetch(:application)} #{fetch(:nginx_path)}/sites-enabled/#{fetch(:application)}"
35
- execute "sudo service nginx reload"
33
+ unless ENV['SKIP_NGINX'] == 'true'
34
+ if fetch(:setup_nginx, false) == true
35
+ on roles :web do
36
+ execute "mkdir -p #{fetch(:deploy_to)}"
37
+ template "nginx.conf.erb", "#{shared_path}/tmp/nginx.conf", 0644
38
+ execute "sudo mv -f #{shared_path}/tmp/nginx.conf #{fetch(:nginx_path)}/sites-available/#{fetch(:application)}"
39
+ execute "sudo ln -snf #{fetch(:nginx_path)}/sites-available/#{fetch(:application)} #{fetch(:nginx_path)}/sites-enabled/#{fetch(:application)}"
40
+ execute "sudo service nginx reload"
41
+ end
36
42
  end
37
43
  end
38
44
  end
@@ -47,13 +53,13 @@ namespace :deploy do
47
53
  end
48
54
 
49
55
  if fetch(:setup_daemons, []).any?
50
- execute "sudo service monit reload"
56
+ execute "sudo service monit reload", raise_on_non_zero_exit: false
51
57
  end
52
58
 
53
59
  if fetch(:setup_nginx, false) == true
54
60
  execute "sudo rm -f /etc/nginx/sites_available/#{fetch(:application)}"
55
61
  execute "sudo rm -f /etc/nginx/sites_enabled/#{fetch(:application)}"
56
- execute "sudo service nginx reload"
62
+ execute "sudo service nginx reload", raise_on_non_zero_exit: false
57
63
  end
58
64
 
59
65
  if fetch(:erase_deploy_folder_on_uninstall, false) == true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-unformatt
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.5'
4
+ version: '1.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - unformatt