playoffs 1.0.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 (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,309 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `bundler-audit` gem.
5
+ # Please instead update this file by running `bin/tapioca gem bundler-audit`.
6
+
7
+
8
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#22
9
+ module Bundler::Audit; end
10
+
11
+ # Represents an advisory loaded from the {Database}.
12
+ #
13
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#38
14
+ class Bundler::Audit::Advisory < ::Struct
15
+ # Compares two advisories.
16
+ #
17
+ # @param other [Advisory]
18
+ # @return [Boolean]
19
+ #
20
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#210
21
+ def ==(other); end
22
+
23
+ # Determines how critical the vulnerability is.
24
+ #
25
+ # @return [:none, :low, :medium, :high, :critical, nil] The criticality of the vulnerability based on the CVSS score.
26
+ #
27
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#138
28
+ def criticality; end
29
+
30
+ # The CVE identifier.
31
+ #
32
+ # @return [String, nil]
33
+ #
34
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#93
35
+ def cve_id; end
36
+
37
+ # The GHSA (GitHub Security Advisory) identifier
38
+ #
39
+ # @return [String, nil]
40
+ # @since 0.7.0
41
+ #
42
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#113
43
+ def ghsa_id; end
44
+
45
+ # Return a compacted list of all ids
46
+ #
47
+ # @return [Array<String>]
48
+ # @since 0.7.0
49
+ #
50
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#124
51
+ def identifiers; end
52
+
53
+ # The OSVDB identifier.
54
+ #
55
+ # @return [String, nil]
56
+ #
57
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#102
58
+ def osvdb_id; end
59
+
60
+ # Checks whether the version is patched against the advisory.
61
+ #
62
+ # @param version [Gem::Version] The version to compare against {#patched_versions}.
63
+ # @return [Boolean] Specifies whether the version is patched against the advisory.
64
+ # @since 0.2.0
65
+ #
66
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#184
67
+ def patched?(version); end
68
+
69
+ # Converts the advisory to a Hash.
70
+ #
71
+ # @return [Hash{Symbol => Object}]
72
+ #
73
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#219
74
+ def to_h; end
75
+
76
+ # Returns the value of attribute id
77
+ #
78
+ # @return [Object] the current value of id
79
+ def to_s; end
80
+
81
+ # Checks whether the version is not affected by the advisory.
82
+ #
83
+ # @param version [Gem::Version] The version to compare against {#unaffected_versions}.
84
+ # @return [Boolean] Specifies whether the version is not affected by the advisory.
85
+ # @since 0.2.0
86
+ #
87
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#167
88
+ def unaffected?(version); end
89
+
90
+ # Checks whether the version is vulnerable to the advisory.
91
+ #
92
+ # @param version [Gem::Version] The version to compare against {#patched_versions}.
93
+ # @return [Boolean] Specifies whether the version is vulnerable to the advisory or not.
94
+ #
95
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#199
96
+ def vulnerable?(version); end
97
+
98
+ class << self
99
+ # Loads the advisory from a YAML file.
100
+ #
101
+ # @api semipublic
102
+ # @param path [String] The path to the advisory YAML file.
103
+ # @return [Advisory]
104
+ #
105
+ # source://bundler-audit//lib/bundler/audit/advisory.rb#50
106
+ def load(path); end
107
+ end
108
+ end
109
+
110
+ # Represents the directory of advisories, grouped by gem name
111
+ # and CVE number.
112
+ #
113
+ # source://bundler-audit//lib/bundler/audit/database.rb#29
114
+ class Bundler::Audit::Database
115
+ # Initializes the Advisory Database.
116
+ #
117
+ # @param path [String] The path to the advisory database.
118
+ # @raise [ArgumentError] The path was not a directory.
119
+ # @return [Database] a new instance of Database
120
+ #
121
+ # source://bundler-audit//lib/bundler/audit/database.rb#62
122
+ def initialize(path = T.unsafe(nil)); end
123
+
124
+ # Enumerates over every advisory in the database.
125
+ #
126
+ # @return [Enumerator] If no block is given, an Enumerator will be returned.
127
+ # @yield [advisory] If a block is given, it will be passed each advisory.
128
+ # @yieldparam advisory [Advisory] An advisory from the database.
129
+ #
130
+ # source://bundler-audit//lib/bundler/audit/database.rb#262
131
+ def advisories(&block); end
132
+
133
+ # Enumerates over advisories for the given gem.
134
+ #
135
+ # @param name [String] The gem name to lookup.
136
+ # @return [Enumerator] If no block is given, an Enumerator will be returned.
137
+ # @yield [advisory] If a block is given, each advisory for the given gem will be yielded.
138
+ # @yieldparam advisory [Advisory] An advisory for the given gem.
139
+ #
140
+ # source://bundler-audit//lib/bundler/audit/database.rb#285
141
+ def advisories_for(name); end
142
+
143
+ # Verifies whether the gem is effected by any advisories.
144
+ #
145
+ # @param gem [Gem::Specification] The gem to verify.
146
+ # @return [Enumerator] If no block is given, an Enumerator will be returned.
147
+ # @yield [advisory] If a block is given, it will be passed advisories that effect
148
+ # the gem.
149
+ # @yieldparam advisory [Advisory] An advisory that effects the specific version of the gem.
150
+ #
151
+ # source://bundler-audit//lib/bundler/audit/database.rb#309
152
+ def check_gem(gem); end
153
+
154
+ # The last commit ID of the repository.
155
+ #
156
+ # @return [String, nil] The commit hash or `nil` if the database is not a git repository.
157
+ # @since 0.9.0
158
+ #
159
+ # source://bundler-audit//lib/bundler/audit/database.rb#225
160
+ def commit_id; end
161
+
162
+ # Determines if the database is a git repository.
163
+ #
164
+ # @return [Boolean]
165
+ # @since 0.8.0
166
+ #
167
+ # source://bundler-audit//lib/bundler/audit/database.rb#181
168
+ def git?; end
169
+
170
+ # Inspects the database.
171
+ #
172
+ # @return [String] The inspected database.
173
+ #
174
+ # source://bundler-audit//lib/bundler/audit/database.rb#345
175
+ def inspect; end
176
+
177
+ # Determines the time when the database was last updated.
178
+ #
179
+ # @return [Time]
180
+ # @since 0.8.0
181
+ #
182
+ # source://bundler-audit//lib/bundler/audit/database.rb#240
183
+ def last_updated_at; end
184
+
185
+ # The path to the advisory database.
186
+ #
187
+ # @return [String]
188
+ #
189
+ # source://bundler-audit//lib/bundler/audit/database.rb#51
190
+ def path; end
191
+
192
+ # The number of advisories within the database.
193
+ #
194
+ # @return [Integer] The number of advisories.
195
+ #
196
+ # source://bundler-audit//lib/bundler/audit/database.rb#325
197
+ def size; end
198
+
199
+ # Converts the database to a String.
200
+ #
201
+ # @return [String] The path to the database.
202
+ #
203
+ # source://bundler-audit//lib/bundler/audit/database.rb#335
204
+ def to_s; end
205
+
206
+ # Updates the ruby-advisory-db.
207
+ #
208
+ # @option options
209
+ # @param options [Hash] Additional options.
210
+ # @return [true, nil] `true` indicates that the update was successful.
211
+ # `nil` indicates the database is not a git repository, thus not
212
+ # capable of being updated.
213
+ # @since 0.8.0
214
+ #
215
+ # source://bundler-audit//lib/bundler/audit/database.rb#201
216
+ def update!(options = T.unsafe(nil)); end
217
+
218
+ protected
219
+
220
+ # Enumerates over every advisory path in the database.
221
+ #
222
+ # @yield [path] The given block will be passed each advisory path.
223
+ # @yieldparam path [String] A path to an advisory `.yml` file.
224
+ #
225
+ # source://bundler-audit//lib/bundler/audit/database.rb#360
226
+ def each_advisory_path(&block); end
227
+
228
+ # Enumerates over the advisories for the given gem.
229
+ #
230
+ # @param name [String] The gem of the gem.
231
+ # @yield [path] The given block will be passed each advisory path.
232
+ # @yieldparam path [String] A path to an advisory `.yml` file.
233
+ #
234
+ # source://bundler-audit//lib/bundler/audit/database.rb#376
235
+ def each_advisory_path_for(name, &block); end
236
+
237
+ class << self
238
+ # Downloads the ruby-advisory-db.
239
+ #
240
+ # @note Requires network access.
241
+ # @option options
242
+ # @option options
243
+ # @param options [Hash] Additional options.
244
+ # @raise [DownloadFailed] Indicates that the download failed.
245
+ # @return [Dataase] The newly downloaded database.
246
+ # @since 0.8.0
247
+ #
248
+ # source://bundler-audit//lib/bundler/audit/database.rb#117
249
+ def download(options = T.unsafe(nil)); end
250
+
251
+ # Tests whether the database exists.
252
+ #
253
+ # @param path [String] The given path of the database to check.
254
+ # @return [Boolean]
255
+ # @since 0.8.0
256
+ #
257
+ # source://bundler-audit//lib/bundler/audit/database.rb#90
258
+ def exists?(path = T.unsafe(nil)); end
259
+
260
+ # The default path for the database.
261
+ #
262
+ # @return [String] The path to the database directory.
263
+ #
264
+ # source://bundler-audit//lib/bundler/audit/database.rb#76
265
+ def path; end
266
+
267
+ # Updates the ruby-advisory-db.
268
+ #
269
+ # @deprecated Use {#update!} instead.
270
+ # @note Requires network access.
271
+ # @option options
272
+ # @param options [Hash] Additional options.
273
+ # @raise [ArgumentError] Invalid options were given.
274
+ # @return [Boolean, nil] Specifies whether the update was successful.
275
+ # A `nil` indicates no update was performed.
276
+ # @since 0.3.0
277
+ #
278
+ # source://bundler-audit//lib/bundler/audit/database.rb#158
279
+ def update!(options = T.unsafe(nil)); end
280
+ end
281
+ end
282
+
283
+ # Default path to the ruby-advisory-db.
284
+ #
285
+ # @since 0.8.0
286
+ #
287
+ # source://bundler-audit//lib/bundler/audit/database.rb#46
288
+ Bundler::Audit::Database::DEFAULT_PATH = T.let(T.unsafe(nil), String)
289
+
290
+ # source://bundler-audit//lib/bundler/audit/database.rb#31
291
+ class Bundler::Audit::Database::DownloadFailed < ::RuntimeError; end
292
+
293
+ # Git URL of the ruby-advisory-db.
294
+ #
295
+ # source://bundler-audit//lib/bundler/audit/database.rb#38
296
+ Bundler::Audit::Database::URL = T.let(T.unsafe(nil), String)
297
+
298
+ # Path to the user's copy of the ruby-advisory-db.
299
+ #
300
+ # source://bundler-audit//lib/bundler/audit/database.rb#41
301
+ Bundler::Audit::Database::USER_PATH = T.let(T.unsafe(nil), String)
302
+
303
+ # source://bundler-audit//lib/bundler/audit/database.rb#34
304
+ class Bundler::Audit::Database::UpdateFailed < ::RuntimeError; end
305
+
306
+ # bundler-audit version
307
+ #
308
+ # source://bundler-audit//lib/bundler/audit/version.rb#21
309
+ Bundler::Audit::VERSION = T.let(T.unsafe(nil), String)