capistrano-unicorn-sic 0.4.1 → 0.4.2

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: 89d6128d5c24e1992b1b1503d5a7f01448982cb8
4
- data.tar.gz: 966af9c999cc456398f8d7ba2888d08d41c30f3c
3
+ metadata.gz: 23365d07b9e41ca769eeb2379de1bd6b7b7ba5b6
4
+ data.tar.gz: 6050914f50ff37133e0fae16046267aa3d68681d
5
5
  SHA512:
6
- metadata.gz: 91d4d5871c57a3ce4765053b7438b6fa608c641d04ffcb104318c182ddad02aeda8fe06aac9175af84d10a01e687affd7112875f088dcff2974fc1ec1cbaa280
7
- data.tar.gz: f0df97b6bfa10077361abd4386f364244be93fb02d1ef5ec898186750077faf8518cf3be928ad28683c16495bd2c564f8465ef53dc753dad423c362d85de0d93
6
+ metadata.gz: 2d0cd9ee1e1dc56463c394df188fb1c3d111dd4f7060cd6f2f4eed117bac1017b412c9f0ffcb0eefdfc18f36a583c0982f30344c8a14dabb4341c2abe2688220
7
+ data.tar.gz: e32cfd248a7a80a43ef9909d8c81eb9af778d40d60a4f02a4e1ddcca3e28b4252d9b684e56198585c17ac873fe9e16e153e2a06e70c4e7743041ba5df3b306c6
@@ -6,6 +6,8 @@ include CapistranoUnicorn::Utility
6
6
  # See https://github.com/capistrano/capistrano/pull/605
7
7
  namespace :load do
8
8
  task :defaults do
9
+ set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w(unicorn))
10
+ set :rvm_map_bins, fetch(:rvm_map_bins).to_a.concat(%w(unicorn))
9
11
 
10
12
  # Environments
11
13
  set :unicorn_env , Proc.new{ fetch(:rails_env, 'production') }
@@ -86,11 +86,11 @@ module CapistranoUnicorn
86
86
  def unicorn_execute(*args)
87
87
  options = args.extract_options!
88
88
 
89
- command = "bash -l -c \"#{args.join(' ')}\""
89
+ command = [:bash, '-l', '-c', "\"#{args.join(' ')}\""]
90
90
  if unicorn_user = fetch(:unicorn_user)
91
91
  execute :sudo, '-u', unicorn_user, command, options
92
92
  else
93
- execute command, options
93
+ execute *command, options
94
94
  end
95
95
  end
96
96
 
@@ -127,9 +127,9 @@ module CapistranoUnicorn
127
127
 
128
128
  puts 'Starting unicorn...'
129
129
 
130
- within fetch(:app_path) do
130
+ within release_path do
131
131
  with rails_env: fetch(:rails_env) do
132
- unicorn_execute fetch(:unicorn_bin), '-c', unicorn_config_file_path, '-E', fetch(:unicorn_rack_env), '-D', fetch(:unicorn_options)
132
+ unicorn_execute *unicorn_bin, '-c', unicorn_config_file_path, '-E', fetch(:unicorn_rack_env), '-D', fetch(:unicorn_options)
133
133
  end
134
134
  end
135
135
  end
@@ -145,5 +145,9 @@ module CapistranoUnicorn
145
145
  def unicorn_roles
146
146
  fetch(:unicorn_roles, :app)
147
147
  end
148
+
149
+ def unicorn_bin
150
+ fetch(:unicorn_bin).split(/\s+/)
151
+ end
148
152
  end
149
153
  end
@@ -1,5 +1,5 @@
1
1
  module CapistranoUnicorn
2
2
  unless defined?(::CapistranoUnicorn::VERSION)
3
- VERSION = "0.4.1".freeze
3
+ VERSION = "0.4.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-unicorn-sic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Gassner, Dan Sosedoff, Florian Schwab