checkoff 0.201.0 → 0.203.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +130 -28
- data/.git-hooks/pre_commit/solargraph_typecheck.rb +12 -11
- data/.overcommit.yml +27 -2
- data/.rubocop.yml +20 -2
- data/.rubocop_todo.yml +90 -0
- data/.solargraph.yml +10 -1
- data/DEVELOPMENT.md +1 -1
- data/Gemfile +11 -8
- data/Gemfile.lock +66 -42
- data/LICENSE +1 -1
- data/Makefile +14 -12
- data/bin/brakeman +27 -0
- data/bin/overcommit_branch +117 -0
- data/bin/spoom +27 -0
- data/bin/srb +27 -0
- data/bin/srb-rbi +27 -0
- data/bin/tapioca +27 -0
- data/config/annotations_misc.rb +35 -0
- data/docs/cookiecutter_input.json +1 -0
- data/fix.sh +14 -6
- data/lib/checkoff/internal/search_url/simple_param_converter.rb +11 -0
- data/lib/checkoff/version.rb +1 -1
- data/requirements_dev.txt +1 -1
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/activesupport.rbi +453 -0
- data/sorbet/rbi/annotations/faraday.rbi +17 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/mocha.rbi +34 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/annotations/webmock.rbi +9 -0
- data/sorbet/rbi/dsl/.gitattributes +1 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18749 -0
- data/sorbet/rbi/gems/addressable@2.8.6.rbi +1994 -0
- data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
- data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +6142 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
- data/sorbet/rbi/gems/backport@1.2.0.rbi +523 -0
- data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +78 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +505 -0
- data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
- data/sorbet/rbi/gems/cache@0.4.1.rbi +211 -0
- data/sorbet/rbi/gems/cache_method@0.2.7.rbi +293 -0
- data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +9 -0
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +383 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11591 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
- data/sorbet/rbi/gems/crack@0.4.5.rbi +145 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +969 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
- data/sorbet/rbi/gems/drb@2.2.0.rbi +1347 -0
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +9 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +152 -0
- data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +222 -0
- data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +126 -0
- data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +136 -0
- data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +145 -0
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +259 -0
- data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +142 -0
- data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +118 -0
- data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +125 -0
- data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +133 -0
- data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +198 -0
- data/sorbet/rbi/gems/faraday@1.10.3.rbi +2729 -0
- data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +29 -0
- data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +1004 -0
- data/sorbet/rbi/gems/gli@2.21.1.rbi +9 -0
- data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +351 -0
- data/sorbet/rbi/gems/i18n@1.14.1.rbi +2326 -0
- data/sorbet/rbi/gems/imagen@0.1.8.rbi +340 -0
- data/sorbet/rbi/gems/iniparse@1.5.0.rbi +899 -0
- data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +22 -0
- data/sorbet/rbi/gems/json@2.7.1.rbi +1562 -0
- data/sorbet/rbi/gems/jwt@2.7.1.rbi +1405 -0
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +128 -0
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3272 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
- data/sorbet/rbi/gems/mdl@0.13.0.rbi +445 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +273 -0
- data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +127 -0
- data/sorbet/rbi/gems/mime-types@3.5.1.rbi +1252 -0
- data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +136 -0
- data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1014 -0
- data/sorbet/rbi/gems/minitest@5.21.1.rbi +1539 -0
- data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +314 -0
- data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +581 -0
- data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +629 -0
- data/sorbet/rbi/gems/mocha@2.1.0.rbi +12 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
- data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +102 -0
- data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +234 -0
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +94 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
- data/sorbet/rbi/gems/oauth2@1.4.11.rbi +833 -0
- data/sorbet/rbi/gems/ostruct@0.6.1.rbi +354 -0
- data/sorbet/rbi/gems/overcommit@0.64.0.rbi +2400 -0
- data/sorbet/rbi/gems/parallel@1.23.0.rbi +274 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
- data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10070 -0
- data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +936 -0
- data/sorbet/rbi/gems/punchlist@1.3.2.rbi +173 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
- data/sorbet/rbi/gems/rack@3.0.8.rbi +5184 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3022 -0
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
- data/sorbet/rbi/gems/rbs@2.8.4.rbi +5613 -0
- data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3750 -0
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +390 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4888 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7061 -0
- data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2577 -0
- data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +3262 -0
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
- data/sorbet/rbi/gems/rubocop@1.59.0.rbi +57238 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
- data/sorbet/rbi/gems/rugged@1.6.3.rbi +1577 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
- data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +256 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
- data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +9396 -0
- data/sorbet/rbi/gems/source_finder@3.2.1.rbi +317 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/tapioca@0.16.4.rbi +3604 -0
- data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
- data/sorbet/rbi/gems/tilt@2.4.0.rbi +933 -0
- data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +9 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
- data/sorbet/rbi/gems/undercover@0.5.0.rbi +433 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
- data/sorbet/rbi/gems/webmock@3.19.1.rbi +1769 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18247 -0
- data/sorbet/rbi/todo.rbi +11 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +134 -3
@@ -0,0 +1,523 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `backport` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem backport`.
|
6
|
+
|
7
|
+
|
8
|
+
# An event-driven IO library.
|
9
|
+
#
|
10
|
+
# source://backport//lib/backport/version.rb#1
|
11
|
+
module Backport
|
12
|
+
class << self
|
13
|
+
# @return [Logger]
|
14
|
+
#
|
15
|
+
# source://backport//lib/backport.rb#75
|
16
|
+
def logger; end
|
17
|
+
|
18
|
+
# Prepare an interval server to run in Backport.
|
19
|
+
#
|
20
|
+
# @param period [Float] Seconds between intervals
|
21
|
+
# @return [void]
|
22
|
+
#
|
23
|
+
# source://backport//lib/backport.rb#35
|
24
|
+
def prepare_interval(period, &block); end
|
25
|
+
|
26
|
+
# Prepare a STDIO server to run in Backport.
|
27
|
+
#
|
28
|
+
# @param adapter [Adapter]
|
29
|
+
# @return [void]
|
30
|
+
#
|
31
|
+
# source://backport//lib/backport.rb#17
|
32
|
+
def prepare_stdio_server(adapter: T.unsafe(nil)); end
|
33
|
+
|
34
|
+
# Prepare a TCP server to run in Backport.
|
35
|
+
#
|
36
|
+
# @param host [String]
|
37
|
+
# @param port [Integer]
|
38
|
+
# @param adapter [Adapter]
|
39
|
+
# @return [void]
|
40
|
+
#
|
41
|
+
# source://backport//lib/backport.rb#27
|
42
|
+
def prepare_tcp_server(host: T.unsafe(nil), port: T.unsafe(nil), adapter: T.unsafe(nil)); end
|
43
|
+
|
44
|
+
# Run the Backport machine. The provided block will be executed before the
|
45
|
+
# machine starts. Program execution is blocked until the machine stops.
|
46
|
+
#
|
47
|
+
# @example Print "tick" once per second
|
48
|
+
# Backport.run do
|
49
|
+
# Backport.prepare_interval 1 do
|
50
|
+
# puts "tick"
|
51
|
+
# end
|
52
|
+
# end
|
53
|
+
# @return [void]
|
54
|
+
#
|
55
|
+
# source://backport//lib/backport.rb#50
|
56
|
+
def run(&block); end
|
57
|
+
|
58
|
+
# Stop all running Backport machines.
|
59
|
+
#
|
60
|
+
# For more accurate control, consider stopping the machine
|
61
|
+
# from the self reference in Machine#run, e.g.:
|
62
|
+
#
|
63
|
+
# ```
|
64
|
+
# Backport.run do |machine|
|
65
|
+
# # ...
|
66
|
+
# machine.stop
|
67
|
+
# end
|
68
|
+
# ```
|
69
|
+
#
|
70
|
+
# @return [void]
|
71
|
+
#
|
72
|
+
# source://backport//lib/backport.rb#70
|
73
|
+
def stop; end
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
# @return [Array<Machine>]
|
78
|
+
#
|
79
|
+
# source://backport//lib/backport.rb#82
|
80
|
+
def machines; end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# The application interface between Backport servers and clients.
|
85
|
+
#
|
86
|
+
# source://backport//lib/backport/adapter.rb#4
|
87
|
+
class Backport::Adapter
|
88
|
+
# @param output [IO]
|
89
|
+
# @param remote [Hash{Symbol => String, Integer}]
|
90
|
+
# @return [Adapter] a new instance of Adapter
|
91
|
+
#
|
92
|
+
# source://backport//lib/backport/adapter.rb#7
|
93
|
+
def initialize(output, remote = T.unsafe(nil)); end
|
94
|
+
|
95
|
+
# Close the client connection.
|
96
|
+
#
|
97
|
+
# @note The adapter sets #closed? to true and runs the #closing callback.
|
98
|
+
# The server is responsible for implementation details like closing the
|
99
|
+
# client's socket.
|
100
|
+
# @return [void]
|
101
|
+
#
|
102
|
+
# source://backport//lib/backport/adapter.rb#80
|
103
|
+
def close; end
|
104
|
+
|
105
|
+
# @return [Boolean]
|
106
|
+
#
|
107
|
+
# source://backport//lib/backport/adapter.rb#69
|
108
|
+
def closed?; end
|
109
|
+
|
110
|
+
# A callback triggered when a client connection is closing. Subclasses
|
111
|
+
# and/or modules should override this method to provide their own
|
112
|
+
# functionality.
|
113
|
+
#
|
114
|
+
# @return [void]
|
115
|
+
#
|
116
|
+
# source://backport//lib/backport/adapter.rb#41
|
117
|
+
def closing; end
|
118
|
+
|
119
|
+
# A callback triggered when a client connection is opening. Subclasses
|
120
|
+
# and/or modules should override this method to provide their own
|
121
|
+
# functionality.
|
122
|
+
#
|
123
|
+
# @return [void]
|
124
|
+
#
|
125
|
+
# source://backport//lib/backport/adapter.rb#34
|
126
|
+
def opening; end
|
127
|
+
|
128
|
+
# A callback triggered when the server receives data from the client.
|
129
|
+
# Subclasses and/or modules should override this method to provide their
|
130
|
+
# own functionality.
|
131
|
+
#
|
132
|
+
# @param data [String]
|
133
|
+
# @return [void]
|
134
|
+
#
|
135
|
+
# source://backport//lib/backport/adapter.rb#49
|
136
|
+
def receiving(data); end
|
137
|
+
|
138
|
+
# A hash of information about the client connection. The data can vary
|
139
|
+
# based on the transport, e.g., :hostname and :address for TCP connections
|
140
|
+
# or :filename for file streams.
|
141
|
+
#
|
142
|
+
# @return [Hash{Symbol => String, Integer}]
|
143
|
+
#
|
144
|
+
# source://backport//lib/backport/adapter.rb#25
|
145
|
+
def remote; end
|
146
|
+
|
147
|
+
# Send data to the client.
|
148
|
+
#
|
149
|
+
# @param data [String]
|
150
|
+
# @return [void]
|
151
|
+
#
|
152
|
+
# source://backport//lib/backport/adapter.rb#55
|
153
|
+
def write(data); end
|
154
|
+
|
155
|
+
# Send a line of data to the client.
|
156
|
+
#
|
157
|
+
# @param data [String]
|
158
|
+
# @return [void]
|
159
|
+
#
|
160
|
+
# source://backport//lib/backport/adapter.rb#64
|
161
|
+
def write_line(data); end
|
162
|
+
end
|
163
|
+
|
164
|
+
# A client connected to a connectable Backport server.
|
165
|
+
#
|
166
|
+
# source://backport//lib/backport/client.rb#6
|
167
|
+
class Backport::Client
|
168
|
+
include ::Observable
|
169
|
+
|
170
|
+
# @param input [IO]
|
171
|
+
# @param output [IO]
|
172
|
+
# @param adapter [Class, Module]
|
173
|
+
# @param remote [Hash]
|
174
|
+
# @return [Client] a new instance of Client
|
175
|
+
#
|
176
|
+
# source://backport//lib/backport/client.rb#16
|
177
|
+
def initialize(input, output, adapter, remote = T.unsafe(nil)); end
|
178
|
+
|
179
|
+
# @return [Adapter]
|
180
|
+
#
|
181
|
+
# source://backport//lib/backport/client.rb#10
|
182
|
+
def adapter; end
|
183
|
+
|
184
|
+
# Start running the client. This method will start the thread that reads
|
185
|
+
# client input from IO.
|
186
|
+
#
|
187
|
+
# @deprecated Prefer #start to #run for non-blocking client/server methods
|
188
|
+
# @return [void]
|
189
|
+
#
|
190
|
+
# source://backport//lib/backport/client.rb#50
|
191
|
+
def run; end
|
192
|
+
|
193
|
+
# Start running the client. This method will start the thread that reads
|
194
|
+
# client input from IO.
|
195
|
+
#
|
196
|
+
# @return [void]
|
197
|
+
#
|
198
|
+
# source://backport//lib/backport/client.rb#50
|
199
|
+
def start; end
|
200
|
+
|
201
|
+
# Close the client connection.
|
202
|
+
#
|
203
|
+
# callback. The server is responsible for implementation details like
|
204
|
+
# closing the client's socket.
|
205
|
+
#
|
206
|
+
# @note The client sets #stopped? to true and runs the adapter's #closing
|
207
|
+
# @return [void]
|
208
|
+
#
|
209
|
+
# source://backport//lib/backport/client.rb#38
|
210
|
+
def stop; end
|
211
|
+
|
212
|
+
# True if the client is stopped.
|
213
|
+
#
|
214
|
+
# @return [Boolean]
|
215
|
+
#
|
216
|
+
# source://backport//lib/backport/client.rb#27
|
217
|
+
def stopped?; end
|
218
|
+
|
219
|
+
# Handle a tick from the server. This method will check for client input
|
220
|
+
# and update the adapter accordingly, or stop the client if the adapter is
|
221
|
+
# closed.
|
222
|
+
#
|
223
|
+
# @return [void]
|
224
|
+
#
|
225
|
+
# source://backport//lib/backport/client.rb#64
|
226
|
+
def tick; end
|
227
|
+
|
228
|
+
private
|
229
|
+
|
230
|
+
# @param mod_cls [Module, Class] The Adapter module or class
|
231
|
+
# @param remote [Hash] Remote client data
|
232
|
+
# @return [Adapter]
|
233
|
+
#
|
234
|
+
# source://backport//lib/backport/client.rb#86
|
235
|
+
def make_adapter(mod_cls, remote); end
|
236
|
+
|
237
|
+
# @return [Mutex]
|
238
|
+
#
|
239
|
+
# source://backport//lib/backport/client.rb#98
|
240
|
+
def mutex; end
|
241
|
+
|
242
|
+
# Read the client input. Return nil if the input buffer is empty.
|
243
|
+
#
|
244
|
+
# @return [String, nil]
|
245
|
+
#
|
246
|
+
# source://backport//lib/backport/client.rb#74
|
247
|
+
def read; end
|
248
|
+
|
249
|
+
# Read input from the client.
|
250
|
+
#
|
251
|
+
# @return [void]
|
252
|
+
#
|
253
|
+
# source://backport//lib/backport/client.rb#112
|
254
|
+
def read_input; end
|
255
|
+
|
256
|
+
# Start the thread that checks the input IO for client data.
|
257
|
+
#
|
258
|
+
# @return [void]
|
259
|
+
#
|
260
|
+
# source://backport//lib/backport/client.rb#103
|
261
|
+
def run_input_thread; end
|
262
|
+
end
|
263
|
+
|
264
|
+
# The Backport server controller.
|
265
|
+
#
|
266
|
+
# source://backport//lib/backport/machine.rb#4
|
267
|
+
class Backport::Machine
|
268
|
+
# @return [Machine] a new instance of Machine
|
269
|
+
#
|
270
|
+
# source://backport//lib/backport/machine.rb#5
|
271
|
+
def initialize; end
|
272
|
+
|
273
|
+
# Add a server to the machine. The server will be started when the machine
|
274
|
+
# starts. If the machine is already running, the server will be started
|
275
|
+
# immediately.
|
276
|
+
#
|
277
|
+
# @param server [Server::Base]
|
278
|
+
# @return [void]
|
279
|
+
#
|
280
|
+
# source://backport//lib/backport/machine.rb#45
|
281
|
+
def prepare(server); end
|
282
|
+
|
283
|
+
# Run the machine. If a block is provided, it gets executed before the
|
284
|
+
# maching starts its main loop. The main loop blocks program execution
|
285
|
+
# until the machine is stopped.
|
286
|
+
#
|
287
|
+
# @return [void]
|
288
|
+
# @yieldparam [self]
|
289
|
+
#
|
290
|
+
# source://backport//lib/backport/machine.rb#16
|
291
|
+
def run; end
|
292
|
+
|
293
|
+
# @return [Array<Server::Base>]
|
294
|
+
#
|
295
|
+
# source://backport//lib/backport/machine.rb#52
|
296
|
+
def servers; end
|
297
|
+
|
298
|
+
# Stop the machine.
|
299
|
+
#
|
300
|
+
# @return [void]
|
301
|
+
#
|
302
|
+
# source://backport//lib/backport/machine.rb#27
|
303
|
+
def stop; end
|
304
|
+
|
305
|
+
# True if the machine is stopped.
|
306
|
+
#
|
307
|
+
# @return [Boolean]
|
308
|
+
#
|
309
|
+
# source://backport//lib/backport/machine.rb#35
|
310
|
+
def stopped?; end
|
311
|
+
|
312
|
+
# @param server [Server::Base]
|
313
|
+
# @return [void]
|
314
|
+
#
|
315
|
+
# source://backport//lib/backport/machine.rb#58
|
316
|
+
def update(server); end
|
317
|
+
|
318
|
+
private
|
319
|
+
|
320
|
+
# @return [Mutex]
|
321
|
+
#
|
322
|
+
# source://backport//lib/backport/machine.rb#70
|
323
|
+
def mutex; end
|
324
|
+
|
325
|
+
# Start the thread that updates servers via the #tick method.
|
326
|
+
#
|
327
|
+
# @return [void]
|
328
|
+
#
|
329
|
+
# source://backport//lib/backport/machine.rb#75
|
330
|
+
def run_server_thread; end
|
331
|
+
end
|
332
|
+
|
333
|
+
# Classes and modules for Backport servers.
|
334
|
+
#
|
335
|
+
# source://backport//lib/backport/server.rb#4
|
336
|
+
module Backport::Server; end
|
337
|
+
|
338
|
+
# An extendable server class that provides basic start/stop functionality
|
339
|
+
# and common callbacks.
|
340
|
+
#
|
341
|
+
# source://backport//lib/backport/server/base.rb#8
|
342
|
+
class Backport::Server::Base
|
343
|
+
include ::Observable
|
344
|
+
|
345
|
+
# Start the server.
|
346
|
+
#
|
347
|
+
# @return [void]
|
348
|
+
#
|
349
|
+
# source://backport//lib/backport/server/base.rb#14
|
350
|
+
def start; end
|
351
|
+
|
352
|
+
# @return [Boolean]
|
353
|
+
#
|
354
|
+
# source://backport//lib/backport/server/base.rb#31
|
355
|
+
def started?; end
|
356
|
+
|
357
|
+
# A callback triggered when a Machine starts running or the server is
|
358
|
+
# added to a running machine. Subclasses should override this method to
|
359
|
+
# provide their own functionality.
|
360
|
+
#
|
361
|
+
# @return [void]
|
362
|
+
#
|
363
|
+
# source://backport//lib/backport/server/base.rb#44
|
364
|
+
def starting; end
|
365
|
+
|
366
|
+
# Stop the server.
|
367
|
+
#
|
368
|
+
# @return [void]
|
369
|
+
#
|
370
|
+
# source://backport//lib/backport/server/base.rb#23
|
371
|
+
def stop; end
|
372
|
+
|
373
|
+
# @return [Boolean]
|
374
|
+
#
|
375
|
+
# source://backport//lib/backport/server/base.rb#35
|
376
|
+
def stopped?; end
|
377
|
+
|
378
|
+
# A callback triggered when the server is stopping. Subclasses should
|
379
|
+
# override this method to provide their own functionality.
|
380
|
+
#
|
381
|
+
# @return [void]
|
382
|
+
#
|
383
|
+
# source://backport//lib/backport/server/base.rb#50
|
384
|
+
def stopping; end
|
385
|
+
|
386
|
+
# A callback triggered from the main loop of a running Machine.
|
387
|
+
# Subclasses should override this method to provide their own
|
388
|
+
# functionality.
|
389
|
+
#
|
390
|
+
# @return [void]
|
391
|
+
#
|
392
|
+
# source://backport//lib/backport/server/base.rb#57
|
393
|
+
def tick; end
|
394
|
+
end
|
395
|
+
|
396
|
+
# A mixin for Backport servers that communicate with clients.
|
397
|
+
#
|
398
|
+
# Connectable servers check clients for incoming data on each tick.
|
399
|
+
#
|
400
|
+
# source://backport//lib/backport/server/connectable.rb#7
|
401
|
+
module Backport::Server::Connectable
|
402
|
+
# @return [Array<Client>]
|
403
|
+
#
|
404
|
+
# source://backport//lib/backport/server/connectable.rb#19
|
405
|
+
def clients; end
|
406
|
+
|
407
|
+
# @return [void]
|
408
|
+
#
|
409
|
+
# source://backport//lib/backport/server/connectable.rb#9
|
410
|
+
def starting; end
|
411
|
+
|
412
|
+
# @return [void]
|
413
|
+
#
|
414
|
+
# source://backport//lib/backport/server/connectable.rb#14
|
415
|
+
def stopping; end
|
416
|
+
|
417
|
+
private
|
418
|
+
|
419
|
+
# @return [Mutex]
|
420
|
+
#
|
421
|
+
# source://backport//lib/backport/server/connectable.rb#26
|
422
|
+
def mutex; end
|
423
|
+
end
|
424
|
+
|
425
|
+
# A Backport periodical interval server.
|
426
|
+
#
|
427
|
+
# source://backport//lib/backport/server/interval.rb#8
|
428
|
+
class Backport::Server::Interval < ::Backport::Server::Base
|
429
|
+
# @param period [Float] The interval time in seconds.
|
430
|
+
# @param block [Proc] The proc to run on each interval.
|
431
|
+
# @return [Interval] a new instance of Interval
|
432
|
+
# @yieldparam [Interval]
|
433
|
+
#
|
434
|
+
# source://backport//lib/backport/server/interval.rb#9
|
435
|
+
def initialize(period, &block); end
|
436
|
+
|
437
|
+
# source://backport//lib/backport/server/interval.rb#16
|
438
|
+
def starting; end
|
439
|
+
|
440
|
+
# source://backport//lib/backport/server/interval.rb#21
|
441
|
+
def tick; end
|
442
|
+
|
443
|
+
private
|
444
|
+
|
445
|
+
# @return [void]
|
446
|
+
#
|
447
|
+
# source://backport//lib/backport/server/interval.rb#32
|
448
|
+
def run_ready_thread; end
|
449
|
+
end
|
450
|
+
|
451
|
+
# A Backport STDIO server.
|
452
|
+
#
|
453
|
+
# source://backport//lib/backport/server/stdio.rb#5
|
454
|
+
class Backport::Server::Stdio < ::Backport::Server::Base
|
455
|
+
include ::Backport::Server::Connectable
|
456
|
+
|
457
|
+
# @param input [IO]
|
458
|
+
# @param output [IO]
|
459
|
+
# @param adapter [Module, Class]
|
460
|
+
# @return [Stdio] a new instance of Stdio
|
461
|
+
#
|
462
|
+
# source://backport//lib/backport/server/stdio.rb#11
|
463
|
+
def initialize(input: T.unsafe(nil), output: T.unsafe(nil), adapter: T.unsafe(nil)); end
|
464
|
+
|
465
|
+
# @param client [Client]
|
466
|
+
# @return [void]
|
467
|
+
#
|
468
|
+
# source://backport//lib/backport/server/stdio.rb#22
|
469
|
+
def update(client); end
|
470
|
+
end
|
471
|
+
|
472
|
+
# A Backport TCP server. It runs a thread to accept incoming connections
|
473
|
+
# and automatically stops when the socket is closed.
|
474
|
+
#
|
475
|
+
# source://backport//lib/backport/server/tcpip.rb#8
|
476
|
+
class Backport::Server::Tcpip < ::Backport::Server::Base
|
477
|
+
include ::Backport::Server::Connectable
|
478
|
+
|
479
|
+
# @param host [String]
|
480
|
+
# @param port [Integer]
|
481
|
+
# @param adapter [Module, Class]
|
482
|
+
# @param socket_class [Class]
|
483
|
+
# @return [Tcpip] a new instance of Tcpip
|
484
|
+
#
|
485
|
+
# source://backport//lib/backport/server/tcpip.rb#15
|
486
|
+
def initialize(host: T.unsafe(nil), port: T.unsafe(nil), adapter: T.unsafe(nil), socket_class: T.unsafe(nil)); end
|
487
|
+
|
488
|
+
# Accept an incoming connection using accept_nonblock. Return the
|
489
|
+
# resulting Client if a connection was accepted or nil if no connections
|
490
|
+
# are pending.
|
491
|
+
#
|
492
|
+
# @return [Client, nil]
|
493
|
+
#
|
494
|
+
# source://backport//lib/backport/server/tcpip.rb#41
|
495
|
+
def accept; end
|
496
|
+
|
497
|
+
# source://backport//lib/backport/server/tcpip.rb#21
|
498
|
+
def starting; end
|
499
|
+
|
500
|
+
# source://backport//lib/backport/server/tcpip.rb#25
|
501
|
+
def stopping; end
|
502
|
+
|
503
|
+
# @param client [Client]
|
504
|
+
# @return [void]
|
505
|
+
#
|
506
|
+
# source://backport//lib/backport/server/tcpip.rb#78
|
507
|
+
def update(client); end
|
508
|
+
|
509
|
+
private
|
510
|
+
|
511
|
+
# @return [TCPSocket]
|
512
|
+
#
|
513
|
+
# source://backport//lib/backport/server/tcpip.rb#89
|
514
|
+
def socket; end
|
515
|
+
|
516
|
+
# @return [void]
|
517
|
+
#
|
518
|
+
# source://backport//lib/backport/server/tcpip.rb#92
|
519
|
+
def start_accept_thread; end
|
520
|
+
end
|
521
|
+
|
522
|
+
# source://backport//lib/backport/version.rb#2
|
523
|
+
Backport::VERSION = T.let(T.unsafe(nil), String)
|