categoria 0.1.0.pre.beta0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +34 -0
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +5 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +33 -0
  7. data/Rakefile +12 -0
  8. data/categoria.gemspec +48 -0
  9. data/lib/categoria/version.rb +6 -0
  10. data/lib/categoria.rb +9 -0
  11. data/lib/generators/categoria/command_generator.rb +8 -0
  12. data/lib/generators/categoria/domain_generator.rb +35 -0
  13. data/lib/generators/categoria/model_generator.rb +8 -0
  14. data/lib/generators/categoria/templates/domain_module.rb.erb +6 -0
  15. data/sig/categoria.rbs +4 -0
  16. data/sorbet/config +4 -0
  17. data/sorbet/rbi/annotations/.gitattributes +1 -0
  18. data/sorbet/rbi/annotations/actionmailer.rbi +10 -0
  19. data/sorbet/rbi/annotations/actionpack.rbi +429 -0
  20. data/sorbet/rbi/annotations/actionview.rbi +75 -0
  21. data/sorbet/rbi/annotations/activejob.rbi +44 -0
  22. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  23. data/sorbet/rbi/annotations/activerecord.rbi +92 -0
  24. data/sorbet/rbi/annotations/activesupport.rbi +421 -0
  25. data/sorbet/rbi/annotations/globalid.rbi +30 -0
  26. data/sorbet/rbi/annotations/railties.rbi +61 -0
  27. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  28. data/sorbet/rbi/gems/.gitattributes +1 -0
  29. data/sorbet/rbi/gems/actioncable@7.1.3.3.rbi +9 -0
  30. data/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi +9 -0
  31. data/sorbet/rbi/gems/actionmailer@7.1.3.3.rbi +9 -0
  32. data/sorbet/rbi/gems/actionpack@7.1.3.3.rbi +9 -0
  33. data/sorbet/rbi/gems/actiontext@7.1.3.3.rbi +9 -0
  34. data/sorbet/rbi/gems/actionview@7.1.3.3.rbi +9 -0
  35. data/sorbet/rbi/gems/activejob@7.1.3.3.rbi +9 -0
  36. data/sorbet/rbi/gems/activemodel@7.1.3.3.rbi +9 -0
  37. data/sorbet/rbi/gems/activerecord@7.1.3.3.rbi +9 -0
  38. data/sorbet/rbi/gems/activestorage@7.1.3.3.rbi +9 -0
  39. data/sorbet/rbi/gems/activesupport@7.1.3.3.rbi +11 -0
  40. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  41. data/sorbet/rbi/gems/base64@0.2.0.rbi +9 -0
  42. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +9 -0
  43. data/sorbet/rbi/gems/builder@3.2.4.rbi +9 -0
  44. data/sorbet/rbi/gems/concurrent-ruby@1.3.1.rbi +9 -0
  45. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  46. data/sorbet/rbi/gems/crass@1.0.6.rbi +9 -0
  47. data/sorbet/rbi/gems/date@3.3.4.rbi +73 -0
  48. data/sorbet/rbi/gems/drb@2.2.1.rbi +9 -0
  49. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  50. data/sorbet/rbi/gems/globalid@1.2.1.rbi +9 -0
  51. data/sorbet/rbi/gems/i18n@1.14.5.rbi +9 -0
  52. data/sorbet/rbi/gems/io-console@0.7.2.rbi +9 -0
  53. data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
  54. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  55. data/sorbet/rbi/gems/loofah@2.22.0.rbi +9 -0
  56. data/sorbet/rbi/gems/mail@2.8.1.rbi +9 -0
  57. data/sorbet/rbi/gems/marcel@1.0.4.rbi +9 -0
  58. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +9 -0
  59. data/sorbet/rbi/gems/minitest@5.23.1.rbi +1555 -0
  60. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +9 -0
  61. data/sorbet/rbi/gems/net-imap@0.4.11.rbi +9 -0
  62. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +9 -0
  63. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +282 -0
  64. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +9 -0
  65. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  66. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +9 -0
  67. data/sorbet/rbi/gems/nokogiri@1.16.5.rbi +9 -0
  68. data/sorbet/rbi/gems/parallel@1.24.0.rbi +281 -0
  69. data/sorbet/rbi/gems/parser@3.3.2.0.rbi +5519 -0
  70. data/sorbet/rbi/gems/prism@0.29.0.rbi +37987 -0
  71. data/sorbet/rbi/gems/psych@5.1.2.rbi +1732 -0
  72. data/sorbet/rbi/gems/racc@1.8.0.rbi +162 -0
  73. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +9 -0
  74. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +9 -0
  75. data/sorbet/rbi/gems/rack@3.0.11.rbi +2910 -0
  76. data/sorbet/rbi/gems/rackup@2.1.0.rbi +390 -0
  77. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +9 -0
  78. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +9 -0
  79. data/sorbet/rbi/gems/rails@7.1.3.3.rbi +9 -0
  80. data/sorbet/rbi/gems/railties@7.1.3.3.rbi +9 -0
  81. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  82. data/sorbet/rbi/gems/rake@13.2.1.rbi +3028 -0
  83. data/sorbet/rbi/gems/rbi@0.1.13.rbi +3078 -0
  84. data/sorbet/rbi/gems/rdoc@6.7.0.rbi +12719 -0
  85. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
  86. data/sorbet/rbi/gems/reline@0.5.8.rbi +9 -0
  87. data/sorbet/rbi/gems/rexml@3.2.8.rbi +4794 -0
  88. data/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +7045 -0
  89. data/sorbet/rbi/gems/rubocop-minitest@0.35.0.rbi +2611 -0
  90. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  91. data/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi +1607 -0
  92. data/sorbet/rbi/gems/rubocop@1.64.1.rbi +58104 -0
  93. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  94. data/sorbet/rbi/gems/spoom@1.3.2.rbi +4421 -0
  95. data/sorbet/rbi/gems/stringio@3.1.0.rbi +9 -0
  96. data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
  97. data/sorbet/rbi/gems/tapioca@0.14.3.rbi +3534 -0
  98. data/sorbet/rbi/gems/thor@1.3.1.rbi +4352 -0
  99. data/sorbet/rbi/gems/timeout@0.4.1.rbi +143 -0
  100. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +9 -0
  101. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  102. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2607 -0
  103. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +9 -0
  104. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +9 -0
  105. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +429 -0
  106. data/sorbet/rbi/gems/yard@0.9.36.rbi +18412 -0
  107. data/sorbet/rbi/gems/zeitwerk@2.6.15.rbi +9 -0
  108. data/sorbet/rbi/todo.rbi +46 -0
  109. data/sorbet/tapioca/config.yml +13 -0
  110. data/sorbet/tapioca/require.rb +4 -0
  111. metadata +339 -0
@@ -0,0 +1,92 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ class ActiveRecord::Schema
8
+ sig { params(info: T::Hash[T.untyped, T.untyped], blk: T.proc.bind(ActiveRecord::Schema).void).void }
9
+ def self.define(info = nil, &blk); end
10
+ end
11
+
12
+ class ActiveRecord::Migration
13
+ # @shim: Methods on migration are delegated to `SchemaStatements` using `method_missing`
14
+ include ActiveRecord::ConnectionAdapters::SchemaStatements
15
+
16
+ # @shim: Methods on migration are delegated to `DatabaseStatements` using `method_missing`
17
+ include ActiveRecord::ConnectionAdapters::DatabaseStatements
18
+ end
19
+
20
+ class ActiveRecord::Base
21
+ sig { returns(FalseClass) }
22
+ def blank?; end
23
+
24
+ # @shim: since `present?` is always true, `presence` always returns `self`
25
+ sig { returns(T.self_type) }
26
+ def presence; end
27
+
28
+ sig { returns(TrueClass) }
29
+ def present?; end
30
+
31
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
32
+ def self.after_initialize(*args, **options, &block); end
33
+
34
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
35
+ def self.after_find(*args, **options, &block); end
36
+
37
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
38
+ def self.after_touch(*args, **options, &block); end
39
+
40
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
41
+ def self.before_validation(*args, **options, &block); end
42
+
43
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
44
+ def self.after_validation(*args, **options, &block); end
45
+
46
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
47
+ def self.before_save(*args, **options, &block); end
48
+
49
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
50
+ def self.around_save(*args, **options, &block); end
51
+
52
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
53
+ def self.after_save(*args, **options, &block); end
54
+
55
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
56
+ def self.before_create(*args, **options, &block); end
57
+
58
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
59
+ def self.around_create(*args, **options, &block); end
60
+
61
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
62
+ def self.after_create(*args, **options, &block); end
63
+
64
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
65
+ def self.before_update(*args, **options, &block); end
66
+
67
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
68
+ def self.around_update(*args, **options, &block); end
69
+
70
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
71
+ def self.after_update(*args, **options, &block); end
72
+
73
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
74
+ def self.before_destroy(*args, **options, &block); end
75
+
76
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
77
+ def self.around_destroy(*args, **options, &block); end
78
+
79
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
80
+ def self.after_destroy(*args, **options, &block); end
81
+
82
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
83
+ def self.after_commit(*args, **options, &block); end
84
+
85
+ sig { params(args: T.untyped, options: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).params(record: T.attached_class).void)).void }
86
+ def self.after_rollback(*args, **options, &block); end
87
+ end
88
+
89
+ class ActiveRecord::Relation
90
+ sig { returns(T::Boolean) }
91
+ def blank?; end
92
+ end
@@ -0,0 +1,421 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ module ActiveSupport::Testing::Declarative
8
+ sig { params(name: String, block: T.proc.bind(T.untyped).void).void }
9
+ def test(name, &block); end
10
+ end
11
+
12
+ class ActiveSupport::EnvironmentInquirer
13
+ sig { returns(T::Boolean) }
14
+ def development?; end
15
+
16
+ sig { returns(T::Boolean) }
17
+ def production?; end
18
+
19
+ sig { returns(T::Boolean) }
20
+ def test?; end
21
+
22
+ # @method_missing: delegated to String through ActiveSupport::StringInquirer
23
+ sig { returns(T::Boolean) }
24
+ def staging?; end
25
+ end
26
+
27
+ module ActiveSupport::Testing::SetupAndTeardown::ClassMethods
28
+ sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void }
29
+ def setup(*args, &block); end
30
+
31
+ sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void }
32
+ def teardown(*args, &block); end
33
+ end
34
+
35
+ class ActiveSupport::TestCase
36
+ sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void }
37
+ def self.setup(*args, &block); end
38
+
39
+ sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void }
40
+ def self.teardown(*args, &block); end
41
+
42
+ sig { params(name: String, block: T.proc.bind(T.attached_class).void).void }
43
+ def self.test(name, &block); end
44
+ end
45
+
46
+ class ActiveSupport::TimeWithZone
47
+ # @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing
48
+ include ::DateAndTime::Zones
49
+
50
+ # @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing
51
+ include ::DateAndTime::Calculations
52
+
53
+ sig { returns(FalseClass) }
54
+ def blank?; end
55
+
56
+ # @shim: since `present?` is always true, `presence` always returns `self`
57
+ sig { returns(T.self_type) }
58
+ def presence; end
59
+
60
+ # @shim: since `blank?` is always false, `present?` always returns `true`
61
+ sig { returns(TrueClass) }
62
+ def present?; end
63
+ end
64
+
65
+ class Object
66
+ sig { returns(T::Boolean) }
67
+ def blank?; end
68
+
69
+ sig { returns(FalseClass) }
70
+ def html_safe?; end
71
+
72
+ sig { returns(T.nilable(T.self_type)) }
73
+ def presence; end
74
+
75
+ sig { params(another_object: T.untyped).returns(T.nilable(T.self_type)) }
76
+ def presence_in(another_object); end
77
+
78
+ sig { returns(T::Boolean) }
79
+ def present?; end
80
+ end
81
+
82
+ class Hash
83
+ sig { returns(T::Boolean) }
84
+ def extractable_options?; end
85
+ end
86
+
87
+ class Array
88
+ sig { params(position: Integer).returns(T.self_type) }
89
+ def from(position); end
90
+
91
+ sig { params(position: Integer).returns(T.self_type) }
92
+ def to(position); end
93
+
94
+ sig { params(elements: T.untyped).returns(T::Array[T.untyped]) }
95
+ def including(*elements); end
96
+
97
+ sig { params(elements: T.untyped).returns(T.self_type) }
98
+ def excluding(*elements); end
99
+
100
+ sig { params(elements: T.untyped).returns(T.self_type) }
101
+ def without(*elements); end
102
+
103
+ sig { returns(T.nilable(Elem)) }
104
+ def second; end
105
+
106
+ sig { returns(T.nilable(Elem)) }
107
+ def third; end
108
+
109
+ sig { returns(T.nilable(Elem)) }
110
+ def fourth; end
111
+
112
+ sig { returns(T.nilable(Elem)) }
113
+ def fifth; end
114
+
115
+ sig { returns(T.nilable(Elem)) }
116
+ def forty_two; end
117
+
118
+ sig { returns(T.nilable(Elem)) }
119
+ def third_to_last; end
120
+
121
+ sig { returns(T.nilable(Elem)) }
122
+ def second_to_last; end
123
+
124
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) }
125
+ def to_sentence(options = {}); end
126
+
127
+ sig { params(format: Symbol).returns(String) }
128
+ def to_fs(format = :default); end
129
+
130
+ sig { params(format: Symbol).returns(String) }
131
+ def to_formatted_s(format = :default); end
132
+
133
+ sig { returns(String) }
134
+ def to_xml; end
135
+
136
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
137
+ def extract_options!; end
138
+
139
+ sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) }
140
+ def in_groups(number, fill_with = T.unsafe(nil), &block); end
141
+
142
+ sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) }
143
+ def in_groups_of(number, fill_with = T.unsafe(nil), &block); end
144
+
145
+ sig { params(value: T.untyped, block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T::Array[T::Array[Elem]]) }
146
+ def split(value = nil, &block); end
147
+
148
+ sig { params(block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T.any(T::Array[Elem], T::Enumerator[Elem])) }
149
+ def extract!(&block); end
150
+
151
+ sig { returns(ActiveSupport::ArrayInquirer) }
152
+ def inquiry; end
153
+
154
+ sig { params(object: T.untyped).returns(T::Array[T.untyped]) }
155
+ def self.wrap(object); end
156
+ end
157
+
158
+ class Date
159
+ sig { returns(FalseClass) }
160
+ def blank?; end
161
+
162
+ # @shim: since `present?` is always true, `presence` always returns `self`
163
+ sig { returns(T.self_type) }
164
+ def presence; end
165
+
166
+ # @shim: since `blank?` is always false, `present?` always returns `true`
167
+ sig { returns(TrueClass) }
168
+ def present?; end
169
+ end
170
+
171
+ class DateTime
172
+ sig { returns(FalseClass) }
173
+ def blank?; end
174
+
175
+ # @shim: since `present?` is always true, `presence` always returns `self`
176
+ sig { returns(T.self_type) }
177
+ def presence; end
178
+
179
+ # @shim: since `blank?` is always false, `present?` always returns `true`
180
+ sig { returns(TrueClass) }
181
+ def present?; end
182
+ end
183
+
184
+ class NilClass
185
+ sig { returns(TrueClass) }
186
+ def blank?; end
187
+
188
+ # @shim: since `present?` is always false, `presence` always returns `nil`
189
+ sig { returns(NilClass) }
190
+ def presence; end
191
+
192
+ # @shim: since `blank?` is always true, `present?` always returns `false`
193
+ sig { returns(FalseClass) }
194
+ def present?; end
195
+ end
196
+
197
+ class FalseClass
198
+ sig { returns(TrueClass) }
199
+ def blank?; end
200
+
201
+ # @shim: since `present?` is always false, `presence` always returns `nil`
202
+ sig { returns(NilClass) }
203
+ def presence; end
204
+
205
+ # @shim: since `blank?` is always true, `present?` always returns `false`
206
+ sig { returns(FalseClass) }
207
+ def present?; end
208
+ end
209
+
210
+ class TrueClass
211
+ sig { returns(FalseClass) }
212
+ def blank?; end
213
+
214
+ # @shim: since `present?` is always true, `presence` always returns `self`
215
+ sig { returns(T.self_type) }
216
+ def presence; end
217
+
218
+ # @shim: since `blank?` is always false, `present?` always returns `true`
219
+ sig { returns(TrueClass) }
220
+ def present?; end
221
+ end
222
+
223
+ class Numeric
224
+ sig { returns(FalseClass) }
225
+ def blank?; end
226
+
227
+ sig { returns(TrueClass) }
228
+ def html_safe?; end
229
+
230
+ # @shim: since `present?` is always true, `presence` always returns `self`
231
+ sig { returns(T.self_type) }
232
+ def presence; end
233
+
234
+ # @shim: since `blank?` is always false, `present?` always returns `true`
235
+ sig { returns(TrueClass) }
236
+ def present?; end
237
+ end
238
+
239
+ class Time
240
+ sig { returns(FalseClass) }
241
+ def blank?; end
242
+
243
+ # @shim: since `present?` is always true, `presence` always returns `self`
244
+ sig { returns(T.self_type) }
245
+ def presence; end
246
+
247
+ # @shim: since `blank?` is always false, `present?` always returns `true`
248
+ sig { returns(TrueClass) }
249
+ def present?; end
250
+ end
251
+
252
+ class Symbol
253
+ # alias for `#start_with?`
254
+ sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
255
+ def starts_with?(*string_or_regexp); end
256
+
257
+ # alias for `#end_with?`
258
+ sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
259
+ def ends_with?(*string_or_regexp); end
260
+ end
261
+
262
+ class String
263
+ sig { returns(TrueClass) }
264
+ def acts_like_string?; end
265
+
266
+ sig { params(position: Integer).returns(T.nilable(String)) }
267
+ sig { params(position: T.any(T::Range[Integer], Regexp)).returns(T.nilable(String)) }
268
+ sig { params(position: String).returns(T.nilable(String)) }
269
+ def at(position); end
270
+
271
+ sig { returns(String) }
272
+ def as_json; end
273
+
274
+ sig { returns(T::Boolean) }
275
+ def blank?; end
276
+
277
+ sig { params(first_letter: Symbol).returns(String) }
278
+ def camelcase(first_letter = :upper); end
279
+
280
+ sig { params(first_letter: Symbol).returns(String) }
281
+ def camelize(first_letter = :upper); end
282
+
283
+ sig { returns(String) }
284
+ def classify; end
285
+
286
+ sig { returns(T.untyped) }
287
+ def constantize; end
288
+
289
+ sig { returns(String) }
290
+ def dasherize; end
291
+
292
+ sig { returns(String) }
293
+ def deconstantize; end
294
+
295
+ sig { returns(String) }
296
+ def demodulize; end
297
+
298
+ # alias for `#end_with?`
299
+ sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
300
+ def ends_with?(*string_or_regexp); end
301
+
302
+ sig { returns(String) }
303
+ def downcase_first; end
304
+
305
+ sig { params(string: String).returns(T::Boolean) }
306
+ def exclude?(string); end
307
+
308
+ sig { params(limit: Integer).returns(String) }
309
+ def first(limit = 1); end
310
+
311
+ sig { params(separate_class_name_and_id_with_underscore: T::Boolean).returns(String) }
312
+ def foreign_key(separate_class_name_and_id_with_underscore = true); end
313
+
314
+ sig { params(position: Integer).returns(String) }
315
+ def from(position); end
316
+
317
+ sig { returns(ActiveSupport::SafeBuffer) }
318
+ def html_safe; end
319
+
320
+ sig { params(capitalize: T::Boolean, keep_id_suffix: T::Boolean).returns(String) }
321
+ def humanize(capitalize: true, keep_id_suffix: false); end
322
+
323
+ sig { params(zone: T.nilable(T.any(ActiveSupport::TimeZone, String))).returns(T.any(ActiveSupport::TimeWithZone, Time)) }
324
+ def in_time_zone(zone = ::Time.zone); end
325
+
326
+ sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(String) }
327
+ def indent(amount, indent_string = nil, indent_empty_lines = false); end
328
+
329
+ sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(T.nilable(String)) }
330
+ def indent!(amount, indent_string = nil, indent_empty_lines = false); end
331
+
332
+ sig { returns(ActiveSupport::StringInquirer) }
333
+ def inquiry; end
334
+
335
+ sig { returns(T::Boolean) }
336
+ def is_utf8?; end
337
+
338
+ sig { params(limit: Integer).returns(String) }
339
+ def last(limit = 1); end
340
+
341
+ sig { returns(ActiveSupport::Multibyte::Chars) }
342
+ def mb_chars; end
343
+
344
+ sig { params(separator: String, preserve_case: T::Boolean, locale: T.nilable(Symbol)).returns(String) }
345
+ def parameterize(separator: "-", preserve_case: false, locale: nil); end
346
+
347
+ sig { params(count: T.nilable(T.any(Integer, Symbol)), locale: T.nilable(Symbol)).returns(String) }
348
+ def pluralize(count = nil, locale = :en); end
349
+
350
+ sig { params(patterns: T.any(String, Regexp)).returns(String) }
351
+ def remove(*patterns); end
352
+
353
+ sig { params(patterns: T.any(String, Regexp)).returns(String) }
354
+ def remove!(*patterns); end
355
+
356
+ sig { returns(T.untyped) }
357
+ def safe_constantize; end
358
+
359
+ sig { params(locale: Symbol).returns(String) }
360
+ def singularize(locale = :en); end
361
+
362
+ sig { returns(String) }
363
+ def squish; end
364
+
365
+ sig { returns(String) }
366
+ def squish!; end
367
+
368
+ # alias for `#start_with?`
369
+ sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
370
+ def starts_with?(*string_or_regexp); end
371
+
372
+ sig { returns(String) }
373
+ def strip_heredoc; end
374
+
375
+ sig { returns(String) }
376
+ def tableize; end
377
+
378
+ sig { params(keep_id_suffix: T::Boolean).returns(String) }
379
+ def titlecase(keep_id_suffix: false); end
380
+
381
+ sig { params(keep_id_suffix: T::Boolean).returns(String) }
382
+ def titleize(keep_id_suffix: false); end
383
+
384
+ sig { params(position: Integer).returns(String) }
385
+ def to(position); end
386
+
387
+ sig { returns(::Date) }
388
+ def to_date; end
389
+
390
+ sig { returns(::DateTime) }
391
+ def to_datetime; end
392
+
393
+ sig { params(form: T.nilable(Symbol)).returns(T.nilable(Time)) }
394
+ def to_time(form = :local); end
395
+
396
+ sig { params(truncate_to: Integer, options: T::Hash[Symbol, T.anything]).returns(String) }
397
+ def truncate(truncate_to, options = {}); end
398
+
399
+ sig { params(truncate_to: Integer, omission: T.nilable(String)).returns(String) }
400
+ def truncate_bytes(truncate_to, omission: "…"); end
401
+
402
+ sig { params(words_count: Integer, options: T::Hash[Symbol, T.anything]).returns(String) }
403
+ def truncate_words(words_count, options = {}); end
404
+
405
+ sig { returns(String) }
406
+ def underscore; end
407
+
408
+ sig { returns(String) }
409
+ def upcase_first; end
410
+ end
411
+
412
+ class ActiveSupport::ErrorReporter
413
+ sig { type_parameters(:Block, :Fallback).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), fallback: T.nilable(T.proc.returns(T.type_parameter(:Fallback))), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.any(T.type_parameter(:Block), T.type_parameter(:Fallback))) }
414
+ def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil), &blk); end
415
+
416
+ sig { type_parameters(:Block).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.type_parameter(:Block)) }
417
+ def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil), &blk); end
418
+
419
+ sig { params(error: Exception, handled: T::Boolean, severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void }
420
+ def report(error, handled: true, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end
421
+ end
@@ -0,0 +1,30 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ class ActiveRecord::Base
8
+ # @shim: this is included at runtime https://github.com/rails/globalid/blob/v1.0.0/lib/global_id/railtie.rb#L38
9
+ include GlobalID::Identification
10
+ end
11
+
12
+ module GlobalID::Identification
13
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(GlobalID) }
14
+ def to_gid(options = {}); end
15
+
16
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) }
17
+ def to_gid_param(options = {}); end
18
+
19
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(GlobalID) }
20
+ def to_global_id(options = {}); end
21
+
22
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(SignedGlobalID) }
23
+ def to_sgid(options = {}); end
24
+
25
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) }
26
+ def to_sgid_param(options = {}); end
27
+
28
+ sig { params(options: T::Hash[T.untyped, T.untyped]).returns(SignedGlobalID) }
29
+ def to_signed_global_id(options = {}); end
30
+ end
@@ -0,0 +1,61 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This file was pulled from a central RBI files repository.
5
+ # Please run `bin/tapioca annotations` to update it.
6
+
7
+ module Rails
8
+ class << self
9
+ sig { returns(Rails::Application) }
10
+ def application; end
11
+
12
+ sig { returns(ActiveSupport::BacktraceCleaner) }
13
+ def backtrace_cleaner; end
14
+
15
+ sig { returns(ActiveSupport::Cache::Store) }
16
+ def cache; end
17
+
18
+ sig { returns(ActiveSupport::EnvironmentInquirer) }
19
+ def env; end
20
+
21
+ sig { returns(ActiveSupport::ErrorReporter) }
22
+ def error; end
23
+
24
+ sig { returns(ActiveSupport::Logger) }
25
+ def logger; end
26
+
27
+ sig { returns(Pathname) }
28
+ def root; end
29
+
30
+ sig { returns(String) }
31
+ def version; end
32
+ end
33
+ end
34
+
35
+ class Rails::Application < ::Rails::Engine
36
+ class << self
37
+ sig { params(block: T.proc.bind(Rails::Application).void).void }
38
+ def configure(&block); end
39
+ end
40
+
41
+ sig { params(block: T.proc.bind(Rails::Application).void).void }
42
+ def configure(&block); end
43
+
44
+ sig { returns(T.untyped) }
45
+ def config; end
46
+ end
47
+
48
+ class Rails::Engine < ::Rails::Railtie
49
+ sig { params(block: T.untyped).returns(ActionDispatch::Routing::RouteSet) }
50
+ def routes(&block); end
51
+ end
52
+
53
+ class Rails::Railtie
54
+ sig { params(block: T.proc.bind(Rails::Railtie).void).void }
55
+ def configure(&block); end
56
+ end
57
+
58
+ class Rails::Railtie::Configuration
59
+ sig { params(blk: T.proc.bind(ActiveSupport::Reloader).void).void }
60
+ def to_prepare(&blk); end
61
+ end