capistrano-unicorn 0.1.2 → 0.1.3

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.
@@ -9,7 +9,7 @@ app_path = "/path/to/app"
9
9
  worker_processes 1
10
10
  preload_app true
11
11
  timeout 180
12
- listen 9000
12
+ listen "127.0.0.1:9000"
13
13
 
14
14
  # Spawn unicorn master worker for user apps (group: apps)
15
15
  user 'apps', 'apps'
@@ -5,7 +5,7 @@ module CapistranoUnicorn
5
5
  class CapistranoIntegration
6
6
  def self.load_into(capistrano_config)
7
7
  capistrano_config.load do
8
-
8
+
9
9
  # Check if remote file exists
10
10
  #
11
11
  def remote_file_exists?(full_path)
@@ -15,20 +15,21 @@ module CapistranoUnicorn
15
15
  # Set unicorn vars
16
16
  #
17
17
  _cset(:unicorn_pid, "#{fetch(:current_path)}/tmp/pids/unicorn.pid")
18
- _cset(:unicorn_env, (fetch(:rails_env) rescue 'production'))
19
-
18
+ _cset(:app_env, (fetch(:rails_env) rescue 'production'))
19
+ _cset(:unicorn_env, (fetch(:app_env)))
20
+
20
21
  namespace :unicorn do
21
22
  desc 'Start Unicorn'
22
23
  task :start, :roles => :app, :except => {:no_release => true} do
23
24
  config_path = "#{current_path}/config/unicorn/#{unicorn_env}.rb"
24
25
  if remote_file_exists?(config_path)
25
26
  logger.important("Starting...", "Unicorn")
26
- run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec unicorn -c #{config_path} -E #{unicorn_env} -D"
27
+ run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec unicorn -c #{config_path} -E #{app_env} -D"
27
28
  else
28
29
  logger.important("Config file for \"#{unicorn_env}\" environment was not found at \"#{config_path}\"", "Unicorn")
29
30
  end
30
31
  end
31
-
32
+
32
33
  desc 'Stop Unicorn'
33
34
  task :stop, :roles => :app, :except => {:no_release => true} do
34
35
  if remote_file_exists?(unicorn_pid)
@@ -58,11 +59,11 @@ module CapistranoUnicorn
58
59
  logger.important("No PIDs found. Starting Unicorn server...", "Unicorn")
59
60
  config_path = "#{current_path}/config/unicorn/#{unicorn_env}.rb"
60
61
  if remote_file_exists?(config_path)
61
- run "cd #{current_path} && bundle exec unicorn -c #{config_path} -E #{unicorn_env} -D"
62
+ run "cd #{current_path} && bundle exec unicorn -c #{config_path} -E #{app_env} -D"
62
63
  else
63
64
  logger.important("Config file for \"#{unicorn_env}\" environment was not found at \"#{config_path}\"", "Unicorn")
64
- end
65
- end
65
+ end
66
+ end
66
67
  end
67
68
  end
68
69
 
@@ -1,5 +1,5 @@
1
1
  module CapistranoUnicorn
2
2
  unless defined?(::CapistranoUnicorn::VERSION)
3
- VERSION = "0.1.2".freeze
3
+ VERSION = "0.1.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-unicorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-09 00:00:00.000000000Z
12
+ date: 2011-12-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &2165782000 !ruby/object:Gem::Requirement
16
+ requirement: &70111868384520 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2165782000
24
+ version_requirements: *70111868384520
25
25
  description: Capistrano plugin that integrates Unicorn server tasks.
26
26
  email: dan.sosedoff@gmail.com
27
27
  executables: []
@@ -61,3 +61,4 @@ signing_key:
61
61
  specification_version: 3
62
62
  summary: Unicorn integration for Capistrano
63
63
  test_files: []
64
+ has_rdoc: