playoffs 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +2 -0
  3. data/.editorconfig +8 -0
  4. data/.github/workflows/ci.yaml +29 -0
  5. data/.gitignore +8 -0
  6. data/.rubocop.yml +34 -0
  7. data/.tool-versions +1 -0
  8. data/.vscode/settings.json +5 -0
  9. data/CHANGELOG.md +3 -0
  10. data/CODE_OF_CONDUCT.md +73 -0
  11. data/Gemfile +5 -0
  12. data/Guardfile +17 -0
  13. data/LICENSE +5 -0
  14. data/README.md +245 -0
  15. data/Rakefile +11 -0
  16. data/bin/_guard-core +27 -0
  17. data/bin/bundle +109 -0
  18. data/bin/bundle-audit +27 -0
  19. data/bin/bundler-audit +27 -0
  20. data/bin/coderay +27 -0
  21. data/bin/console +11 -0
  22. data/bin/guard +27 -0
  23. data/bin/htmldiff +27 -0
  24. data/bin/ldiff +27 -0
  25. data/bin/listen +27 -0
  26. data/bin/playoffs +27 -0
  27. data/bin/pry +27 -0
  28. data/bin/racc +27 -0
  29. data/bin/rake +27 -0
  30. data/bin/rspec +27 -0
  31. data/bin/rubocop +27 -0
  32. data/bin/ruby-parse +27 -0
  33. data/bin/ruby-rewrite +27 -0
  34. data/bin/spoom +27 -0
  35. data/bin/srb +27 -0
  36. data/bin/srb-rbi +27 -0
  37. data/bin/tapioca +27 -0
  38. data/bin/thor +27 -0
  39. data/bin/yard +27 -0
  40. data/bin/yardoc +27 -0
  41. data/bin/yri +27 -0
  42. data/exe/playoffs +7 -0
  43. data/lib/playoffs/basketball.rb +120 -0
  44. data/lib/playoffs/best_of.rb +38 -0
  45. data/lib/playoffs/cli.rb +201 -0
  46. data/lib/playoffs/contestant.rb +8 -0
  47. data/lib/playoffs/round.rb +42 -0
  48. data/lib/playoffs/series.rb +167 -0
  49. data/lib/playoffs/team.rb +7 -0
  50. data/lib/playoffs/tournament/bracketable.rb +93 -0
  51. data/lib/playoffs/tournament/roundable.rb +53 -0
  52. data/lib/playoffs/tournament.rb +61 -0
  53. data/lib/playoffs/version.rb +6 -0
  54. data/lib/playoffs.rb +26 -0
  55. data/playoffs.gemspec +49 -0
  56. data/sorbet/config +4 -0
  57. data/sorbet/rbi/annotations/.gitattributes +1 -0
  58. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  59. data/sorbet/rbi/gems/.gitattributes +1 -0
  60. data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
  61. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  62. data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +309 -0
  63. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  64. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1131 -0
  65. data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
  66. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  67. data/sorbet/rbi/gems/ffi@1.16.3.rbi +9 -0
  68. data/sorbet/rbi/gems/formatador@1.1.0.rbi +9 -0
  69. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +67 -0
  70. data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +563 -0
  71. data/sorbet/rbi/gems/guard@2.18.1.rbi +9 -0
  72. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  73. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  74. data/sorbet/rbi/gems/listen@3.9.0.rbi +9 -0
  75. data/sorbet/rbi/gems/lumberjack@1.2.10.rbi +9 -0
  76. data/sorbet/rbi/gems/method_source@1.1.0.rbi +304 -0
  77. data/sorbet/rbi/gems/nenv@0.3.0.rbi +9 -0
  78. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  79. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +9 -0
  80. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  81. data/sorbet/rbi/gems/parser@3.3.1.0.rbi +7238 -0
  82. data/sorbet/rbi/gems/primitive@1.0.0.rbi +58 -0
  83. data/sorbet/rbi/gems/prism@0.29.0.rbi +37987 -0
  84. data/sorbet/rbi/gems/pry@0.14.2.rbi +10069 -0
  85. data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
  86. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  87. data/sorbet/rbi/gems/rake@13.2.1.rbi +3028 -0
  88. data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +9 -0
  89. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +9 -0
  90. data/sorbet/rbi/gems/rbi@0.1.13.rbi +3078 -0
  91. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  92. data/sorbet/rbi/gems/rexml@3.2.8.rbi +4794 -0
  93. data/sorbet/rbi/gems/rspec-core@3.13.0.rbi +10874 -0
  94. data/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi +8154 -0
  95. data/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +5341 -0
  96. data/sorbet/rbi/gems/rspec-support@3.13.1.rbi +1630 -0
  97. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  98. data/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +7159 -0
  99. data/sorbet/rbi/gems/rubocop-capybara@2.20.0.rbi +1208 -0
  100. data/sorbet/rbi/gems/rubocop-factory_bot@2.25.1.rbi +928 -0
  101. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  102. data/sorbet/rbi/gems/rubocop-rspec@2.29.2.rbi +8247 -0
  103. data/sorbet/rbi/gems/rubocop-rspec_rails@2.28.3.rbi +911 -0
  104. data/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi +1607 -0
  105. data/sorbet/rbi/gems/rubocop@1.63.5.rbi +57788 -0
  106. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  107. data/sorbet/rbi/gems/shellany@0.0.1.rbi +9 -0
  108. data/sorbet/rbi/gems/simplecov-console@0.9.1.rbi +103 -0
  109. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
  110. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  111. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  112. data/sorbet/rbi/gems/sorbet-runtime-stub@0.2.0.rbi +8 -0
  113. data/sorbet/rbi/gems/spoom@1.3.2.rbi +4420 -0
  114. data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
  115. data/sorbet/rbi/gems/tapioca@0.14.2.rbi +3539 -0
  116. data/sorbet/rbi/gems/terminal-table@3.0.2.rbi +9 -0
  117. data/sorbet/rbi/gems/thor@1.3.1.rbi +4318 -0
  118. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  119. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  120. data/sorbet/rbi/gems/yard@0.9.36.rbi +18085 -0
  121. data/sorbet/tapioca/config.yml +13 -0
  122. data/sorbet/tapioca/require.rb +4 -0
  123. metadata +383 -0
@@ -0,0 +1,280 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `parallel` gem.
5
+ # Please instead update this file by running `bin/tapioca gem parallel`.
6
+
7
+ # source://parallel//lib/parallel/version.rb#2
8
+ module Parallel
9
+ class << self
10
+ # @return [Boolean]
11
+ #
12
+ # source://parallel//lib/parallel.rb#243
13
+ def all?(*args, &block); end
14
+
15
+ # @return [Boolean]
16
+ #
17
+ # source://parallel//lib/parallel.rb#238
18
+ def any?(*args, &block); end
19
+
20
+ # source://parallel//lib/parallel.rb#234
21
+ def each(array, options = T.unsafe(nil), &block); end
22
+
23
+ # source://parallel//lib/parallel.rb#248
24
+ def each_with_index(array, options = T.unsafe(nil), &block); end
25
+
26
+ # source://parallel//lib/parallel.rb#307
27
+ def filter_map(*args, &block); end
28
+
29
+ # source://parallel//lib/parallel.rb#303
30
+ def flat_map(*args, &block); end
31
+
32
+ # source://parallel//lib/parallel.rb#228
33
+ def in_processes(options = T.unsafe(nil), &block); end
34
+
35
+ # source://parallel//lib/parallel.rb#212
36
+ def in_threads(options = T.unsafe(nil)); end
37
+
38
+ # source://parallel//lib/parallel.rb#252
39
+ def map(source, options = T.unsafe(nil), &block); end
40
+
41
+ # source://parallel//lib/parallel.rb#299
42
+ def map_with_index(array, options = T.unsafe(nil), &block); end
43
+
44
+ # Number of physical processor cores on the current system.
45
+ #
46
+ # source://parallel//lib/parallel.rb#312
47
+ def physical_processor_count; end
48
+
49
+ # Number of processors seen by the OS, used for process scheduling
50
+ #
51
+ # source://parallel//lib/parallel.rb#345
52
+ def processor_count; end
53
+
54
+ # source://parallel//lib/parallel.rb#350
55
+ def worker_number; end
56
+
57
+ # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed
58
+ #
59
+ # source://parallel//lib/parallel.rb#355
60
+ def worker_number=(worker_num); end
61
+
62
+ private
63
+
64
+ # source://parallel//lib/parallel.rb#361
65
+ def add_progress_bar!(job_factory, options); end
66
+
67
+ # source://parallel//lib/parallel.rb#624
68
+ def call_with_index(item, index, options, &block); end
69
+
70
+ # source://parallel//lib/parallel.rb#556
71
+ def create_workers(job_factory, options, &block); end
72
+
73
+ # options is either a Integer or a Hash with :count
74
+ #
75
+ # source://parallel//lib/parallel.rb#614
76
+ def extract_count_from_options(options); end
77
+
78
+ # source://parallel//lib/parallel.rb#642
79
+ def instrument_finish(item, index, result, options); end
80
+
81
+ # yield results in the order of the input items
82
+ # needs to use `options` to store state between executions
83
+ # needs to use `done` index since a nil result would also be valid
84
+ #
85
+ # source://parallel//lib/parallel.rb#651
86
+ def instrument_finish_in_order(item, index, result, options); end
87
+
88
+ # source://parallel//lib/parallel.rb#671
89
+ def instrument_start(item, index, options); end
90
+
91
+ # source://parallel//lib/parallel.rb#590
92
+ def process_incoming_jobs(read, write, job_factory, options, &block); end
93
+
94
+ # source://parallel//lib/parallel.rb#544
95
+ def replace_worker(job_factory, workers, index, options, blk); end
96
+
97
+ # source://parallel//lib/parallel.rb#635
98
+ def with_instrumentation(item, index, options); end
99
+
100
+ # source://parallel//lib/parallel.rb#386
101
+ def work_direct(job_factory, options, &block); end
102
+
103
+ # source://parallel//lib/parallel.rb#496
104
+ def work_in_processes(job_factory, options, &blk); end
105
+
106
+ # source://parallel//lib/parallel.rb#430
107
+ def work_in_ractors(job_factory, options); end
108
+
109
+ # source://parallel//lib/parallel.rb#405
110
+ def work_in_threads(job_factory, options, &block); end
111
+
112
+ # source://parallel//lib/parallel.rb#564
113
+ def worker(job_factory, options, &block); end
114
+ end
115
+ end
116
+
117
+ # source://parallel//lib/parallel.rb#11
118
+ class Parallel::Break < ::StandardError
119
+ # @return [Break] a new instance of Break
120
+ #
121
+ # source://parallel//lib/parallel.rb#14
122
+ def initialize(value = T.unsafe(nil)); end
123
+
124
+ # Returns the value of attribute value.
125
+ #
126
+ # source://parallel//lib/parallel.rb#12
127
+ def value; end
128
+ end
129
+
130
+ # source://parallel//lib/parallel.rb#8
131
+ class Parallel::DeadWorker < ::StandardError; end
132
+
133
+ # source://parallel//lib/parallel.rb#32
134
+ class Parallel::ExceptionWrapper
135
+ # @return [ExceptionWrapper] a new instance of ExceptionWrapper
136
+ #
137
+ # source://parallel//lib/parallel.rb#35
138
+ def initialize(exception); end
139
+
140
+ # Returns the value of attribute exception.
141
+ #
142
+ # source://parallel//lib/parallel.rb#33
143
+ def exception; end
144
+ end
145
+
146
+ # source://parallel//lib/parallel.rb#98
147
+ class Parallel::JobFactory
148
+ # @return [JobFactory] a new instance of JobFactory
149
+ #
150
+ # source://parallel//lib/parallel.rb#99
151
+ def initialize(source, mutex); end
152
+
153
+ # source://parallel//lib/parallel.rb#107
154
+ def next; end
155
+
156
+ # generate item that is sent to workers
157
+ # just index is faster + less likely to blow up with unserializable errors
158
+ #
159
+ # source://parallel//lib/parallel.rb#136
160
+ def pack(item, index); end
161
+
162
+ # source://parallel//lib/parallel.rb#126
163
+ def size; end
164
+
165
+ # unpack item that is sent to workers
166
+ #
167
+ # source://parallel//lib/parallel.rb#141
168
+ def unpack(data); end
169
+
170
+ private
171
+
172
+ # @return [Boolean]
173
+ #
174
+ # source://parallel//lib/parallel.rb#147
175
+ def producer?; end
176
+
177
+ # source://parallel//lib/parallel.rb#151
178
+ def queue_wrapper(array); end
179
+ end
180
+
181
+ # source://parallel//lib/parallel.rb#20
182
+ class Parallel::Kill < ::Parallel::Break; end
183
+
184
+ # source://parallel//lib/parallel.rb#6
185
+ Parallel::Stop = T.let(T.unsafe(nil), Object)
186
+
187
+ # source://parallel//lib/parallel.rb#23
188
+ class Parallel::UndumpableException < ::StandardError
189
+ # @return [UndumpableException] a new instance of UndumpableException
190
+ #
191
+ # source://parallel//lib/parallel.rb#26
192
+ def initialize(original); end
193
+
194
+ # Returns the value of attribute backtrace.
195
+ #
196
+ # source://parallel//lib/parallel.rb#24
197
+ def backtrace; end
198
+ end
199
+
200
+ # source://parallel//lib/parallel.rb#156
201
+ class Parallel::UserInterruptHandler
202
+ class << self
203
+ # source://parallel//lib/parallel.rb#181
204
+ def kill(thing); end
205
+
206
+ # kill all these pids or threads if user presses Ctrl+c
207
+ #
208
+ # source://parallel//lib/parallel.rb#161
209
+ def kill_on_ctrl_c(pids, options); end
210
+
211
+ private
212
+
213
+ # source://parallel//lib/parallel.rb#205
214
+ def restore_interrupt(old, signal); end
215
+
216
+ # source://parallel//lib/parallel.rb#190
217
+ def trap_interrupt(signal); end
218
+ end
219
+ end
220
+
221
+ # source://parallel//lib/parallel.rb#157
222
+ Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol)
223
+
224
+ # source://parallel//lib/parallel/version.rb#3
225
+ Parallel::VERSION = T.let(T.unsafe(nil), String)
226
+
227
+ # source://parallel//lib/parallel/version.rb#3
228
+ Parallel::Version = T.let(T.unsafe(nil), String)
229
+
230
+ # source://parallel//lib/parallel.rb#51
231
+ class Parallel::Worker
232
+ # @return [Worker] a new instance of Worker
233
+ #
234
+ # source://parallel//lib/parallel.rb#55
235
+ def initialize(read, write, pid); end
236
+
237
+ # might be passed to started_processes and simultaneously closed by another thread
238
+ # when running in isolation mode, so we have to check if it is closed before closing
239
+ #
240
+ # source://parallel//lib/parallel.rb#68
241
+ def close_pipes; end
242
+
243
+ # Returns the value of attribute pid.
244
+ #
245
+ # source://parallel//lib/parallel.rb#52
246
+ def pid; end
247
+
248
+ # Returns the value of attribute read.
249
+ #
250
+ # source://parallel//lib/parallel.rb#52
251
+ def read; end
252
+
253
+ # source://parallel//lib/parallel.rb#61
254
+ def stop; end
255
+
256
+ # Returns the value of attribute thread.
257
+ #
258
+ # source://parallel//lib/parallel.rb#53
259
+ def thread; end
260
+
261
+ # Sets the attribute thread
262
+ #
263
+ # @param value the value to set the attribute thread to.
264
+ #
265
+ # source://parallel//lib/parallel.rb#53
266
+ def thread=(_arg0); end
267
+
268
+ # source://parallel//lib/parallel.rb#73
269
+ def work(data); end
270
+
271
+ # Returns the value of attribute write.
272
+ #
273
+ # source://parallel//lib/parallel.rb#52
274
+ def write; end
275
+
276
+ private
277
+
278
+ # source://parallel//lib/parallel.rb#91
279
+ def wait; end
280
+ end