capistrano-data_plane_api 0.1.4 → 0.2.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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -2
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile +7 -4
  6. data/Gemfile.lock +108 -69
  7. data/README.md +5 -0
  8. data/capistrano-data_plane_api.gemspec +5 -2
  9. data/exe/cap_data_plane_api +3 -2
  10. data/lib/capistrano/data_plane_api/configuration/backend.rb +2 -0
  11. data/lib/capistrano/data_plane_api/configuration/server.rb +4 -2
  12. data/lib/capistrano/data_plane_api/configuration/symbol.rb +2 -0
  13. data/lib/capistrano/data_plane_api/configuration.rb +3 -3
  14. data/lib/capistrano/data_plane_api/deploy/args.rb +71 -40
  15. data/lib/capistrano/data_plane_api/deploy/deployment_stats.rb +29 -25
  16. data/lib/capistrano/data_plane_api/deploy/group.rb +33 -24
  17. data/lib/capistrano/data_plane_api/deploy/helper.rb +3 -5
  18. data/lib/capistrano/data_plane_api/deploy/server_stats.rb +60 -43
  19. data/lib/capistrano/data_plane_api/deploy.rb +3 -2
  20. data/lib/capistrano/data_plane_api/diggable.rb +5 -2
  21. data/lib/capistrano/data_plane_api/equatable.rb +4 -2
  22. data/lib/capistrano/data_plane_api/helper.rb +31 -27
  23. data/lib/capistrano/data_plane_api/hooks.rb +1 -0
  24. data/lib/capistrano/data_plane_api/show_state.rb +15 -12
  25. data/lib/capistrano/data_plane_api/tasks.rb +26 -2
  26. data/lib/capistrano/data_plane_api/terminal_print_loop.rb +7 -4
  27. data/lib/capistrano/data_plane_api/type.rb +9 -5
  28. data/lib/capistrano/data_plane_api/version.rb +2 -2
  29. data/lib/capistrano/data_plane_api.rb +96 -74
  30. data/lib/capistrano-data_plane_api.rb +4 -0
  31. data/rbi/capistrano-data_plane_api.rbi +283 -0
  32. data/sorbet/config +6 -0
  33. data/sorbet/rbi/annotations/.gitattributes +1 -0
  34. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  35. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  36. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  37. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  38. data/sorbet/rbi/dsl/.gitattributes +1 -0
  39. data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration/backend.rbi +50 -0
  40. data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration/server.rbi +24 -0
  41. data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration.rbi +52 -0
  42. data/sorbet/rbi/dsl/capistrano/data_plane_api/type.rbi +12 -0
  43. data/sorbet/rbi/gems/.gitattributes +1 -0
  44. data/sorbet/rbi/gems/addressable@2.8.7.rbi +1994 -0
  45. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  46. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  47. data/sorbet/rbi/gems/bigdecimal@3.1.9.rbi +8 -0
  48. data/sorbet/rbi/gems/booleans@0.1.3.rbi +28 -0
  49. data/sorbet/rbi/gems/byebug@12.0.0.rbi +37 -0
  50. data/sorbet/rbi/gems/crack@1.0.0.rbi +145 -0
  51. data/sorbet/rbi/gems/data_plane_api@0.2.0.rbi +238 -0
  52. data/sorbet/rbi/gems/faraday-net_http@3.4.0.rbi +147 -0
  53. data/sorbet/rbi/gems/faraday@2.13.0.rbi +2974 -0
  54. data/sorbet/rbi/gems/hashdiff@1.1.2.rbi +353 -0
  55. data/sorbet/rbi/gems/json@2.10.2.rbi +2113 -0
  56. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
  57. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  58. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1547 -0
  59. data/sorbet/rbi/gems/net-http@0.6.0.rbi +4247 -0
  60. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  61. data/sorbet/rbi/gems/pastel@0.8.0.rbi +733 -0
  62. data/sorbet/rbi/gems/public_suffix@6.0.1.rbi +936 -0
  63. data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
  64. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +404 -0
  65. data/sorbet/rbi/gems/rake@13.0.6.rbi +3030 -0
  66. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5346 -0
  67. data/sorbet/rbi/gems/rubocop-espago@1.1.8.rbi +9 -0
  68. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  69. data/sorbet/rbi/gems/shale-builder@0.2.4.rbi +9 -0
  70. data/sorbet/rbi/gems/shale@1.2.2.rbi +2323 -0
  71. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +563 -0
  72. data/sorbet/rbi/gems/strings-ansi@0.2.0.rbi +178 -0
  73. data/sorbet/rbi/gems/strings@0.2.1.rbi +830 -0
  74. data/sorbet/rbi/gems/thor@1.2.1.rbi +3957 -0
  75. data/sorbet/rbi/gems/tty-box@0.7.0.rbi +593 -0
  76. data/sorbet/rbi/gems/tty-color@0.6.0.rbi +241 -0
  77. data/sorbet/rbi/gems/tty-cursor@0.7.1.rbi +443 -0
  78. data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +66 -0
  79. data/sorbet/rbi/gems/unicode_utils@1.4.0.rbi +184 -0
  80. data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
  81. data/sorbet/rbi/gems/vcr@6.3.1.rbi +3040 -0
  82. data/sorbet/rbi/gems/webmock@3.25.1.rbi +1792 -0
  83. data/sorbet/rbi/shims/gems/faraday.rbi +21 -0
  84. data/sorbet/rbi/shims/gems/shoulda-context@2.0.0.rbi +15 -0
  85. data/sorbet/rbi/todo.rbi +7 -0
  86. data/sorbet/tapioca/config.yml +28 -0
  87. data/sorbet/tapioca/extensions/load_gem.rb +1 -0
  88. data/sorbet/tapioca/require.rb +4 -0
  89. data/templates/bin/deploy.rb +1 -0
  90. metadata +106 -8
@@ -0,0 +1,353 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `hashdiff` gem.
5
+ # Please instead update this file by running `bin/tapioca gem hashdiff`.
6
+
7
+
8
+ # This module provides methods to diff two hash, patch and unpatch hash
9
+ #
10
+ # source://hashdiff//lib/hashdiff/util.rb#3
11
+ module Hashdiff
12
+ class << self
13
+ # Best diff two objects, which tries to generate the smallest change set using different similarity values.
14
+ #
15
+ # Hashdiff.best_diff is useful in case of comparing two objects which include similar hashes in arrays.
16
+ #
17
+ # @example
18
+ # a = {'x' => [{'a' => 1, 'c' => 3, 'e' => 5}, {'y' => 3}]}
19
+ # b = {'x' => [{'a' => 1, 'b' => 2, 'e' => 5}] }
20
+ # diff = Hashdiff.best_diff(a, b)
21
+ # diff.should == [['-', 'x[0].c', 3], ['+', 'x[0].b', 2], ['-', 'x[1].y', 3], ['-', 'x[1]', {}]]
22
+ # @param obj1 [Array, Hash]
23
+ # @param obj2 [Array, Hash]
24
+ # @param options [Hash] the options to use when comparing
25
+ # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
26
+ # * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s) in either hash
27
+ # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
28
+ # * :delimiter (String) ['.'] the delimiter used when returning nested key references
29
+ # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
30
+ # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
31
+ # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys.
32
+ # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower.
33
+ # @return [Array] an array of changes.
34
+ # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
35
+ # @since 0.0.1
36
+ # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison.
37
+ #
38
+ # source://hashdiff//lib/hashdiff/diff.rb#32
39
+ def best_diff(obj1, obj2, options = T.unsafe(nil), &block); end
40
+
41
+ # check if objects are comparable
42
+ #
43
+ # @private
44
+ # @return [Boolean]
45
+ #
46
+ # source://hashdiff//lib/hashdiff/util.rb#108
47
+ def comparable?(obj1, obj2, strict = T.unsafe(nil)); end
48
+
49
+ # check for equality or "closeness" within given tolerance
50
+ #
51
+ # @private
52
+ #
53
+ # source://hashdiff//lib/hashdiff/util.rb#86
54
+ def compare_values(obj1, obj2, options = T.unsafe(nil)); end
55
+
56
+ # count node differences
57
+ #
58
+ # @private
59
+ #
60
+ # source://hashdiff//lib/hashdiff/util.rb#25
61
+ def count_diff(diffs); end
62
+
63
+ # count total nodes for an object
64
+ #
65
+ # @private
66
+ #
67
+ # source://hashdiff//lib/hashdiff/util.rb#36
68
+ def count_nodes(obj); end
69
+
70
+ # try custom comparison
71
+ #
72
+ # @private
73
+ #
74
+ # source://hashdiff//lib/hashdiff/util.rb#119
75
+ def custom_compare(method, key, obj1, obj2); end
76
+
77
+ # decode property path into an array
78
+ # e.g. "a.b[3].c" => ['a', 'b', 3, 'c']
79
+ #
80
+ # @param path [String] Property-string
81
+ # @param delimiter [String] Property-string delimiter
82
+ # @private
83
+ #
84
+ # source://hashdiff//lib/hashdiff/util.rb#58
85
+ def decode_property_path(path, delimiter = T.unsafe(nil)); end
86
+
87
+ # Compute the diff of two hashes or arrays
88
+ #
89
+ # @example
90
+ # a = {"a" => 1, "b" => {"b1" => 1, "b2" =>2}}
91
+ # b = {"a" => 1, "b" => {}}
92
+ #
93
+ # diff = Hashdiff.diff(a, b)
94
+ # diff.should == [['-', 'b.b1', 1], ['-', 'b.b2', 2]]
95
+ # @param obj1 [Array, Hash]
96
+ # @param obj2 [Array, Hash]
97
+ # @param options [Hash] the options to use when comparing
98
+ # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
99
+ # * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s) in either hash
100
+ # * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
101
+ # * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}.
102
+ # * :delimiter (String) ['.'] the delimiter used when returning nested key references
103
+ # * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
104
+ # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
105
+ # * :array_path (Boolean) [false] whether to return the path references for nested values in an array, can be used for patch compatibility with non string keys.
106
+ # * :use_lcs (Boolean) [true] whether or not to use an implementation of the Longest common subsequence algorithm for comparing arrays, produces better diffs but is slower.
107
+ # @return [Array] an array of changes.
108
+ # e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
109
+ # @since 0.0.1
110
+ # @yield [path, value1, value2] Optional block is used to compare each value, instead of default #==. If the block returns value other than true of false, then other specified comparison options will be used to do the comparison.
111
+ #
112
+ # source://hashdiff//lib/hashdiff/diff.rb#80
113
+ def diff(obj1, obj2, options = T.unsafe(nil), &block); end
114
+
115
+ # diff array using LCS algorithm
116
+ #
117
+ # @private
118
+ # @yield [links]
119
+ #
120
+ # source://hashdiff//lib/hashdiff/diff.rb#124
121
+ def diff_array_lcs(arraya, arrayb, options = T.unsafe(nil)); end
122
+
123
+ # caculate array difference using LCS algorithm
124
+ # http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
125
+ #
126
+ # @private
127
+ #
128
+ # source://hashdiff//lib/hashdiff/lcs.rb#8
129
+ def lcs(arraya, arrayb, options = T.unsafe(nil)); end
130
+
131
+ # get the node of hash by given path parts
132
+ #
133
+ # @private
134
+ #
135
+ # source://hashdiff//lib/hashdiff/util.rb#75
136
+ def node(hash, parts); end
137
+
138
+ # Apply patch to object
139
+ #
140
+ # @param obj [Hash, Array] the object to be patched, can be an Array or a Hash
141
+ # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
142
+ # @param options [Hash] supports following keys:
143
+ # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array
144
+ # @return the object after patch
145
+ # @since 0.0.1
146
+ #
147
+ # source://hashdiff//lib/hashdiff/patch.rb#17
148
+ def patch!(obj, changes, options = T.unsafe(nil)); end
149
+
150
+ # source://hashdiff//lib/hashdiff/util.rb#137
151
+ def prefix_append_array_index(prefix, array_index, opts); end
152
+
153
+ # source://hashdiff//lib/hashdiff/util.rb#129
154
+ def prefix_append_key(prefix, key, opts); end
155
+
156
+ # judge whether two objects are similar
157
+ #
158
+ # @private
159
+ # @return [Boolean]
160
+ #
161
+ # source://hashdiff//lib/hashdiff/util.rb#7
162
+ def similar?(obja, objb, options = T.unsafe(nil)); end
163
+
164
+ # Unpatch an object
165
+ #
166
+ # @param obj [Hash, Array] the object to be unpatched, can be an Array or a Hash
167
+ # @param changes [Array] e.g. [[ '+', 'a.b', '45' ], [ '-', 'a.c', '5' ], [ '~', 'a.x', '45', '63']]
168
+ # @param options [Hash] supports following keys:
169
+ # * :delimiter (String) ['.'] delimiter string for representing nested keys in changes array
170
+ # @return the object after unpatch
171
+ # @since 0.0.1
172
+ #
173
+ # source://hashdiff//lib/hashdiff/patch.rb#58
174
+ def unpatch!(obj, changes, options = T.unsafe(nil)); end
175
+
176
+ private
177
+
178
+ # checks if both objects are Arrays or Hashes
179
+ #
180
+ # @private
181
+ # @return [Boolean]
182
+ #
183
+ # source://hashdiff//lib/hashdiff/util.rb#151
184
+ def any_hash_or_array?(obja, objb); end
185
+ end
186
+ end
187
+
188
+ # Used to compare hashes
189
+ #
190
+ # @private
191
+ #
192
+ # source://hashdiff//lib/hashdiff/compare_hashes.rb#6
193
+ class Hashdiff::CompareHashes
194
+ class << self
195
+ # source://hashdiff//lib/hashdiff/compare_hashes.rb#8
196
+ def call(obj1, obj2, opts = T.unsafe(nil)); end
197
+ end
198
+ end
199
+
200
+ # Used to compare arrays using the lcs algorithm
201
+ #
202
+ # @private
203
+ #
204
+ # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#6
205
+ class Hashdiff::LcsCompareArrays
206
+ class << self
207
+ # source://hashdiff//lib/hashdiff/lcs_compare_arrays.rb#8
208
+ def call(obj1, obj2, opts = T.unsafe(nil)); end
209
+ end
210
+ end
211
+
212
+ # Used to compare arrays in a linear complexity, which produces longer diffs
213
+ # than using the lcs algorithm but is considerably faster
214
+ #
215
+ # @private
216
+ #
217
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#8
218
+ class Hashdiff::LinearCompareArray
219
+ # @return [LinearCompareArray] a new instance of LinearCompareArray
220
+ #
221
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#45
222
+ def initialize(old_array, new_array, options); end
223
+
224
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#14
225
+ def call; end
226
+
227
+ private
228
+
229
+ # Returns the value of attribute additions.
230
+ #
231
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
232
+ def additions; end
233
+
234
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#139
235
+ def append_addition(item, index); end
236
+
237
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#123
238
+ def append_addititions_before_match(match_index); end
239
+
240
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#144
241
+ def append_deletion(item, index); end
242
+
243
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#131
244
+ def append_deletions_before_match(match_index); end
245
+
246
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#149
247
+ def append_differences(difference); end
248
+
249
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#153
250
+ def changes; end
251
+
252
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#67
253
+ def compare_at_index; end
254
+
255
+ # Returns the value of attribute deletions.
256
+ #
257
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
258
+ def deletions; end
259
+
260
+ # Returns the value of attribute differences.
261
+ #
262
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
263
+ def differences; end
264
+
265
+ # Returns the value of attribute expected_additions.
266
+ #
267
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
268
+ def expected_additions; end
269
+
270
+ # Sets the attribute expected_additions
271
+ #
272
+ # @param value the value to set the attribute expected_additions to.
273
+ #
274
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
275
+ def expected_additions=(_arg0); end
276
+
277
+ # @return [Boolean]
278
+ #
279
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#59
280
+ def extra_items_in_new_array?; end
281
+
282
+ # @return [Boolean]
283
+ #
284
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#55
285
+ def extra_items_in_old_array?; end
286
+
287
+ # look ahead in the new array to see if the current item appears later
288
+ # thereby having new items added
289
+ #
290
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#89
291
+ def index_of_match_after_additions; end
292
+
293
+ # look ahead in the old array to see if the current item appears later
294
+ # thereby having items removed
295
+ #
296
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#107
297
+ def index_of_match_after_deletions; end
298
+
299
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#82
300
+ def item_difference(old_item, new_item, item_index); end
301
+
302
+ # @return [Boolean]
303
+ #
304
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#63
305
+ def iterated_through_both_arrays?; end
306
+
307
+ # Returns the value of attribute new_array.
308
+ #
309
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
310
+ def new_array; end
311
+
312
+ # Returns the value of attribute new_index.
313
+ #
314
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
315
+ def new_index; end
316
+
317
+ # Sets the attribute new_index
318
+ #
319
+ # @param value the value to set the attribute new_index to.
320
+ #
321
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
322
+ def new_index=(_arg0); end
323
+
324
+ # Returns the value of attribute old_array.
325
+ #
326
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
327
+ def old_array; end
328
+
329
+ # Returns the value of attribute old_index.
330
+ #
331
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
332
+ def old_index; end
333
+
334
+ # Sets the attribute old_index
335
+ #
336
+ # @param value the value to set the attribute old_index to.
337
+ #
338
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#43
339
+ def old_index=(_arg0); end
340
+
341
+ # Returns the value of attribute options.
342
+ #
343
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#42
344
+ def options; end
345
+
346
+ class << self
347
+ # source://hashdiff//lib/hashdiff/linear_compare_array.rb#9
348
+ def call(old_array, new_array, options = T.unsafe(nil)); end
349
+ end
350
+ end
351
+
352
+ # source://hashdiff//lib/hashdiff/version.rb#4
353
+ Hashdiff::VERSION = T.let(T.unsafe(nil), String)