capistrano-elobuff 0.2.3 → 0.2.4

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.
@@ -11,7 +11,8 @@ Gem::Specification.new do |gem|
11
11
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
12
12
  gem.name = "capistrano-elobuff"
13
13
  gem.require_paths = ["lib"]
14
- gem.version = "0.2.3"
14
+ gem.version = "0.2.4"
15
15
 
16
16
  gem.add_dependency "capistrano"
17
+ gem.add_dependency "fog"
17
18
  end
@@ -1,6 +1,7 @@
1
1
  Capistrano::Configuration.instance.load do
2
2
  require_settings :application, :current_path
3
3
 
4
+ set_default(:unicorn?) { true }
4
5
  set_default(:unicorn_pid) { "#{current_path}/tmp/pids/unicorn.pid" }
5
6
  set_default(:unicorn_socket) { "#{current_path}/tmp/sockets/unicorn.sock" }
6
7
  set_default(:unicorn_log) { "#{current_path}/log/unicorn.log" }
@@ -11,14 +12,18 @@ Capistrano::Configuration.instance.load do
11
12
  namespace :unicorn do
12
13
  desc "Setup a unicorn environment"
13
14
  task :setup, roles: :web, on_no_matching_servers: :continue do
14
- run "cd #{current_path}; mkdir -p tmp/pids tmp/sockets"
15
+ if unicorn?
16
+ run "cd #{current_path}; mkdir -p tmp/pids tmp/sockets"
17
+ end
15
18
  end
16
19
 
17
20
  desc "Export the unicorn server configuration"
18
21
  task :update_config, roles: :web, on_no_matching_servers: :continue do
19
- upload_template "unicorn.rb", "#{current_path}/config/unicorn.rb"
20
- upload_template "unicorn_init.sh", "/tmp/unicorn_init"
21
- run "sudo chmod 700 /tmp/unicorn_init; sudo chown 0:0 /tmp/unicorn_init; sudo rm -f /etc/init.d/#{application}-web; sudo mv /tmp/unicorn_init /etc/init.d/#{application}-web; sudo update-rc.d -f #{application}-web defaults"
22
+ if unicorn?
23
+ upload_template "unicorn.rb", "#{current_path}/config/unicorn.rb"
24
+ upload_template "unicorn_init.sh", "/tmp/unicorn_init"
25
+ run "sudo chmod 700 /tmp/unicorn_init; sudo chown 0:0 /tmp/unicorn_init; sudo rm -f /etc/init.d/#{application}-web; sudo mv /tmp/unicorn_init /etc/init.d/#{application}-web; sudo update-rc.d -f #{application}-web defaults"
26
+ end
22
27
  end
23
28
  end
24
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-elobuff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: fog
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
30
46
  description: Capistrano recipes we use at ELOBUFF
31
47
  email:
32
48
  - jcoene@gmail.com