capistrano-data_plane_api 0.1.2 → 0.1.4

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
  SHA256:
3
- metadata.gz: 4961a264a98074e2df17ebcc7947f3060a0c531c112f428c8d96c88c4bc60327
4
- data.tar.gz: 2c8bc55c5748e119e1b9d088b124380b744eeb602127bb54b4ad47a075e63bf1
3
+ metadata.gz: a4faba9abcbdade44273ce9e244148c0f3db5cf0f1fcc1e0e26ec3205e106106
4
+ data.tar.gz: 8b9c5d8c6354d63acbe2a762e7d0638113bb0ec098c0b469d350baa1e50f8024
5
5
  SHA512:
6
- metadata.gz: d3280f16f6c65f1df0c46439bd1089950506382d2c0e5082a131549e7a9780ffd3e96ef462f0a3db6649c05f0006e7341c2dfa2c14b0bf44f221ae86a1c87f99
7
- data.tar.gz: 4be8ebbe7e62c395b3774ffb292706da118217349b4edf36258bff6d34baf4b0a712ee4f4b4349ca306c78d8b30b176042ccf6020775ced7eba09c559c1473c2
6
+ metadata.gz: 37b5c6a6de1247e213abb40b263dcf0e6885a4905726a3e8c7b53a0ea1c15539bf153058c1a4132a80dfa07e4d91bb0c5e965cac5bc5e4402b3f29763e4be2d4
7
+ data.tar.gz: 23af4d6cf4f822ddee20b9bc157b9ef9a3379369d7331f909f6fada1b34059ed857b202ae41f1e84b3c17fc80a4a2ab52efc9147ebf70796900443bc08a403f6
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-data_plane_api (0.1.2)
4
+ capistrano-data_plane_api (0.1.4)
5
5
  data_plane_api (~> 0.1)
6
6
  pastel (< 1)
7
- shale (< 1)
7
+ shale (>= 1, < 2)
8
8
  thor (> 1, < 2)
9
9
  tty-box (< 1)
10
10
  tty-cursor (< 1)
@@ -68,7 +68,7 @@ GEM
68
68
  rubocop
69
69
  ruby-progressbar (1.11.0)
70
70
  ruby2_keywords (0.0.5)
71
- shale (0.9.0)
71
+ shale (1.0.0)
72
72
  shoulda-context (2.0.0)
73
73
  solargraph (0.48.0)
74
74
  backport (~> 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.
@@ -32,7 +32,7 @@ require_relative 'lib/capistrano/data_plane_api/version'
32
32
  # Uncomment to register a new dependency of your gem
33
33
  spec.add_dependency 'data_plane_api', '~> 0.1'
34
34
  spec.add_dependency 'pastel', '< 1'
35
- spec.add_dependency 'shale', '< 1'
35
+ spec.add_dependency 'shale', '>= 1', '< 2'
36
36
  spec.add_dependency 'thor', '> 1', '< 2'
37
37
  spec.add_dependency 'tty-box', '< 1'
38
38
  spec.add_dependency 'tty-cursor', '< 1'
@@ -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.2'
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.2
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-01-19 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
@@ -43,16 +43,22 @@ dependencies:
43
43
  name: shale
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "<"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '1'
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '2'
49
52
  type: :runtime
50
53
  prerelease: false
51
54
  version_requirements: !ruby/object:Gem::Requirement
52
55
  requirements:
53
- - - "<"
56
+ - - ">="
54
57
  - !ruby/object:Gem::Version
55
58
  version: '1'
59
+ - - "<"
60
+ - !ruby/object:Gem::Version
61
+ version: '2'
56
62
  - !ruby/object:Gem::Dependency
57
63
  name: thor
58
64
  requirement: !ruby/object:Gem::Requirement