capistrano3-puma 0.1.3 → 0.2.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: 97b2b38d3f27b9f9e5b7ec1555b0655b29500bdd
4
- data.tar.gz: 3c4abf36536864ff091c5f22030e34b2c6711cbe
3
+ metadata.gz: 41eb524bebbe9f9aa005da420778c2957381122f
4
+ data.tar.gz: 01e0b3ce4ae3c5d700941d2f042caea4452f8f90
5
5
  SHA512:
6
- metadata.gz: ab49da7d03ece76ff6de0df71287e9ebce1c59e9edd4208e0974920b06274e4a17d986d27187379e50c36e47f3a416b9caea6c4edf1dfc2718d3fa4502c56690
7
- data.tar.gz: 57d168024174874977ec129a90e5af9f3e834b1dc8d6cdb52f0ea41ae7c5758cc7fb3bef680f952d642c369309232a76ccb695ad941130214757d5486b3ebc04
6
+ metadata.gz: 5715a489f013dfdabb8dc3b7733fb7c3abf7ac1937938845683116d32e10ca43931b09f22aab672e9dc42c000bd60d4da0c8a6d0f777e9229a16b81355498e72
7
+ data.tar.gz: ee48a9b9ee95fd7d31dfa723e1d22d23a76b21c81017934e31c7e799833d0d8b2b393e670f390233b1830763fcd71b8e21358101fdfbb452b89f0d54fee43462
data/README.md CHANGED
@@ -39,6 +39,7 @@ Configurable options, shown here with defaults: Please note the configuration op
39
39
  set :puma_env, fetch(:rack_env, fetch(:rails_env, 'production'))
40
40
  set :puma_threads, [0, 16]
41
41
  set :puma_workers, 0
42
+ set :puma_init_active_record, false
42
43
  ```
43
44
  For Jungle tasks (beta), these options exist:
44
45
  ```ruby
@@ -51,6 +52,8 @@ Ensure that the following directories are shared (via ``linked_dirs``):
51
52
 
52
53
  ## Changelog
53
54
 
55
+ - 0.2.0: Support for puma `ActiveRecord::Base.establish_connection` on
56
+ boot
54
57
  - 0.1.3: Capistrano 3.1 support
55
58
  - 0.1.2: Gemfile are refreshed between deploys now
56
59
  - 0.1.1: Initial support for Monit and configuration override added.
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Puma
3
- VERSION = '0.1.3'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
@@ -12,6 +12,7 @@ namespace :load do
12
12
  set :puma_conf, -> { File.join(shared_path, 'puma.rb') }
13
13
  set :puma_access_log, -> { File.join(shared_path, 'log', 'puma_error.log') }
14
14
  set :puma_error_log, -> { File.join(shared_path, 'log', 'puma_access.log') }
15
+ set :puma_init_active_record, false
15
16
 
16
17
  # Rbenv and RVM integration
17
18
  set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w{ puma pumactl })
@@ -17,3 +17,10 @@ on_restart do
17
17
  ENV["BUNDLE_GEMFILE"] = "<%= fetch(:bundle_gemfile, "#{current_path}/Gemfile") %>"
18
18
  end
19
19
 
20
+ <% if fetch(:puma_init_active_record) %>
21
+ on_worker_boot do
22
+ ActiveSupport.on_load(:active_record) do
23
+ ActiveRecord::Base.establish_connection
24
+ end
25
+ end
26
+ <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-19 00:00:00.000000000 Z
11
+ date: 2014-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano