sorbet-schema 0.1.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 (89) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -0
  3. data/.standard.yml +6 -0
  4. data/.tool-versions +1 -0
  5. data/CHANGELOG.md +24 -0
  6. data/CODE_OF_CONDUCT.md +84 -0
  7. data/Gemfile +25 -0
  8. data/Gemfile.lock +147 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +43 -0
  11. data/Rakefile +22 -0
  12. data/lib/sorbet-schema/hash_transformer.rb +22 -0
  13. data/lib/sorbet-schema/struct_ext.rb +37 -0
  14. data/lib/sorbet-schema/version.rb +5 -0
  15. data/lib/sorbet-schema.rb +27 -0
  16. data/lib/typed/coercion/coercer.rb +18 -0
  17. data/lib/typed/coercion/coercion_error.rb +7 -0
  18. data/lib/typed/coercion/coercion_not_supported_error.rb +7 -0
  19. data/lib/typed/coercion/float_coercer.rb +21 -0
  20. data/lib/typed/coercion/integer_coercer.rb +21 -0
  21. data/lib/typed/coercion/string_coercer.rb +19 -0
  22. data/lib/typed/coercion/struct_coercer.rb +26 -0
  23. data/lib/typed/coercion.rb +26 -0
  24. data/lib/typed/deserialize_error.rb +6 -0
  25. data/lib/typed/field.rb +28 -0
  26. data/lib/typed/hash_serializer.rb +21 -0
  27. data/lib/typed/json_serializer.rb +28 -0
  28. data/lib/typed/parse_error.rb +12 -0
  29. data/lib/typed/schema.rb +10 -0
  30. data/lib/typed/serializer.rb +61 -0
  31. data/lib/typed/validations/field_type_validator.rb +24 -0
  32. data/lib/typed/validations/field_validator.rb +15 -0
  33. data/lib/typed/validations/multiple_validation_error.rb +16 -0
  34. data/lib/typed/validations/required_field_error.rb +14 -0
  35. data/lib/typed/validations/type_mismatch_error.rb +14 -0
  36. data/lib/typed/validations/validated_value.rb +12 -0
  37. data/lib/typed/validations/validation_error.rb +8 -0
  38. data/lib/typed/validations/validation_results.rb +29 -0
  39. data/lib/typed/validations.rb +8 -0
  40. data/sorbet/config +5 -0
  41. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  42. data/sorbet/rbi/gems/.gitattributes +1 -0
  43. data/sorbet/rbi/gems/ansi@1.5.0.rbi +687 -0
  44. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  45. data/sorbet/rbi/gems/builder@3.2.4.rbi +504 -0
  46. data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
  47. data/sorbet/rbi/gems/io-console@0.7.2.rbi +8 -0
  48. data/sorbet/rbi/gems/json@2.7.1.rbi +1553 -0
  49. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  50. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +239 -0
  51. data/sorbet/rbi/gems/minitest-focus@1.4.0.rbi +91 -0
  52. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1010 -0
  53. data/sorbet/rbi/gems/minitest@5.22.2.rbi +2233 -0
  54. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  55. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  56. data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
  57. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  58. data/sorbet/rbi/gems/prism@0.24.0.rbi +31040 -0
  59. data/sorbet/rbi/gems/psych@5.1.2.rbi +1731 -0
  60. data/sorbet/rbi/gems/racc@1.7.3.rbi +157 -0
  61. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  62. data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
  63. data/sorbet/rbi/gems/rbi@0.1.9.rbi +3006 -0
  64. data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
  65. data/sorbet/rbi/gems/reline@0.4.3.rbi +8 -0
  66. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
  67. data/sorbet/rbi/gems/rubocop-ast@1.31.1.rbi +7014 -0
  68. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +8 -0
  69. data/sorbet/rbi/gems/rubocop-sorbet@0.7.7.rbi +8 -0
  70. data/sorbet/rbi/gems/rubocop@1.61.0.rbi +57499 -0
  71. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  72. data/sorbet/rbi/gems/sorbet-result@1.1.0.rbi +519 -0
  73. data/sorbet/rbi/gems/sorbet-struct-comparable@1.3.0.rbi +34 -0
  74. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  75. data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +8 -0
  76. data/sorbet/rbi/gems/standard-performance@1.3.1.rbi +80 -0
  77. data/sorbet/rbi/gems/standard-sorbet@0.0.2.rbi +52 -0
  78. data/sorbet/rbi/gems/standard@1.34.0.rbi +850 -0
  79. data/sorbet/rbi/gems/stringio@3.1.0.rbi +8 -0
  80. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23133 -0
  81. data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3499 -0
  82. data/sorbet/rbi/gems/thor@1.3.1.rbi +4351 -0
  83. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  84. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  85. data/sorbet/rbi/gems/yard@0.9.36.rbi +18220 -0
  86. data/sorbet/rbi/gems/zeitwerk@2.6.13.rbi +1003 -0
  87. data/sorbet/tapioca/config.yml +4 -0
  88. data/sorbet/tapioca/require.rb +12 -0
  89. metadata +191 -0
@@ -0,0 +1,239 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `lint_roller` gem.
5
+ # Please instead update this file by running `bin/tapioca gem lint_roller`.
6
+
7
+ # source://lint_roller//lib/lint_roller/version.rb#1
8
+ module LintRoller; end
9
+
10
+ # source://lint_roller//lib/lint_roller/about.rb#2
11
+ class LintRoller::About < ::Struct
12
+ # Returns the value of attribute description
13
+ #
14
+ # @return [Object] the current value of description
15
+ def description; end
16
+
17
+ # Sets the attribute description
18
+ #
19
+ # @param value [Object] the value to set the attribute description to.
20
+ # @return [Object] the newly set value
21
+ def description=(_); end
22
+
23
+ # Returns the value of attribute homepage
24
+ #
25
+ # @return [Object] the current value of homepage
26
+ def homepage; end
27
+
28
+ # Sets the attribute homepage
29
+ #
30
+ # @param value [Object] the value to set the attribute homepage to.
31
+ # @return [Object] the newly set value
32
+ def homepage=(_); end
33
+
34
+ # Returns the value of attribute name
35
+ #
36
+ # @return [Object] the current value of name
37
+ def name; end
38
+
39
+ # Sets the attribute name
40
+ #
41
+ # @param value [Object] the value to set the attribute name to.
42
+ # @return [Object] the newly set value
43
+ def name=(_); end
44
+
45
+ # Returns the value of attribute version
46
+ #
47
+ # @return [Object] the current value of version
48
+ def version; end
49
+
50
+ # Sets the attribute version
51
+ #
52
+ # @param value [Object] the value to set the attribute version to.
53
+ # @return [Object] the newly set value
54
+ def version=(_); end
55
+
56
+ class << self
57
+ def [](*_arg0); end
58
+ def inspect; end
59
+ def keyword_init?; end
60
+ def members; end
61
+ def new(*_arg0); end
62
+ end
63
+ end
64
+
65
+ # source://lint_roller//lib/lint_roller/context.rb#2
66
+ class LintRoller::Context < ::Struct
67
+ # Returns the value of attribute engine
68
+ #
69
+ # @return [Object] the current value of engine
70
+ def engine; end
71
+
72
+ # Sets the attribute engine
73
+ #
74
+ # @param value [Object] the value to set the attribute engine to.
75
+ # @return [Object] the newly set value
76
+ def engine=(_); end
77
+
78
+ # Returns the value of attribute engine_version
79
+ #
80
+ # @return [Object] the current value of engine_version
81
+ def engine_version; end
82
+
83
+ # Sets the attribute engine_version
84
+ #
85
+ # @param value [Object] the value to set the attribute engine_version to.
86
+ # @return [Object] the newly set value
87
+ def engine_version=(_); end
88
+
89
+ # Returns the value of attribute rule_format
90
+ #
91
+ # @return [Object] the current value of rule_format
92
+ def rule_format; end
93
+
94
+ # Sets the attribute rule_format
95
+ #
96
+ # @param value [Object] the value to set the attribute rule_format to.
97
+ # @return [Object] the newly set value
98
+ def rule_format=(_); end
99
+
100
+ # Returns the value of attribute runner
101
+ #
102
+ # @return [Object] the current value of runner
103
+ def runner; end
104
+
105
+ # Sets the attribute runner
106
+ #
107
+ # @param value [Object] the value to set the attribute runner to.
108
+ # @return [Object] the newly set value
109
+ def runner=(_); end
110
+
111
+ # Returns the value of attribute runner_version
112
+ #
113
+ # @return [Object] the current value of runner_version
114
+ def runner_version; end
115
+
116
+ # Sets the attribute runner_version
117
+ #
118
+ # @param value [Object] the value to set the attribute runner_version to.
119
+ # @return [Object] the newly set value
120
+ def runner_version=(_); end
121
+
122
+ # Returns the value of attribute target_ruby_version
123
+ #
124
+ # @return [Object] the current value of target_ruby_version
125
+ def target_ruby_version; end
126
+
127
+ # Sets the attribute target_ruby_version
128
+ #
129
+ # @param value [Object] the value to set the attribute target_ruby_version to.
130
+ # @return [Object] the newly set value
131
+ def target_ruby_version=(_); end
132
+
133
+ class << self
134
+ def [](*_arg0); end
135
+ def inspect; end
136
+ def keyword_init?; end
137
+ def members; end
138
+ def new(*_arg0); end
139
+ end
140
+ end
141
+
142
+ # source://lint_roller//lib/lint_roller/error.rb#2
143
+ class LintRoller::Error < ::StandardError; end
144
+
145
+ # source://lint_roller//lib/lint_roller/plugin.rb#2
146
+ class LintRoller::Plugin
147
+ # `config' is a Hash of options passed to the plugin by the user
148
+ #
149
+ # @return [Plugin] a new instance of Plugin
150
+ #
151
+ # source://lint_roller//lib/lint_roller/plugin.rb#4
152
+ def initialize(config = T.unsafe(nil)); end
153
+
154
+ # @raise [Error]
155
+ #
156
+ # source://lint_roller//lib/lint_roller/plugin.rb#8
157
+ def about; end
158
+
159
+ # `context' is an instance of LintRoller::Context provided by the runner
160
+ #
161
+ # @raise [Error]
162
+ #
163
+ # source://lint_roller//lib/lint_roller/plugin.rb#18
164
+ def rules(context); end
165
+
166
+ # `context' is an instance of LintRoller::Context provided by the runner
167
+ #
168
+ # @return [Boolean]
169
+ #
170
+ # source://lint_roller//lib/lint_roller/plugin.rb#13
171
+ def supported?(context); end
172
+ end
173
+
174
+ # source://lint_roller//lib/lint_roller/rules.rb#2
175
+ class LintRoller::Rules < ::Struct
176
+ # Returns the value of attribute config_format
177
+ #
178
+ # @return [Object] the current value of config_format
179
+ def config_format; end
180
+
181
+ # Sets the attribute config_format
182
+ #
183
+ # @param value [Object] the value to set the attribute config_format to.
184
+ # @return [Object] the newly set value
185
+ def config_format=(_); end
186
+
187
+ # Returns the value of attribute error
188
+ #
189
+ # @return [Object] the current value of error
190
+ def error; end
191
+
192
+ # Sets the attribute error
193
+ #
194
+ # @param value [Object] the value to set the attribute error to.
195
+ # @return [Object] the newly set value
196
+ def error=(_); end
197
+
198
+ # Returns the value of attribute type
199
+ #
200
+ # @return [Object] the current value of type
201
+ def type; end
202
+
203
+ # Sets the attribute type
204
+ #
205
+ # @param value [Object] the value to set the attribute type to.
206
+ # @return [Object] the newly set value
207
+ def type=(_); end
208
+
209
+ # Returns the value of attribute value
210
+ #
211
+ # @return [Object] the current value of value
212
+ def value; end
213
+
214
+ # Sets the attribute value
215
+ #
216
+ # @param value [Object] the value to set the attribute value to.
217
+ # @return [Object] the newly set value
218
+ def value=(_); end
219
+
220
+ class << self
221
+ def [](*_arg0); end
222
+ def inspect; end
223
+ def keyword_init?; end
224
+ def members; end
225
+ def new(*_arg0); end
226
+ end
227
+ end
228
+
229
+ # source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#2
230
+ module LintRoller::Support; end
231
+
232
+ # source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#3
233
+ class LintRoller::Support::MergesUpstreamMetadata
234
+ # source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#4
235
+ def merge(plugin_yaml, upstream_yaml); end
236
+ end
237
+
238
+ # source://lint_roller//lib/lint_roller/version.rb#2
239
+ LintRoller::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,91 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `minitest-focus` gem.
5
+ # Please instead update this file by running `bin/tapioca gem minitest-focus`.
6
+
7
+ # source://minitest-focus//lib/minitest/focus.rb#3
8
+ class Minitest::Test < ::Minitest::Runnable
9
+ # source://minitest/5.22.2/lib/minitest/test.rb#190
10
+ def capture_exceptions; end
11
+
12
+ # source://minitest/5.22.2/lib/minitest/test.rb#15
13
+ def class_name; end
14
+
15
+ # source://minitest/5.22.2/lib/minitest/test.rb#207
16
+ def neuter_exception(e); end
17
+
18
+ # source://minitest/5.22.2/lib/minitest/test.rb#218
19
+ def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end
20
+
21
+ # source://minitest/5.22.2/lib/minitest/test.rb#86
22
+ def run; end
23
+
24
+ # source://minitest/5.22.2/lib/minitest/test.rb#200
25
+ def sanitize_exception(e); end
26
+
27
+ # source://minitest/5.22.2/lib/minitest/test.rb#232
28
+ def with_info_handler(&block); end
29
+
30
+ class << self
31
+ # source://minitest-focus//lib/minitest/focus.rb#10
32
+ def add_to_filter(name); end
33
+
34
+ # source://minitest-focus//lib/minitest/focus.rb#14
35
+ def filtered_names; end
36
+
37
+ # Focus on the next test defined. Cumulative. Equivalent to
38
+ # running with command line arg: -n /test_name|.../
39
+ #
40
+ # class MyTest < Minitest::Test
41
+ #
42
+ # # direct approach
43
+ # focus def test_method1 # will run
44
+ # ...
45
+ # end
46
+ #
47
+ # # indirect approach
48
+ # focus
49
+ # def test_method2 # will run
50
+ # ...
51
+ # end
52
+ #
53
+ # def test_method3 # will NOT run
54
+ # ...
55
+ # end
56
+ # end
57
+ #
58
+ # source://minitest-focus//lib/minitest/focus.rb#40
59
+ def focus(name = T.unsafe(nil)); end
60
+
61
+ # source://minitest/5.22.2/lib/minitest/test.rb#35
62
+ def i_suck_and_my_tests_are_order_dependent!; end
63
+
64
+ # source://minitest/5.22.2/lib/minitest/test.rb#26
65
+ def io_lock; end
66
+
67
+ # source://minitest/5.22.2/lib/minitest/test.rb#26
68
+ def io_lock=(_arg0); end
69
+
70
+ # source://minitest/5.22.2/lib/minitest/test.rb#48
71
+ def make_my_diffs_pretty!; end
72
+
73
+ # source://minitest/5.22.2/lib/minitest/test.rb#59
74
+ def parallelize_me!; end
75
+
76
+ # source://minitest/5.22.2/lib/minitest/test.rb#69
77
+ def runnable_methods; end
78
+
79
+ # Sets a one-off method_added callback to set focus on the method
80
+ # defined next.
81
+ #
82
+ # source://minitest-focus//lib/minitest/focus.rb#52
83
+ def set_focus_trap; end
84
+ end
85
+ end
86
+
87
+ # source://minitest-focus//lib/minitest/focus.rb#4
88
+ class Minitest::Test::Focus; end
89
+
90
+ # source://minitest-focus//lib/minitest/focus.rb#5
91
+ Minitest::Test::Focus::VERSION = T.let(T.unsafe(nil), String)