mina-puma 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c68864f1dc2893df94157667a384d239f553abc3
4
- data.tar.gz: 6011e5b815f40a885b5f952d2f686f2ea1de2c1b
3
+ metadata.gz: 5d7dbc246ea06929ef31774c2b7f9db29bcaeaf5
4
+ data.tar.gz: 7259b5a906bc9209c6c25dae868bf214d400ef26
5
5
  SHA512:
6
- metadata.gz: fb8818233cf6c6aac522d6e7a460de8c32a3468b87f7e44410fdab64c494c4e5d0f4a4bcdfb9f0a8a5706806fbbce59a33d164980e804590ee0a2b8e9abfbbf6
7
- data.tar.gz: 8453b5a1931f663233f1192c5ff07d16f66721f264454f3a67f73c42cd13b9da6a99a74ed7d9adbaaf6ed40dba69d6980a92ff30fb4aa891c0317528afade5b2
6
+ metadata.gz: 803f1d95fc40292cd49ae336f0f2177cd73e1f61aa091ae1b6311525401cef5b5625d3bd21c043000a914b781a39cfe1a7f3550511685381dda1fb90f7da5eb1
7
+ data.tar.gz: 332e028f629f24798540c938ab7d6e1d2b98f07a1cf44d5fa6240d0ae0b48e21504b2186b0a7a20b2afc2ae52a8105b8dbdd6cc39ae7b3c752dffcf7de53021e
data/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
 
6
6
  This gem provides several mina tasks:
7
7
 
8
+ mina puma:phased_restart # Restart puma (with zero-downtime)
8
9
  mina puma:restart # Restart puma
9
10
  mina puma:start # Start puma
10
11
  mina puma:stop # Stop puma
@@ -74,7 +75,7 @@ $ mina puma:start
74
75
 
75
76
  to :launch do
76
77
  ...
77
- invoke :'puma:restart'
78
+ invoke :'puma:phased_restart'
78
79
  end
79
80
  end
80
81
  end
@@ -45,4 +45,15 @@ namespace :puma do
45
45
  invoke :'puma:stop'
46
46
  invoke :'puma:start'
47
47
  end
48
+
49
+ desc 'Restart puma (phased restart)'
50
+ task phased_restart: :environment do
51
+ queue! %[
52
+ if [ -e '#{pumactl_socket}' ]; then
53
+ cd #{deploy_to}/#{current_path} && #{pumactl_cmd} -S #{puma_state} phased-restart
54
+ else
55
+ echo 'Puma is not running!';
56
+ fi
57
+ ]
58
+ end
48
59
  end
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Puma
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Sandelius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-07 00:00:00.000000000 Z
11
+ date: 2014-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mina