capistrano-data_plane_api 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: d7fc6970b104cd14cd0c2bc3fc0c7a36e3f67ecb73f304f14cc73bce48d42d97
4
- data.tar.gz: 7a08a4712fb0690eaf2894f07bf17de9851afe2911c496ab5f365ca2dfd35a53
3
+ metadata.gz: a4faba9abcbdade44273ce9e244148c0f3db5cf0f1fcc1e0e26ec3205e106106
4
+ data.tar.gz: 8b9c5d8c6354d63acbe2a762e7d0638113bb0ec098c0b469d350baa1e50f8024
5
5
  SHA512:
6
- metadata.gz: 0b8db27dccc0af104a2418a2c17e62c30eb7fcdba9aed373ec6789949e3536f245565e367f80bdbd44b0b570f4baba242a81ded2bbdfaaf888626b5107af0c2f
7
- data.tar.gz: 9fc7f0551def684dee3a6764c727b61b3bbf7b5873baea9b82de85c23e8bff0b904ccde363896e5f74b791f98f67cc66bbe08cb69b112af3ca4790ec746f4444
6
+ metadata.gz: 37b5c6a6de1247e213abb40b263dcf0e6885a4905726a3e8c7b53a0ea1c15539bf153058c1a4132a80dfa07e4d91bb0c5e965cac5bc5e4402b3f29763e4be2d4
7
+ data.tar.gz: 23af4d6cf4f822ddee20b9bc157b9ef9a3379369d7331f909f6fada1b34059ed857b202ae41f1e84b3c17fc80a4a2ab52efc9147ebf70796900443bc08a403f6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-data_plane_api (0.1.3)
4
+ capistrano-data_plane_api (0.1.4)
5
5
  data_plane_api (~> 0.1)
6
6
  pastel (< 1)
7
7
  shale (>= 1, < 2)
data/README.md CHANGED
@@ -155,6 +155,8 @@ add this line to your `Capfile`
155
155
  require 'capistrano/data_plane_api'
156
156
  ```
157
157
 
158
+ These tasks will only run when the `:web` role is added to the deployment stage.
159
+
158
160
  ## Hooks
159
161
 
160
162
  If you used the installer, your app is already
@@ -188,6 +190,8 @@ deploy
188
190
  data_plane_api:server:set_ready
189
191
  ```
190
192
 
193
+ These tasks will only run when the `:web` role is added to the deployment stage.
194
+
191
195
  ## Development
192
196
 
193
197
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -6,25 +6,31 @@ namespace :data_plane_api do
6
6
  namespace :server do
7
7
  desc "Set the server's admin state to DRAIN through the HAProxy Data Plane API"
8
8
  task :set_drain do
9
- next if ::Capistrano::DataPlaneApi.no_haproxy?
9
+ on roles :web do
10
+ next if ::Capistrano::DataPlaneApi.no_haproxy?
10
11
 
11
- ::Capistrano::DataPlaneApi.server_set_drain fetch(:stage), force: ::Capistrano::DataPlaneApi.force_haproxy?
12
+ ::Capistrano::DataPlaneApi.server_set_drain fetch(:stage), force: ::Capistrano::DataPlaneApi.force_haproxy?
13
+ end
12
14
  end
13
15
 
14
16
  desc "Set the server's admin state to READY through the HAProxy Data Plane API"
15
17
  task :set_ready do
16
- next if ::Capistrano::DataPlaneApi.no_haproxy?
18
+ on roles :web do
19
+ next if ::Capistrano::DataPlaneApi.no_haproxy?
17
20
 
18
- sleep 3
19
- ::Capistrano::DataPlaneApi.server_set_ready fetch(:stage)
21
+ sleep 3
22
+ ::Capistrano::DataPlaneApi.server_set_ready fetch(:stage)
23
+ end
20
24
  end
21
25
 
22
26
  desc "Set the server's admin state to MAINT through the HAProxy Data Plane API"
23
27
  task :set_maint do
24
- next if ::Capistrano::DataPlaneApi.no_haproxy?
28
+ on roles :web do
29
+ next if ::Capistrano::DataPlaneApi.no_haproxy?
25
30
 
26
- sleep 3
27
- ::Capistrano::DataPlaneApi.server_set_maint fetch(:stage), force: true
31
+ sleep 3
32
+ ::Capistrano::DataPlaneApi.server_set_maint fetch(:stage), force: true
33
+ end
28
34
  end
29
35
  end
30
36
  end
@@ -3,6 +3,6 @@
3
3
  module Capistrano
4
4
  module DataPlaneApi
5
5
  # @return [String]
6
- VERSION = '0.1.3'
6
+ VERSION = '0.1.4'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-data_plane_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Drewniak
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-08-25 00:00:00.000000000 Z
12
+ date: 2024-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: data_plane_api