mina-unicorn 0.1.0 → 0.3.0

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: e99c3b1b3bf244eb2c467ca547d2afd63aef3d5c
4
- data.tar.gz: c094729a9472403b8fb8d8de941e38151af18aa8
3
+ metadata.gz: 3060caa6683521e9cdbb43ee4edccc0876895660
4
+ data.tar.gz: a7812f1216d64276354f93b84fc383b7b7d3f8d6
5
5
  SHA512:
6
- metadata.gz: 6035f5a8a637482469d136a52385377c1f081d50ac4a4d2dea73d08bb278b18af76293d992990ffc34d9636242dd6f113431bb3d6fde928b71dafee10f4d2e05
7
- data.tar.gz: 40b4e13c4143a66b0c0ed6e3c33183abd301234052d4a77e8cb4cd3ea00c2bbd9c31d90d43774e6e7fd5d6d8b20d474796e39d3e8f148f14adbd737a6ea0c5f5
6
+ metadata.gz: a4a2037d08240024a3c652bae17770eb4ada82841d92c714260a482d30d825d3fce57a11aa96fe48d8264cee09035cdbda1fa0cf99ea7302d63955e2c1dfed81
7
+ data.tar.gz: 340dc91ac2f776c8d3c7a329cfb1718593ac5255fa98fadd9a8cca02485431dc791a5b0a8eb818e8c9ae540414bcf0f0895d9d074fe8cc8df22ce51c800f96fd
data/README.md CHANGED
@@ -29,22 +29,19 @@ Add this to your `config/deploy.rb` file:
29
29
 
30
30
  require 'mina/unicorn'
31
31
 
32
- Make sure the following settings are set in your `config/deploy.rb`:
32
+ Make sure to add the following directories to `:shared_paths` in `config/deploy.rb`:
33
33
 
34
- * `deploy_to` - deployment path
35
-
36
- Make sure the following directories exists on your server:
37
-
38
- * `shared/tmp/sockets` - directory for socket files.
39
- * `shared/tmp/pids` - direcotry for pid files.
34
+ ```ruby
35
+ set :shared_paths, ['tmp/sockets', 'tmp/pids']
36
+ ```
40
37
 
41
- OR you can set other directories by setting follow variables:
38
+ You can also set individual config variables to override default values for
39
+ unicorn:
42
40
 
43
- * `unicorn_role` - unicorn user
44
- * `unicorn_env` - set environment
45
- * `unicorn_config` - unicorn config file
46
- * `unicorn_cmd` - bundle exec unicorn
47
- * `unicorn_pid` - unicorn pid file, default `shared/tmp/pids/unicorn.pid`
41
+ * `unicorn_env` - set environment, default: depending on `rails_env`: `development` or `deployment` (see: [Rack environment](http://unicorn.bogomips.org/unicorn_1.html#rack-environment))
42
+ * `unicorn_config` - unicorn config file, default: `config/unicorn.rb`
43
+ * `unicorn_cmd` - bundle exec unicorn, default: `bundle exec unicorn`
44
+ * `unicorn_pid` - unicorn pid file, default: `tmp/pids/unicorn.pid`
48
45
 
49
46
  Then:
50
47
 
@@ -5,8 +5,8 @@ require 'mina/unicorn/utility'
5
5
  namespace :unicorn do
6
6
  include Mina::Unicorn::Utility
7
7
 
8
- set_default :unicorn_role, -> { user }
9
- set_default :unicorn_env, -> { fetch(:rails_env, 'production') }
8
+ # Following recommendations from http://unicorn.bogomips.org/unicorn_1.html#rack-environment
9
+ set_default :unicorn_env, -> { fetch(:rails_env) == 'development' ? 'development' : 'deployment' }
10
10
  set_default :unicorn_config, -> { "#{deploy_to}/#{current_path}/config/unicorn.rb" }
11
11
  set_default :unicorn_pid, -> { "#{deploy_to}/#{current_path}/tmp/pids/unicorn.pid" }
12
12
  set_default :unicorn_cmd, -> { "#{bundle_prefix} unicorn" }
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Unicorn
3
- VERSION = "0.1.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-unicorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tab
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-25 00:00:00.000000000 Z
12
+ date: 2015-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler