capistrano-data_plane_api 0.4.0 → 0.4.2

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: 129252a41d4e576802ee27f312f06875a71b8e9e116fe984c45d0ff4d83e0b08
4
- data.tar.gz: f9ef93c427519821ca84336b437d3e9707992bc7550e075077c7ac42711becae
3
+ metadata.gz: a0e6727cc66e642fbe370bcc6cf1ca1bac711c35d69359e2f0c6ac554621ef0b
4
+ data.tar.gz: cce5d8e17731e5f50c9150416f6462e97b7a07432ac6c077c6cc04e77cb72b06
5
5
  SHA512:
6
- metadata.gz: bb2eea9deb79ac6387b2d27b988074c3e9cd13e25ce05d057af29ef135407539f0896aba1ece6c68abf48472f70778e265f0031c664d1a9bd2486c2337596898
7
- data.tar.gz: 7f8eedc6fa57fee424309618b5f5bdba5bde4c4fb9e19fb241484e4197a013cc01365d51a0fc26f2751704bc54fc4a77598b176211be8e8aea72959ba49ff07b
6
+ metadata.gz: 40ae759ffc262e1c6df3bfbcc954658440965694b51cd86c9e65d358cb99a778660213137515ff92283062eafb1d9d31c679ca157ddda183913ecd3598914965
7
+ data.tar.gz: 565d673a69a68f8f9c0e1cc488390bf4b9ad0d8eab8c685611c1491f1f0befc2a9dec6a6f469ca4a2fb53dc6c55e6770dcdd3fb191e9c1352672fdf6eeee42b7
data/Gemfile CHANGED
@@ -12,7 +12,7 @@ gem 'rubocop', '~> 1.21' # Ruby linter
12
12
  gem 'rubocop-espago', '~> 1.0' # Custom Ruby linter config
13
13
  gem 'rubocop-sorbet', '~> 0.10.0' # Rubocop config for sorbet
14
14
  gem 'shoulda-context', '~> 2.0' # Testing utilities
15
- gem 'sorbet', '~> 0.5' # static typechecker
16
- gem 'tapioca', '~> 0.16.11', require: false # RBI generator
15
+ gem 'sorbet', '~> 0.6.12940' # static typechecker
16
+ gem 'tapioca', '~> 0.17.10', require: false # RBI generator
17
17
  gem 'vcr', '~> 6.3.1' # Save HTTP interactions to files during tests
18
18
  gem 'webmock', '~> 3.25.1' # Mock network interactions
data/Gemfile.lock CHANGED
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-data_plane_api (0.4.0)
4
+ capistrano-data_plane_api (0.4.2)
5
5
  booleans (~> 0.1)
6
6
  data_plane_api (>= 0.2)
7
7
  pastel (< 1)
8
8
  shale (>= 1, < 2)
9
- shale-builder (>= 0.2.4, < 1.0)
9
+ shale-builder (>= 0.2.4, <= 0.8.5)
10
10
  sorbet-runtime (~> 0.5)
11
11
  thor (> 1, < 2)
12
12
  tty-box (< 1)
@@ -19,8 +19,8 @@ GEM
19
19
  public_suffix (>= 2.0.2, < 7.0)
20
20
  ast (2.4.3)
21
21
  base64 (0.2.0)
22
- benchmark (0.2.1)
23
- bigdecimal (3.1.9)
22
+ benchmark (0.5.0)
23
+ bigdecimal (4.0.1)
24
24
  booleans (0.1.3)
25
25
  sorbet-runtime (>= 0.5)
26
26
  byebug (12.0.0)
@@ -47,24 +47,26 @@ GEM
47
47
  net-http (0.6.0)
48
48
  uri
49
49
  netrc (0.11.0)
50
- parallel (1.26.3)
50
+ parallel (1.27.0)
51
51
  parser (3.3.7.4)
52
52
  ast (~> 2.4.1)
53
53
  racc
54
54
  pastel (0.8.0)
55
55
  tty-color (~> 0.5)
56
- prism (1.4.0)
56
+ prism (1.9.0)
57
57
  public_suffix (6.0.1)
58
58
  racc (1.8.1)
59
59
  rainbow (3.1.1)
60
60
  rake (13.0.6)
61
- rbi (0.3.1)
61
+ rbi (0.3.9)
62
62
  prism (~> 1.0)
63
63
  rbs (>= 3.4.4)
64
- sorbet-runtime (>= 0.5.9204)
65
- rbs (3.9.2)
64
+ rbs (4.0.0.dev.5)
66
65
  logger
66
+ prism (>= 1.3.0)
67
+ tsort
67
68
  regexp_parser (2.10.0)
69
+ require-hooks (0.2.3)
68
70
  rexml (3.4.1)
69
71
  rubocop (1.75.2)
70
72
  json (~> 2.3)
@@ -87,23 +89,25 @@ GEM
87
89
  ruby-progressbar (1.13.0)
88
90
  shale (1.2.2)
89
91
  bigdecimal
90
- shale-builder (0.5.0)
92
+ shale-builder (0.8.5)
91
93
  booleans (>= 0.1)
92
94
  shale (< 2.0)
93
95
  sorbet-runtime (> 0.5)
94
96
  shoulda-context (2.0.0)
95
- sorbet (0.5.12003)
96
- sorbet-static (= 0.5.12003)
97
- sorbet-runtime (0.5.12003)
98
- sorbet-static (0.5.12003-universal-darwin)
99
- sorbet-static (0.5.12003-x86_64-linux)
100
- sorbet-static-and-runtime (0.5.12003)
101
- sorbet (= 0.5.12003)
102
- sorbet-runtime (= 0.5.12003)
103
- spoom (1.6.1)
97
+ sorbet (0.6.12940)
98
+ sorbet-static (= 0.6.12940)
99
+ sorbet-runtime (0.6.12940)
100
+ sorbet-static (0.6.12940-universal-darwin)
101
+ sorbet-static (0.6.12940-x86_64-linux)
102
+ sorbet-static-and-runtime (0.6.12940)
103
+ sorbet (= 0.6.12940)
104
+ sorbet-runtime (= 0.6.12940)
105
+ spoom (1.7.11)
104
106
  erubi (>= 1.10.0)
105
107
  prism (>= 0.28.0)
106
- rbi (>= 0.2.3)
108
+ rbi (>= 0.3.3)
109
+ rbs (>= 4.0.0.dev.4)
110
+ rexml (>= 3.2.6)
107
111
  sorbet-static-and-runtime (>= 0.5.10187)
108
112
  thor (>= 0.19.2)
109
113
  strings (0.2.1)
@@ -111,17 +115,19 @@ GEM
111
115
  unicode-display_width (>= 1.5, < 3.0)
112
116
  unicode_utils (~> 1.4)
113
117
  strings-ansi (0.2.0)
114
- tapioca (0.16.11)
118
+ tapioca (0.17.10)
115
119
  benchmark
116
120
  bundler (>= 2.2.25)
117
121
  netrc (>= 0.11.0)
118
122
  parallel (>= 1.21.0)
119
- rbi (~> 0.2)
123
+ rbi (>= 0.3.7)
124
+ require-hooks (>= 0.2.2)
120
125
  sorbet-static-and-runtime (>= 0.5.11087)
121
- spoom (>= 1.2.0)
126
+ spoom (>= 1.7.9)
122
127
  thor (>= 1.2.0)
123
128
  yard-sorbet
124
- thor (1.2.1)
129
+ thor (1.5.0)
130
+ tsort (0.2.0)
125
131
  tty-box (0.7.0)
126
132
  pastel (~> 0.8)
127
133
  strings (~> 0.2.0)
@@ -137,9 +143,7 @@ GEM
137
143
  addressable (>= 2.8.0)
138
144
  crack (>= 0.3.2)
139
145
  hashdiff (>= 0.4.0, < 2.0.0)
140
- webrick (1.7.0)
141
- yard (0.9.28)
142
- webrick (~> 1.7.0)
146
+ yard (0.9.38)
143
147
  yard-sorbet (0.9.0)
144
148
  sorbet-runtime
145
149
  yard
@@ -159,8 +163,8 @@ DEPENDENCIES
159
163
  rubocop-espago (~> 1.0)
160
164
  rubocop-sorbet (~> 0.10.0)
161
165
  shoulda-context (~> 2.0)
162
- sorbet (~> 0.5)
163
- tapioca (~> 0.16.11)
166
+ sorbet (~> 0.6.12940)
167
+ tapioca (~> 0.17.10)
164
168
  vcr (~> 6.3.1)
165
169
  webmock (~> 3.25.1)
166
170
 
@@ -34,7 +34,7 @@ require_relative 'lib/capistrano/data_plane_api/version'
34
34
  spec.add_dependency 'data_plane_api', '>= 0.2'
35
35
  spec.add_dependency 'pastel', '< 1'
36
36
  spec.add_dependency 'shale', '>= 1', '< 2'
37
- spec.add_dependency 'shale-builder', '>= 0.2.4', '< 1.0'
37
+ spec.add_dependency 'shale-builder', '>= 0.2.4', '<= 0.8.5'
38
38
  spec.add_dependency 'sorbet-runtime', '~> 0.5'
39
39
  spec.add_dependency 'thor', '> 1', '< 2'
40
40
  spec.add_dependency 'tty-box', '< 1'
@@ -13,7 +13,7 @@ module Capistrano
13
13
  class Args
14
14
  PRINTABLE_ENV_VARS = %w[BRANCH NO_MIGRATIONS NO_ASSET_PRECOMPILATION].freeze
15
15
 
16
- #: (Array[untyped]?) -> instance
16
+ #: (?Array[untyped]?) -> instance
17
17
  def self.parse(options = nil) # rubocop:disable Metrics/MethodLength, Style/ClassMethodsDefinitions
18
18
  args = new
19
19
 
@@ -237,13 +237,13 @@ module Capistrano
237
237
  @group = backend.name
238
238
  end
239
239
 
240
- #: (String | Symbol | nil) -> String
240
+ #: (?String | Symbol | nil) -> String
241
241
  def deploy_command(stage = nil)
242
242
  used_stage = stage || self.stage
243
243
  "cap #{used_stage} #{rake}"
244
244
  end
245
245
 
246
- #: (String | Symbol | nil) -> String
246
+ #: (?String | Symbol | nil) -> String
247
247
  def humanized_deploy_command(stage = nil)
248
248
  result = ::String.new
249
249
  PRINTABLE_ENV_VARS.each do |env_var_name|
@@ -30,10 +30,10 @@ module Capistrano
30
30
  @backend = nil
31
31
  @start_time = nil
32
32
  @end_time = nil
33
- @state = T.let(:pending, Symbol)
34
- @server_stats = T.let({}, T::Hash[String, Deploy::ServerStats])
35
- @seconds = T.let(nil, T.nilable(Integer))
36
- @update_states_in_stats = T.let(false, T::Boolean)
33
+ @state = :pending #: Symbol
34
+ @server_stats = {} #: Hash[String, Deploy::ServerStats]
35
+ @seconds = nil #: Integer?
36
+ @update_states_in_stats = false #: bool
37
37
  end
38
38
 
39
39
  #: (String) -> Deploy::ServerStats
@@ -8,28 +8,41 @@ module Capistrano
8
8
  # in a particular HAProxy backend/group.
9
9
  class Group
10
10
  class << self
11
- #: (Args) -> Symbol
11
+ #: (Args) -> DeploymentStats
12
12
  def call(args)
13
13
  new(args).call
14
14
  end
15
15
  end
16
16
 
17
+ #: Configuration::Backend?
18
+ attr_reader :backend
19
+
20
+ #: Array[Configuration::Server]?
21
+ attr_reader :servers
22
+
23
+ #: DeploymentStats
24
+ attr_reader :deployment_stats
25
+
26
+ #: Symbol
27
+ attr_reader :state
28
+
17
29
  #: (Args) -> void
18
30
  def initialize(args)
19
31
  @args = args
20
- @deployment_stats = T.let(DeploymentStats.new, DeploymentStats)
21
- @backend = T.let(nil, T.nilable(Configuration::Backend))
22
- @servers = T.let(nil, T.nilable(T::Array[Configuration::Server]))
32
+ @deployment_stats = DeploymentStats.new #: DeploymentStats
33
+ @backend = nil #: Configuration::Backend?
34
+ @servers = nil #: Array[Configuration::Server]?
35
+ @state = :pending #: Symbol
23
36
  end
24
37
 
25
- # Whether the deployment has been successful
26
- #: -> Symbol
38
+ # Carries out the deployment and returns the stats
39
+ #
40
+ #: -> DeploymentStats
27
41
  def call
28
42
  @backend = ::Capistrano::DataPlaneApi.find_backend(T.must(@args.group))
29
- @servers = servers(@backend)
43
+ @servers = get_servers(@backend)
30
44
  start_deployment
31
45
 
32
- state = :pending
33
46
  @servers&.each do |server|
34
47
  server_stats = @deployment_stats[T.must(server.name)]
35
48
  puts COLORS.bold.blue("Deploying the app to `#{server.stage}` -- `#{@backend.name}:#{server.name}`")
@@ -43,27 +56,27 @@ module Capistrano
43
56
  deploy_command = @args.deploy_command(server.stage)
44
57
  case system deploy_command
45
58
  when true
46
- state = :success
59
+ @state = :success
47
60
  when false
48
- state = :failed
61
+ @state = :failed
49
62
  when nil
50
- state = :pending
63
+ @state = :pending
51
64
  end
52
65
 
53
66
  server_stats.end_time = ::Time.now
54
- server_stats.state = state
67
+ server_stats.state = @state
55
68
 
56
- next if state == :success
69
+ next if @state == :success
57
70
 
58
71
  puts COLORS.bold.red("Command `#{deploy_command}` failed")
59
72
  break
60
73
  end
61
74
 
62
- return :pending if @args.test?
75
+ return @deployment_stats if @args.test?
63
76
 
64
- finish_deployment(state: state)
77
+ finish_deployment(state: @state)
65
78
  print_summary
66
- state
79
+ @deployment_stats
67
80
  end
68
81
 
69
82
  private
@@ -77,7 +90,7 @@ module Capistrano
77
90
  end
78
91
  end
79
92
 
80
- #: (Symbol) -> void
93
+ #: (?state: Symbol) -> void
81
94
  def finish_deployment(state: :success)
82
95
  @deployment_stats.end_time = ::Time.now
83
96
  @deployment_stats.state = state
@@ -89,7 +102,7 @@ module Capistrano
89
102
  end
90
103
 
91
104
  #: (Configuration::Backend) -> Array[Configuration::Server]?
92
- def servers(backend)
105
+ def get_servers(backend)
93
106
  return backend.servers unless @args.only?
94
107
 
95
108
  chosen_servers = []
@@ -39,7 +39,7 @@ module Capistrano
39
39
  # Calculate how many seconds have passed
40
40
  # since the given point in time.
41
41
  #
42
- #: (Time, Time) -> Integer
42
+ #: (Time, ?to: Time) -> Integer
43
43
  def seconds_since(time, to: ::Time.now)
44
44
  (to - time).to_i
45
45
  end
@@ -30,7 +30,7 @@ module Capistrano
30
30
  #: String
31
31
  attr_accessor :operational_state
32
32
 
33
- #: (String, String, Symbol, String, String) -> void
33
+ #: (String, String, ?state: Symbol, ?admin_state: String, ?operational_state: String) -> void
34
34
  def initialize(
35
35
  server_name,
36
36
  backend_name,
@@ -43,7 +43,7 @@ module Capistrano
43
43
  @state = state
44
44
  @admin_state = admin_state
45
45
  @operational_state = operational_state
46
- @seconds = T.let(nil, T.nilable(Integer))
46
+ @seconds = nil #: Integer?
47
47
  end
48
48
 
49
49
  #: -> String
@@ -87,15 +87,12 @@ module Capistrano
87
87
  HAPROXY
88
88
  end
89
89
 
90
- SERVER_TITLE_COLORS = T.let(
91
- {
92
- pending: :yellow,
93
- failed: :red,
94
- success: :green,
95
- info: :blue,
96
- }.freeze,
97
- T::Hash[Symbol, Symbol],
98
- )
90
+ SERVER_TITLE_COLORS = {
91
+ pending: :yellow,
92
+ failed: :red,
93
+ success: :green,
94
+ info: :blue,
95
+ }.freeze #: Hash[Symbol, Symbol]
99
96
  private_constant :SERVER_TITLE_COLORS
100
97
 
101
98
  #: -> String
@@ -108,15 +105,12 @@ module Capistrano
108
105
  "#{@backend_name}:#{@server_name}"
109
106
  end
110
107
 
111
- STATE_EMOJIS = T.let(
112
- {
113
- pending: '🟡',
114
- failed: '',
115
- success: '',
116
- info: 'ℹ️',
117
- }.freeze,
118
- T::Hash[Symbol, String],
119
- )
108
+ STATE_EMOJIS = {
109
+ pending: '🟡',
110
+ failed: '',
111
+ success: '',
112
+ info: 'ℹ️',
113
+ }.freeze #: Hash[Symbol, String]
120
114
  private_constant :STATE_EMOJIS
121
115
 
122
116
  #: -> String
@@ -13,14 +13,14 @@ module Capistrano
13
13
  #
14
14
  #: -> void
15
15
  def call
16
- result = call!
17
- abort if result == :failed
16
+ stats = call!
17
+ abort if stats.state == :failed
18
18
  end
19
19
 
20
20
  # Returns when the deployment is over.
21
21
  # Returns the final state of the deployment as a symbol `:failed`, `:pending` or `:success`
22
22
  #
23
- #: -> Symbol
23
+ #: -> DeploymentStats
24
24
  def call!
25
25
  args = Args.parse
26
26
  puts COLORS.bold.blue('Running the deployment script')
@@ -14,7 +14,7 @@ module Capistrano
14
14
  # This implementation of `dig` uses `public_send` under the hood.
15
15
  #
16
16
  # @raise [TypeError] value has no #dig method
17
- #: (untyped) -> untyped
17
+ #: (*untyped) -> untyped
18
18
  def dig(*args)
19
19
  return unless args.size.positive?
20
20
 
@@ -5,25 +5,19 @@ module Capistrano
5
5
  module DataPlaneApi
6
6
  # Provides helper methods
7
7
  module Helper
8
- ADMIN_STATE_COLORS = T.let(
9
- {
10
- 'unknown' => :on_red,
11
- 'drain' => :on_blue,
12
- 'ready' => :on_green,
13
- 'maint' => :on_yellow,
14
- }.freeze,
15
- T::Hash[String, Symbol],
16
- )
17
-
18
- OPERATIONAL_STATE_COLORS = T.let(
19
- {
20
- 'unknown' => :on_red,
21
- 'up' => :on_green,
22
- 'down' => :on_red,
23
- 'stopping' => :on_yellow,
24
- }.freeze,
25
- T::Hash[String, Symbol],
26
- )
8
+ ADMIN_STATE_COLORS = {
9
+ 'unknown' => :on_red,
10
+ 'drain' => :on_blue,
11
+ 'ready' => :on_green,
12
+ 'maint' => :on_yellow,
13
+ }.freeze #: Hash[String, Symbol]
14
+
15
+ OPERATIONAL_STATE_COLORS = {
16
+ 'unknown' => :on_red,
17
+ 'up' => :on_green,
18
+ 'down' => :on_red,
19
+ 'stopping' => :on_yellow,
20
+ }.freeze #: Hash[String, Symbol]
27
21
 
28
22
  #: -> bool
29
23
  def no_haproxy?
@@ -15,7 +15,7 @@ module Capistrano
15
15
  # before another frame is printed.
16
16
  #
17
17
  # @param interval: Number of seconds between each screen refresh
18
- #: (Integer) { (String) -> Object } -> void
18
+ #: (?interval: Integer) { (String) -> Object } -> void
19
19
  def call(interval: 2, &_block)
20
20
  previous_line_count = 0
21
21
  previous_max_line_length = 0
@@ -2,6 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'shale'
5
+ require 'shale/builder'
5
6
 
6
7
  require_relative 'diggable'
7
8
  require_relative 'equatable'
@@ -14,6 +15,7 @@ module Capistrano
14
15
 
15
16
  abstract!
16
17
 
18
+ include ::Shale::Builder
17
19
  include Diggable
18
20
  include Equatable
19
21
 
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Capistrano
5
5
  module DataPlaneApi
6
- VERSION = '0.4.0'
6
+ VERSION = '0.4.2'
7
7
  end
8
8
  end
@@ -82,7 +82,7 @@ module Capistrano
82
82
  # @return: Server state after the change, or `nil`
83
83
  # when no change happened
84
84
  # @raise [Error] The process failed due to some reason
85
- #: (String | Symbol, bool, ::DataPlaneApi::Configuration?) -> Hash[String, untyped]?
85
+ #: (String | Symbol, ?force: bool, ?config: ::DataPlaneApi::Configuration?) -> Hash[String, untyped]?
86
86
  def server_set_drain(deployment_stage, force: false, config: nil)
87
87
  haproxy_server, haproxy_backend = find_server_and_backend(deployment_stage)
88
88
  servers = T.must haproxy_backend.servers
@@ -119,7 +119,7 @@ module Capistrano
119
119
  # @param force: Change the server's state even when no other server is `up`
120
120
  # @return: Server state after the change, or `nil` when no change happened
121
121
  # @raise [Error] The process failed due to some reason
122
- #: (String | Symbol, bool, ::DataPlaneApi::Configuration?) -> Hash[String, untyped]?
122
+ #: (String | Symbol, ?force: bool, ?config: ::DataPlaneApi::Configuration?) -> Hash[String, untyped]?
123
123
  def server_set_maint(deployment_stage, force: false, config: nil)
124
124
  haproxy_server, haproxy_backend = find_server_and_backend(deployment_stage)
125
125
  servers = T.must haproxy_backend.servers
@@ -155,7 +155,7 @@ module Capistrano
155
155
  #
156
156
  # @return: Server state after the change, or `nil` when no change happened
157
157
  # @raise [Error] The process failed due to some reason
158
- #: (String | Symbol, ::DataPlaneApi::Configuration?) -> Hash[String, untyped]?
158
+ #: (String | Symbol, ?config: ::DataPlaneApi::Configuration?) -> Hash[String, untyped]?
159
159
  def server_set_ready(deployment_stage, config: nil)
160
160
  haproxy_server, haproxy_backend = find_server_and_backend(deployment_stage)
161
161
  servers = T.must haproxy_backend.servers
@@ -192,7 +192,7 @@ module Capistrano
192
192
  #
193
193
  # @return: Server state
194
194
  # @raise [Error] The process failed due to some reason
195
- #: (String | Symbol, ::DataPlaneApi::Configuration?) -> Hash[String, untyped]?
195
+ #: (String | Symbol, ?config: ::DataPlaneApi::Configuration?) -> Hash[String, untyped]?
196
196
  def server_get_state(deployment_stage, config: nil)
197
197
  haproxy_server, haproxy_backend = find_server_and_backend(deployment_stage)
198
198
 
@@ -246,7 +246,7 @@ module Capistrano
246
246
  [T.must(haproxy_server), haproxy_backend]
247
247
  end
248
248
 
249
- #: (Symbol | String, ::DataPlaneApi::Configuration?) -> Faraday::Response
249
+ #: (Symbol | String, ?config: ::DataPlaneApi::Configuration?) -> Faraday::Response
250
250
  def get_backend_servers_settings(backend_name, config: nil)
251
251
  haproxy_backend = find_backend(backend_name)
252
252
  conf = ::DataPlaneApi::Configuration.new(
@@ -267,7 +267,7 @@ module Capistrano
267
267
  response
268
268
  end
269
269
 
270
- #: (Symbol | String, Symbol | String, ::DataPlaneApi::Configuration?) -> Faraday::Response
270
+ #: (Symbol | String, Symbol | String, ?config: ::DataPlaneApi::Configuration?) -> Faraday::Response
271
271
  def get_server_settings(backend_name, server_name, config: nil)
272
272
  haproxy_backend = find_backend(backend_name)
273
273
  conf = ::DataPlaneApi::Configuration.new(
@@ -60,6 +60,7 @@ module Minitest::Assertions
60
60
  sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
61
61
  def assert_same(exp, act, msg = nil); end
62
62
 
63
+ # @version < 6.0.0
63
64
  sig { params(send_ary: T::Array[T.anything], m: T.anything).returns(T::Boolean) }
64
65
  def assert_send(send_ary, m = nil); end
65
66
 
@@ -33,8 +33,13 @@ class Capistrano::DataPlaneApi::Configuration::Backend
33
33
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
34
  def name=(value); end
35
35
 
36
- sig { returns(T.nilable(T::Array[Capistrano::DataPlaneApi::Configuration::Server])) }
37
- def servers; end
36
+ sig { params(block: NilClass).returns(T.nilable(T::Array[Capistrano::DataPlaneApi::Configuration::Server])) }
37
+ sig do
38
+ params(
39
+ block: T.proc.params(arg0: Capistrano::DataPlaneApi::Configuration::Server).void
40
+ ).returns(Capistrano::DataPlaneApi::Configuration::Server)
41
+ end
42
+ def servers(&block); end
38
43
 
39
44
  sig do
40
45
  params(
@@ -15,8 +15,13 @@ class Capistrano::DataPlaneApi::Configuration
15
15
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
16
16
  def api_url=(value); end
17
17
 
18
- sig { returns(T.nilable(T::Array[Capistrano::DataPlaneApi::Configuration::Backend])) }
19
- def backends; end
18
+ sig { params(block: NilClass).returns(T.nilable(T::Array[Capistrano::DataPlaneApi::Configuration::Backend])) }
19
+ sig do
20
+ params(
21
+ block: T.proc.params(arg0: Capistrano::DataPlaneApi::Configuration::Backend).void
22
+ ).returns(Capistrano::DataPlaneApi::Configuration::Backend)
23
+ end
24
+ def backends(&block); end
20
25
 
21
26
  sig do
22
27
  params(