capistrano-unicorn-methods 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ## v 0.0.4: Rails environment
2
+
3
+ Added the -E option when starting unicorn. This will use the `rails_env` variable or default to 'production'.
4
+
1
5
  ## v 0.0.3: Lazy loading
2
6
 
3
7
  Added lazy loading to allow multistage
data/README.md CHANGED
@@ -23,6 +23,7 @@ It also relies on the `current_release` variable beeing present. This is part of
23
23
 
24
24
  You can customize the gems behavior by setting any (or all) of the following options within capistrano's configuration:
25
25
 
26
+ * `rails_env` sets the environment that the server will run in. Defaults to `production`.
26
27
  * `unicorn_pid` indicates the path for the pid file. Defaults to shared/pids/unicorn.pid.
27
28
  * `unicorn_old_pid` contains the pid for the old server. Defaults to shared/pids/unicorn.pid.oldbin.
28
29
  * `unicorn_config` the path to the unicorn config file. Defaults to /path/to/your/app/config/unicorn.rb.
@@ -8,6 +8,7 @@ Capistrano::Configuration.instance.load do
8
8
  set(:unicorn_config) { "#{current_path}/config/unicorn.rb" }
9
9
  set(:unicorn_port) { 3000 }
10
10
  set(:use_bundler) { true }
11
+ set(:rails_env) { "production" }
11
12
 
12
13
  desc "Zero-downtime restart of Unicorn"
13
14
  task :restart do
@@ -20,7 +21,7 @@ Capistrano::Configuration.instance.load do
20
21
  desc "Starts unicorn"
21
22
  task :start do
22
23
  unicorn.cleanup
23
- run "cd #{current_path} ; #{'bundle exec' if use_bundler} unicorn_rails -c #{unicorn_config} -D -p #{unicorn_port}"
24
+ run "cd #{current_path} ; #{'bundle exec' if use_bundler} unicorn_rails -c #{unicorn_config} -D -p #{unicorn_port} -E #{rails_env}"
24
25
  end
25
26
 
26
27
  desc "Stop unicorn"
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Unicorn
3
3
  module Methods
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-unicorn-methods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70281398618820 !ruby/object:Gem::Requirement
16
+ requirement: &70162813061700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70281398618820
24
+ version_requirements: *70162813061700
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70281398614860 !ruby/object:Gem::Requirement
27
+ requirement: &70162813057720 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70281398614860
35
+ version_requirements: *70162813057720
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec-rails
38
- requirement: &70281398614260 !ruby/object:Gem::Requirement
38
+ requirement: &70162813057040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70281398614260
46
+ version_requirements: *70162813057040
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: unicorn
49
- requirement: &70281398613060 !ruby/object:Gem::Requirement
49
+ requirement: &70162813055680 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70281398613060
57
+ version_requirements: *70162813055680
58
58
  description: Contains a unicorn namespace with methods for starting stopping and maintaining
59
59
  the unicorn server to serve the rails app.
60
60
  email: