capistrano3-puma 6.0.0.beta.1 → 6.0.0
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 +4 -4
- data/README.md +28 -0
- data/lib/capistrano/puma.rb +5 -1
- data/lib/capistrano/tasks/systemd.rake +1 -1
- metadata +5 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0d265909a3107947404ed854ac684f27f5bbd65cc9aea7fd9efb39c1aa3b42f
|
4
|
+
data.tar.gz: f4c31b71706468b2c090a8ef00a21e4df9766bf99e6dedc70f1d78f47dc49f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43cc928a86e88f01c25739b9f94716b00cbbe3233618a4f05a8c4079bc8a77529ec8de2631b3ceb561a246e807dec15ca4448f0b1e76f4fd497d78b172e3e6d5
|
7
|
+
data.tar.gz: ef9e24fd09b905f096a8452ac9f84c78d385e4c1d75e20ec99c209cbcc9587dfffdb8942c9c17358f47ce7613f770d47bef81c8dd549d7abc46134d634c63590
|
data/README.md
CHANGED
@@ -45,6 +45,34 @@ To make it work with rvm, rbenv and chruby, install the plugin after correspondi
|
|
45
45
|
Puma configuration is expected to be in `config/puma.rb` or `config/puma/#{fetch(:puma_env)}.rb` and checked in your repository.
|
46
46
|
Uploading the configuration via capistrano was removed as it was causing problems with custom configurations.
|
47
47
|
|
48
|
+
### Deployment
|
49
|
+
|
50
|
+
Before running `$ bundle exec cap {stage} deploy` for the first time, install Puma on the deployment server. For example, if stage=production:
|
51
|
+
```
|
52
|
+
$ bundle exec cap production puma:install
|
53
|
+
```
|
54
|
+
|
55
|
+
To uninstall,
|
56
|
+
```
|
57
|
+
$ bundle exec cap production puma:uninstall
|
58
|
+
```
|
59
|
+
|
60
|
+
### Full Task List
|
61
|
+
```
|
62
|
+
$ cap -T puma
|
63
|
+
cap puma:disable # Disable Puma systemd service
|
64
|
+
cap puma:enable # Enable Puma systemd service
|
65
|
+
cap puma:install # Install Puma systemd service
|
66
|
+
cap puma:reload # Reload Puma service via systemd
|
67
|
+
cap puma:restart # Restart Puma service via systemd
|
68
|
+
cap puma:restart_socket # Restart Puma socket via systemd
|
69
|
+
cap puma:smart_restart # Restarts or reloads Puma service via systemd
|
70
|
+
cap puma:start # Start Puma service via systemd
|
71
|
+
cap puma:status # Get Puma service status via systemd
|
72
|
+
cap puma:stop # Stop Puma service via systemd
|
73
|
+
cap puma:stop_socket # Stop Puma socket via systemd
|
74
|
+
cap puma:uninstall # Uninstall Puma systemd service
|
75
|
+
```
|
48
76
|
## Example
|
49
77
|
|
50
78
|
A sample application is provided to show how to use this gem at https://github.com/seuros/capistrano-example-app
|
data/lib/capistrano/puma.rb
CHANGED
@@ -53,7 +53,11 @@ module Capistrano
|
|
53
53
|
File.expand_path("../templates/#{from}.rb.erb", __FILE__)
|
54
54
|
].detect { |path| File.file?(path) }
|
55
55
|
erb = File.read(file)
|
56
|
-
|
56
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6')
|
57
|
+
StringIO.new(ERB.new(erb, nil, '-').result(binding))
|
58
|
+
else
|
59
|
+
StringIO.new(ERB.new(erb, trim_mode: '-').result(binding))
|
60
|
+
end
|
57
61
|
end
|
58
62
|
|
59
63
|
def template_puma(from, to, role)
|
@@ -52,7 +52,7 @@ namespace :puma do
|
|
52
52
|
git_plugin.execute_systemd("enable", fetch(:puma_service_unit_name) + ".socket") if fetch(:puma_enable_socket_service)
|
53
53
|
|
54
54
|
if fetch(:puma_systemctl_user) != :system && fetch(:puma_enable_lingering)
|
55
|
-
|
55
|
+
sudo "loginctl enable-linger #{fetch(:puma_lingering_user)}"
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-puma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.0
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-01 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: capistrano
|
@@ -95,12 +94,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
95
94
|
version: '2.5'
|
96
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
96
|
requirements:
|
98
|
-
- - "
|
97
|
+
- - ">="
|
99
98
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
99
|
+
version: '0'
|
101
100
|
requirements: []
|
102
|
-
rubygems_version: 3.2
|
103
|
-
signing_key:
|
101
|
+
rubygems_version: 3.6.2
|
104
102
|
specification_version: 4
|
105
103
|
summary: Puma integration for Capistrano
|
106
104
|
test_files: []
|