searchcraft 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.gem_rbs_collection/actionpack/6.0/.rbs_meta.yaml +9 -0
  3. data/.gem_rbs_collection/actionpack/6.0/actioncontroller.rbs +127 -0
  4. data/.gem_rbs_collection/actionpack/6.0/actionpack-generated.rbs +12094 -0
  5. data/.gem_rbs_collection/actionpack/6.0/patch.rbs +93 -0
  6. data/.gem_rbs_collection/actionview/6.0/.rbs_meta.yaml +9 -0
  7. data/.gem_rbs_collection/actionview/6.0/actionview-generated.rbs +10768 -0
  8. data/.gem_rbs_collection/actionview/6.0/patch.rbs +64 -0
  9. data/.gem_rbs_collection/activemodel/7.0/.rbs_meta.yaml +9 -0
  10. data/.gem_rbs_collection/activemodel/7.0/activemodel-7.0.rbs +1 -0
  11. data/.gem_rbs_collection/activemodel/7.0/activemodel-generated.rbs +4319 -0
  12. data/.gem_rbs_collection/activemodel/7.0/manifest.yaml +12 -0
  13. data/.gem_rbs_collection/activemodel/7.0/patch.rbs +20 -0
  14. data/.gem_rbs_collection/activerecord/7.0/.rbs_meta.yaml +9 -0
  15. data/.gem_rbs_collection/activerecord/7.0/activerecord-7.0.rbs +21 -0
  16. data/.gem_rbs_collection/activerecord/7.0/activerecord-generated.rbs +24943 -0
  17. data/.gem_rbs_collection/activerecord/7.0/activerecord.rbs +563 -0
  18. data/.gem_rbs_collection/activerecord/7.0/manifest.yaml +12 -0
  19. data/.gem_rbs_collection/activerecord/7.0/patch.rbs +41 -0
  20. data/.gem_rbs_collection/activerecord/7.0/railties.rbs +120 -0
  21. data/.gem_rbs_collection/activesupport/7.0/.rbs_meta.yaml +9 -0
  22. data/.gem_rbs_collection/activesupport/7.0/activesupport-7.0.rbs +51 -0
  23. data/.gem_rbs_collection/activesupport/7.0/activesupport-generated.rbs +12672 -0
  24. data/.gem_rbs_collection/activesupport/7.0/activesupport.rbs +237 -0
  25. data/.gem_rbs_collection/activesupport/7.0/manifest.yaml +14 -0
  26. data/.gem_rbs_collection/activesupport/7.0/patch.rbs +89 -0
  27. data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +9 -0
  28. data/.gem_rbs_collection/ast/2.4/ast.rbs +73 -0
  29. data/.gem_rbs_collection/concurrent-ruby/1.1/.rbs_meta.yaml +9 -0
  30. data/.gem_rbs_collection/concurrent-ruby/1.1/executor.rbs +26 -0
  31. data/.gem_rbs_collection/concurrent-ruby/1.1/promises.rbs +249 -0
  32. data/.gem_rbs_collection/concurrent-ruby/1.1/utility/processor_counter.rbs +5 -0
  33. data/.gem_rbs_collection/i18n/1.10/.rbs_meta.yaml +9 -0
  34. data/.gem_rbs_collection/i18n/1.10/backend.rbs +269 -0
  35. data/.gem_rbs_collection/i18n/1.10/i18n.rbs +117 -0
  36. data/.gem_rbs_collection/listen/3.2/.rbs_meta.yaml +9 -0
  37. data/.gem_rbs_collection/listen/3.2/listen.rbs +25 -0
  38. data/.gem_rbs_collection/listen/3.2/listener.rbs +24 -0
  39. data/.gem_rbs_collection/nokogiri/1.11/.rbs_meta.yaml +9 -0
  40. data/.gem_rbs_collection/nokogiri/1.11/nokogiri.rbs +2332 -0
  41. data/.gem_rbs_collection/nokogiri/1.11/patch.rbs +4 -0
  42. data/.gem_rbs_collection/rack/2.2/.rbs_meta.yaml +9 -0
  43. data/.gem_rbs_collection/rack/2.2/manifest.yaml +3 -0
  44. data/.gem_rbs_collection/rack/2.2/rack.rbs +1433 -0
  45. data/.gem_rbs_collection/rails-dom-testing/2.0/.rbs_meta.yaml +9 -0
  46. data/.gem_rbs_collection/rails-dom-testing/2.0/rails-dom-testing.rbs +55 -0
  47. data/.gem_rbs_collection/railties/6.0/.rbs_meta.yaml +9 -0
  48. data/.gem_rbs_collection/railties/6.0/manifest.yaml +2 -0
  49. data/.gem_rbs_collection/railties/6.0/patch.rbs +56 -0
  50. data/.gem_rbs_collection/railties/6.0/railties-generated.rbs +4858 -0
  51. data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +9 -0
  52. data/.gem_rbs_collection/rainbow/3.0/global.rbs +7 -0
  53. data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +209 -0
  54. data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +5 -0
  55. data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +9 -0
  56. data/.gem_rbs_collection/rake/13.0/manifest.yaml +2 -0
  57. data/.gem_rbs_collection/rake/13.0/rake.rbs +28 -0
  58. data/.gem_rbs_collection/thor/1.2/.rbs_meta.yaml +9 -0
  59. data/.gem_rbs_collection/thor/1.2/manifest.yaml +7 -0
  60. data/.gem_rbs_collection/thor/1.2/thor.rbs +15 -0
  61. data/.overcommit.yml +10 -27
  62. data/.standard.yml +1 -1
  63. data/CHANGELOG.md +18 -3
  64. data/README.md +85 -1
  65. data/lib/searchcraft/annotate.rb +0 -2
  66. data/lib/searchcraft/builder.rb +5 -2
  67. data/lib/searchcraft/configuration.rb +19 -0
  68. data/lib/searchcraft/depends_on.rb +5 -12
  69. data/lib/searchcraft/dump_schema.rb +0 -2
  70. data/lib/searchcraft/model.rb +34 -32
  71. data/lib/searchcraft/text_search.rb +31 -0
  72. data/lib/searchcraft/version.rb +1 -1
  73. data/lib/searchcraft/view_hash_store.rb +2 -1
  74. data/lib/searchcraft.rb +2 -1
  75. data/rbs_collection.lock.yaml +174 -0
  76. data/rbs_collection.yaml +21 -0
  77. data/sig/ext/misc.rbs +33 -0
  78. data/sig/manifest.yaml +5 -0
  79. data/sig/searchcraft/annotate.rbs +7 -0
  80. data/sig/searchcraft/builder.rbs +58 -0
  81. data/sig/searchcraft/configuration.rbs +31 -0
  82. data/sig/searchcraft/depends_on.rbs +17 -0
  83. data/sig/searchcraft/dump_schema.rbs +5 -0
  84. data/sig/searchcraft/model.rbs +19 -0
  85. data/sig/searchcraft/railtie.rbs +5 -0
  86. data/sig/searchcraft/text_search.rbs +11 -0
  87. data/sig/searchcraft/view_hash_store.rbs +17 -0
  88. data/sig/searchcraft.rbs +17 -1
  89. metadata +86 -14
  90. data/Rakefile +0 -14
@@ -0,0 +1,249 @@
1
+ module Concurrent
2
+ module Promises
3
+ module FactoryMethods
4
+ def any_event: (*(Event | Future[top, top]) futures_and_or_events) -> Event
5
+ def any_event_on: (executor default_executor, *(Event | Future[top, top]) futures_and_or_events) -> Event
6
+
7
+ def any_fulfilled_future: (*Event events) -> Future[nil, bot]
8
+ | [T, E] (*Future[T, E] futures) -> Future[T, E]
9
+ | [T, E] (*(Event | Future[T, E]) futures_and_or_events) -> Future[T | nil, E]
10
+ def any_fulfilled_future_on: (executor default_executor, *Event events) -> Future[nil, bot]
11
+ | [T, E] (executor default_executor, *Future[T, E] futures) -> Future[T, E]
12
+ | [T, E] (executor default_executor, *(Event | Future[T, E]) futures_and_or_events) -> Future[T | nil, E]
13
+
14
+ def any_resolved_future: (*Event events) -> Future[nil, bot]
15
+ | [T, E] (*Future[T, E] futures) -> Future[T, E]
16
+ | [T, E] (*(Event | Future[T, E]) futures_and_or_events) -> Future[T | nil, E]
17
+ alias any any_resolved_future
18
+ def any_resolved_future_on: (executor default_executor, *Event events) -> Future[nil, bot]
19
+ | [T, E] (executor default_executor, *Future[T, E] futures) -> Future[T, E]
20
+ | [T, E] (executor default_executor, *(Event | Future[T, E]) futures_and_or_events) -> Future[T | nil, E]
21
+
22
+ def default_executor: () -> executor
23
+
24
+ def delay: () -> Event
25
+ | [A, T] (*A args) { (*A args) -> T } -> Future[T, Exception]
26
+ def delay_on: (executor default_executor) -> Event
27
+ | [A, T] (executor default_executor, *A args) { (*A args) -> T } -> Future[T, Exception]
28
+
29
+ def fulfilled_future: [T] (T value, ?executor default_executor) -> Future[T, bot]
30
+
31
+ def future: [A, T] (*A args) { (*A args) -> T } -> Future[T, Exception]
32
+ def future_on: [A, T] (executor default_executor, *A args) { (*A args) -> T } -> Future[T, Exception]
33
+
34
+ def make_future: (nil, ?executor default_executor) -> Event
35
+ | [X < AbstractEventFuture] (X event_or_future, ?executor default_executor) -> X
36
+ | [E < Exception] (E reason, ?executor default_executor) -> Future[bot, E]
37
+ | [T] (T value, ?executor default_executor) -> Future[T, bot]
38
+
39
+ def rejected_future: [E] (E reason, ?executor default_executor) -> Future[bot, E]
40
+
41
+ def resolvable_event: () -> ResolvableEvent
42
+ def resolvable_event_on: (executor default_executor) -> ResolvableEvent
43
+
44
+ def resolvable_future: () -> ResolvableFuture[untyped, untyped]
45
+ def resolvable_future_on: (executor default_executor) -> ResolvableFuture[untyped, untyped]
46
+
47
+ def resolved_event: (?executor default_executor) -> Event
48
+
49
+ def resolved_future: [T] (true fulfilled, T value, top reason, ?executor default_executor) -> Future[T, bot]
50
+ | [E] (false fulfilled, top value, E reason, ?executor default_executor) -> Future[bot, E]
51
+ | [T, E] (boolish fulfilled, T? value, E? reason, ?executor default_executor) -> Future[T, E]
52
+
53
+ def schedule: (Numeric | Time intended_time) -> Event
54
+ | [A, T] (Numeric | Time intended_time, *A args) { (*A args) -> T } -> Future[T, Exception]
55
+ def schedule_on: (executor default_executor, Numeric | Time intended_time) -> Event
56
+ | [A, T] (executor default_executor, Numeric | Time intended_time, *A args) { (*A args) -> T } -> Future[T, Exception]
57
+
58
+ def zip_events: (*(Event | Future[top, top]) futures_and_or_events) -> Event
59
+ def zip_events_on: (executor default_executor, *(Event | Future[top, top]) futures_and_or_events) -> Event
60
+
61
+ def zip_futures: (*Event events) -> Future[Array[nil], bot]
62
+ | [T, E] (*Future[T, E] futures) -> Future[Array[T], Array[E]]
63
+ | [T, E] (*(Event | Future[T, E]) futures_and_or_events) -> Future[Array[T | nil], Array[E | nil]]
64
+ alias zip zip_futures
65
+ def zip_futures_on: (executor default_executor, *Event events) -> Future[Array[nil], bot]
66
+ | [T, E] (executor default_executor, *Future[T, E] futures) -> Future[Array[T], Array[E]]
67
+ | [T, E] (executor default_executor, *(Event | Future[T, E]) futures_and_or_events) -> Future[Array[T | nil], Array[E]]
68
+ end
69
+
70
+ extend FactoryMethods
71
+
72
+ class AbstractEventFuture
73
+ def chain: [A, U] (*A args) { (*untyped) -> U } -> Future[U, Exception]
74
+ def chain_on: [A, U] (executor executor, *A args) { (*untyped) -> U } -> Future[U, Exception]
75
+
76
+ def chain_resolvable: (Resolvable resolvable) -> self
77
+ alias tangle chain_resolvable
78
+
79
+ def default_executor: () -> executor
80
+
81
+ def internal_state: () -> Object
82
+
83
+ def on_resolution: [A] (*A args) { (*untyped) -> void } -> self
84
+ def on_resolution!: [A] (*A args) { (*untyped) -> void } -> self
85
+ def on_resolution_using: [A] (executor executor, *A args) { (*untyped) -> void } -> self
86
+
87
+ def resolved?: () -> bool
88
+
89
+ def pending?: () -> bool
90
+
91
+ def state: () -> Symbol
92
+
93
+ def touch: () -> self
94
+
95
+ def wait: (?nil) -> self
96
+ | (Numeric timeout) -> bool
97
+ end
98
+
99
+ class Event < AbstractEventFuture
100
+ def any: (Event | Future[top, top] event_or_future) -> Event
101
+ alias | any
102
+
103
+ def delay: () -> Event
104
+
105
+ def schedule: (Numeric | Time intended_time) -> Event
106
+
107
+ def to_event: () -> self
108
+
109
+ def to_future: () -> Future[nil, bot]
110
+
111
+ def with_default_executor: (executor executor) -> Event
112
+
113
+ def zip: (Event event) -> Event
114
+ | [T, E] (Future[T, E] future) -> Future[T, E]
115
+ alias & zip
116
+
117
+
118
+ ## Following methods are actually defined in the base class and have specific types for Event
119
+
120
+ def chain: [A, U] (*A args) { (*A args) -> U } -> Future[U, Exception]
121
+ def chain_on: [A, U] (executor executor, *A args) { (*A args) -> U } -> Future[U, Exception]
122
+
123
+ def on_resolution: [A] (*A args) { (*A args) -> void } -> self
124
+ def on_resolution!: [A] (*A args) { (*A args) -> void } -> self
125
+ def on_resolution_using: [A] (executor executor, *A args) { (*A args) -> void } -> self
126
+
127
+ def state: () -> (:pending | :resolved)
128
+ end
129
+
130
+ class Future[out T, out E] < AbstractEventFuture
131
+ def any: (Event event) -> Future[T | nil, E]
132
+ | [T2, E2] (Future[T2, E2] future) -> Future[T | T2, E | E2]
133
+ alias | any
134
+
135
+ def delay: () -> Future[T, E]
136
+
137
+ def exception: () -> Exception # TODO: Return type can be narrowed to E when E <: Exception
138
+
139
+ def flat_event: () -> Event
140
+
141
+ def flat_future: (?Integer level) -> untyped # TODO: Valid only if T <: Future[top, top]
142
+ alias flat flat_future
143
+
144
+ def fulfilled?: () -> bool
145
+
146
+ def on_fulfillment: [A] (*A args) { (T value, *A args) -> void } -> self
147
+ def on_fulfillment!: [A] (*A args) { (T value, *A args) -> void } -> self
148
+ def on_fulfillment_using: [A] (executor executor, *A args) { (T value, A args) -> void } -> self
149
+
150
+ def on_rejection: [A] (*A args) { (E reason, *A args) -> void } -> self
151
+ def on_rejection!: [A] (*A args) { (E reason, *A args) -> void } -> self
152
+ def on_rejection_using: [A] (executor executor, *A args) { (E reason, A args) -> void } -> self
153
+
154
+ def reason: (?Numeric timeout) -> (E | nil)
155
+ | [R] (Numeric timeout, R timeout_value) -> (E | R | nil)
156
+
157
+ def rejected?: () -> bool
158
+
159
+ def rescue: [A, U] (*A args) { (E reason, *A args) -> U } -> Future[U, Exception]
160
+ def rescue_on: [A, U] (executor executor, *A args) { (E reason, *A args) -> U } -> Future[U, Exception]
161
+
162
+ def result: (?nil) -> ([true, T, nil] | [false, nil, E])
163
+ | (Numeric timeout) -> ([true, T, nil] | [false, nil, E] | nil)
164
+
165
+ def run: (?^(untyped) -> Future[untyped, untyped]? run_test) -> Future[untyped, untyped] # TODO: Any specific type?
166
+
167
+ def schedule: (Numeric | Time intended_time) -> Future[T, E]
168
+
169
+ def then: [A, U] (*A args) { (T value, *A args) -> U } -> Future[U, E | Exception]
170
+ def then_on: [A, U] (executor executor, *A args) { (T value, *A args) -> U } -> Future[U, E | Exception]
171
+
172
+ def to_event: () -> Event
173
+
174
+ def to_future: () -> self
175
+
176
+ def value: (?Numeric timeout) -> (T | nil)
177
+ | [R] (Numeric timeout, R timeout_value) -> (T | R | nil)
178
+ def value!: (?nil) -> T
179
+ | (Numeric timeout) -> (T | nil)
180
+ | [R] (Numeric timeout, R timeout_value) -> (T | R | nil)
181
+
182
+ def wait!: (?nil) -> self
183
+ | (Numeric timeout) -> bool
184
+
185
+ def with_default_executor: (executor executor) -> Future[T, E]
186
+
187
+ def zip: (Event event) -> Future[T, E]
188
+ | [T2, E2] (Future[T2, E2] future) -> Future[[T, T2], [E, E2]]
189
+ alias & zip
190
+
191
+
192
+ ## Following methods are actually defined in the base class and have specific types for Future
193
+
194
+ def chain: [A, U] (*A args) { (bool fulfilled, T? value, E? reason, *A args) -> U } -> Future[U, Exception]
195
+ def chain_on: [A, U] (executor executor, *A args) { (bool fulfilled, T? value, E? reason, *A args) -> U } -> Future[U, Exception]
196
+
197
+ def on_resolution: [A] (*A args) { (bool fulfilled, T? value, E? reason, *A args) -> void } -> self
198
+ def on_resolution!: [A] (*A args) { (bool fulfilled, T? value, E? reason, *A args) -> void } -> self
199
+ def on_resolution_using: [A] (executor executor, *A args) { (bool fulfilled, T? value, E? reason, *A args) -> void } -> self
200
+
201
+ def state: () -> (:pending | :fulfilled | :rejected)
202
+ end
203
+
204
+ module Resolvable
205
+ end
206
+
207
+ class ResolvableEvent < Event
208
+ include Resolvable
209
+
210
+ def resolve: (?true raise_on_reassign, ?boolish reserved) -> self
211
+ | (boolish raise_on_reassign, ?boolish reserved) -> (self | false)
212
+
213
+ def wait: (Numeric timeout, boolish resolve_on_timeout) -> bool
214
+ | ...
215
+
216
+ def with_hidden_resolvable: () -> Event
217
+ end
218
+
219
+ class ResolvableFuture[T, E] < Future[T, E] # Note: ResolvableFuture is invariant on T and E
220
+ include Resolvable
221
+
222
+ def evalute_to: [A] (*A args) { (*A args) -> T } -> self # TODO: Unsound unless E :> Exception
223
+ def evalute_to!: [A] (*A args) { (*A args) -> T } -> self # TODO: ditto
224
+
225
+ def fulfill: (T value, ?true raise_on_reassign, ?boolish reserved) -> self
226
+ | (T value, boolish raise_on_reassign, ?boolish reserved) -> (self | false)
227
+
228
+ def reason: [R] (Numeric timeout, R timeout_value, [boolish, T?, E?] resolve_on_timeout) -> (E | R | nil)
229
+ | ...
230
+
231
+ def reject: (E reason, ?true raise_on_reassign, ?boolish reserved) -> self
232
+ | (E reason, boolish raise_on_reassign, ?boolish reserved) -> (self | false)
233
+
234
+ def resolve: (?boolish fulfilled, ?T? value, ?E? reason, ?true raise_on_reassign, ?boolish reserved) -> self
235
+ | (boolish fulfilled, T? value, E? reason, boolish raise_on_reassign, ?boolish reserved) -> (self | false)
236
+
237
+ def result: (Numeric timeout, [boolish, T?, E?] resolve_on_timeout) -> ([true, T, nil] | [false, nil, E] | nil)
238
+ | ...
239
+
240
+ def value: [R] (Numeric timeout, R timeout_value, [boolish, T?, E?] resolve_on_timeout) -> (T | R | nil)
241
+ | ...
242
+
243
+ def value!: [R] (Numeric timeout, R timeout_value, [boolish, T?, E?] resolve_on_timeout) -> (T | R | nil)
244
+ | ...
245
+
246
+ def with_hidden_resolvable: () -> Future[T, E]
247
+ end
248
+ end
249
+ end
@@ -0,0 +1,5 @@
1
+ module Concurrent
2
+ # def self.physical_processor_count: () -> Integer
3
+
4
+ # def self.processor_count: () -> Integer
5
+ end
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: i18n
3
+ version: '1.10'
4
+ source:
5
+ type: git
6
+ name: ruby/gem_rbs_collection
7
+ revision: 3e93a59bd5da185b68187991630ac9a54a2468a7
8
+ remote: https://github.com/ruby/gem_rbs_collection.git
9
+ repo_dir: gems
@@ -0,0 +1,269 @@
1
+ module I18n
2
+ def self.cache_store: -> untyped
3
+ def self.cache_store=: (untyped store) -> untyped
4
+ def self.cache_namespace: -> untyped
5
+ def self.cache_namespace=: (untyped namespace) -> untyped
6
+ def self.cache_key_digest: -> untyped
7
+ def self.cache_key_digest=: (untyped key_digest) -> untyped
8
+ def self.perform_caching?: -> bool
9
+
10
+ def self.fallbacks: -> untyped
11
+ def self.fallbacks=: (untyped fallbacks) -> untyped
12
+
13
+ class JSON
14
+ def self.encode: (untyped value) -> untyped
15
+ def self.decode: (untyped value) -> untyped
16
+ end
17
+
18
+ module Backend
19
+ module Base
20
+ include I18n::Backend::Transliterator
21
+
22
+ def load_translations: (*untyped filenames) { (untyped, untyped) -> untyped } -> untyped
23
+ def store_translations: (untyped locale, untyped data, ?untyped options) -> untyped
24
+ def translate: (untyped locale, untyped key, ?untyped options) -> (nil | untyped)
25
+ def exists?: (untyped locale, untyped key, ?untyped options) -> untyped
26
+ def localize: (untyped locale, untyped object, ?::Symbol format, ?untyped options) -> untyped
27
+ def available_locales: -> untyped
28
+ def reload!: -> untyped
29
+ def eager_load!: -> true
30
+ def eager_loaded?: -> bool
31
+ def lookup: (untyped locale, untyped key, ?untyped scope, ?untyped options) -> untyped
32
+ def subtrees?: -> true
33
+ def default: (untyped locale, untyped object, untyped subject, ?untyped options) -> untyped
34
+ def resolve: (untyped locale, untyped object, untyped subject, ?untyped options) -> untyped
35
+ def pluralize: (untyped locale, untyped entry, untyped count) -> untyped
36
+ def interpolate: (untyped locale, untyped subject, ?untyped values) -> untyped
37
+ def deep_interpolate: (untyped locale, untyped data, ?untyped values) -> untyped
38
+ def load_file: (String filename) -> Hash[untyped, untyped]
39
+ def load_rb: (String filename) -> [untyped, false]
40
+ def load_yml: (String filename) -> [untyped, bool]
41
+ def load_json: (String filename) -> [untyped, bool]
42
+ def translate_localization_format: (untyped locale, untyped object, untyped format, untyped options) -> untyped
43
+ def pluralization_key: (untyped entry, untyped count) -> Symbol
44
+ end
45
+
46
+ module Cache
47
+ def translate: (untyped locale, untyped key, ?untyped options) -> untyped
48
+ def fetch: (String cache_key) { -> untyped } -> untyped
49
+ def _fetch: (String cache_key) { -> untyped } -> untyped
50
+ def cache_key: (untyped locale, untyped key, untyped options) -> String
51
+
52
+ private
53
+ def digest_item: (untyped key) -> untyped
54
+ end
55
+
56
+ module CacheFile
57
+ attr_accessor path_roots: Array[untyped]
58
+ def load_file: (String filename) -> untyped
59
+ def normalized_path: (String file) -> String
60
+ end
61
+
62
+ module Cascade
63
+ def lookup: (untyped locale, untyped key, ?Array[untyped] scope, ?untyped options) -> untyped
64
+ end
65
+
66
+ class Chain
67
+ include Implementation
68
+
69
+ module Implementation
70
+ attr_accessor backends: untyped
71
+ def initialize: (*untyped backends) -> void
72
+ def initialized?: -> bool
73
+ def reload!: -> untyped
74
+ def eager_load!: -> untyped
75
+ def store_translations: (untyped locale, untyped data, ?untyped options) -> untyped
76
+ def available_locales: -> untyped
77
+ def translate: (untyped locale, untyped key, ?untyped default_options) -> untyped
78
+ def exists?: (untyped locale, untyped key, ?untyped options) -> untyped
79
+ def localize: (untyped locale, untyped object, ?untyped format, ?untyped options) -> untyped
80
+ def init_translations: -> untyped
81
+ def translations: -> Hash[untyped, untyped]
82
+ def namespace_lookup?: (untyped result, untyped options) -> bool
83
+
84
+ private
85
+ def _deep_merge: (Hash[untyped, untyped] hash, Hash[untyped, untyped] other_hash) -> Hash[untyped, untyped]
86
+ end
87
+ end
88
+
89
+ module Fallbacks
90
+ def translate: (untyped locale, untyped key, ?untyped options) -> untyped
91
+ def resolve_entry: (untyped locale, untyped object, untyped subject, ?untyped options) -> untyped
92
+ def extract_non_symbol_default!: (untyped options) -> untyped
93
+ def exists?: (untyped locale, untyped key, ?untyped options) -> bool
94
+
95
+ private
96
+ def on_fallback: (untyped _original_locale, untyped _fallback_locale, untyped _key, untyped _optoins) -> untyped
97
+ end
98
+
99
+ module Flatten
100
+ SEPARATOR_ESCAPE_CHAR: String
101
+ FLATTEN_SEPARATOR: String
102
+
103
+ def self.normalize_flat_keys: (untyped locale, untyped key, untyped scope, untyped separator) -> String
104
+ def self.escape_default_separator: (untyped key) -> String
105
+ def normalize_flat_keys: (untyped locale, untyped key, untyped scope, untyped separator) -> String
106
+ def links: -> untyped
107
+ def flatten_keys: (Hash[untyped, untyped] hash, untyped escape, ?untyped? prev_key) { (untyped, untyped) -> void } -> untyped
108
+ def flatten_translations: (untyped locale, untyped data, untyped escape, untyped subtree) -> Hash[untyped, untyped]
109
+ def store_link: (untyped locale, String key, untyped link) -> String
110
+ def resolve_link: (untyped locale, untyped key) -> String
111
+ def find_link: (untyped locale, String key) -> [untyped, untyped]?
112
+ def escape_default_separator: (untyped key) -> untyped
113
+ end
114
+
115
+ module Gettext
116
+ def load_po: (String filename) -> [Hash[Symbol, untyped], false]
117
+ def parse: (String filename) -> untyped
118
+ def normalize: (Symbol locale, untyped data) -> untyped
119
+ def normalize_pluralization: (Symbol locale, String key, untyped value) -> [String, Hash[untyped, untyped]]
120
+
121
+ class PoData < Hash[untyped, untyped]
122
+ def set_comment: (untyped msgid_or_sym, untyped comment) -> void
123
+ end
124
+ end
125
+
126
+ module InterpolationCompiler
127
+ def interpolate: (untyped locale, untyped string, untyped values) -> untyped
128
+ def store_translations: (untyped locale, untyped data, ?untyped options) -> untyped
129
+ def compile_all_strings_in: (untyped data) -> untyped
130
+
131
+ module Compiler
132
+ TOKENIZER: Regexp
133
+ INTERPOLATION_SYNTAX_PATTERN: Regexp
134
+ extend Compiler
135
+
136
+ def compile_if_an_interpolation: (untyped string) -> untyped
137
+ def interpolated_str?: (untyped str) -> untyped
138
+ def tokenize: (String str) -> Array[String]
139
+ def compiled_interpolation_body: (String str) -> String
140
+ def handle_interpolation_token: (untyped interpolation, untyped matchdata) -> String
141
+ def compile_interpolation_token: (untyped key) -> String
142
+ def interpolate_or_raise_missing: (untyped key) -> String
143
+ def interpolate_key: (untyped key) -> String
144
+ def direct_key: (untyped key) -> String
145
+ def nil_key: (untyped key) -> String
146
+ def missing_key: (untyped key) -> String
147
+ def reserved_key: (untyped key) -> String
148
+ def escape_plain_str: (String str) -> String
149
+ def escape_key_sym: (untyped key) -> String
150
+ end
151
+ end
152
+
153
+ class KeyValue
154
+ include Implementation
155
+
156
+ module Implementation
157
+ attr_accessor store: untyped
158
+ def initialize: (untyped store, ?bool subtrees) -> void
159
+ def initialized?: -> bool
160
+ def store_translations: (untyped locale, untyped data, ?untyped options) -> untyped
161
+ def available_locales: -> Array[Symbol]
162
+ def translations: -> Hash[untyped, untyped]
163
+ def init_translations: -> void
164
+ def subtrees?: -> bool
165
+ def lookup: (untyped locale, untyped key, ?Array[untyped] scope, ?untyped options) -> untyped
166
+ def pluralize: (untyped locale, untyped entry, untyped count) -> untyped
167
+ end
168
+
169
+ class SubtreeProxy
170
+ def initialize: (untyped master_key, untyped store) -> void
171
+ def has_key?: (untyped key) -> bool
172
+ def []: (untyped key) -> untyped
173
+ def is_a?: (untyped klass) -> bool
174
+ alias kind_of? is_a?
175
+ def instance_of?: (untyped klass) -> bool
176
+ def nil?: -> bool
177
+ def inspect: -> String
178
+ end
179
+ end
180
+
181
+ module Metadata
182
+ def self.included: (untyped base) -> void
183
+ def translate: (untyped locale, untyped key, ?untyped options) -> untyped
184
+ def interpolate: (untyped locale, untyped entry, ?untyped values) -> untyped
185
+ def pluralize: (untyped locale, untyped entry, untyped count) -> untyped
186
+ def with_metadata: (Hash[Symbol, untyped] metadata) { -> untyped } -> untyped
187
+ end
188
+
189
+ class Simple
190
+ include Implementation
191
+
192
+ module Implementation
193
+ def initialized?: -> bool
194
+ def store_translations: (untyped locale, untyped data, ?untyped options) -> untyped
195
+ def available_locales: -> untyped
196
+ def reload!: -> untyped
197
+ def eager_load!: -> untyped
198
+ def translations: (?do_init: bool) -> untyped
199
+ def init_translations: -> true
200
+ def lookup: (untyped locale, untyped key, ?Array[untyped] scope, ?untyped options) -> untyped
201
+ end
202
+ end
203
+
204
+ module Transliterator
205
+ DEFAULT_REPLACEMENT_CHAR: String
206
+
207
+ def transliterate: (untyped locale, untyped string, ?untyped replacement) -> untyped
208
+ def self.get: (?untyped rule) -> (HashTransliterator | ProcTransliterator)
209
+
210
+ class ProcTransliterator
211
+ def initialize: (untyped rule) -> void
212
+ def transliterate: (untyped string, ?untyped replacement) -> untyped
213
+ end
214
+
215
+ class HashTransliterator
216
+ DEFAULT_APPROXIMATIONS: Hash[String, String]
217
+
218
+ def initialize: (?untyped rule) -> void
219
+ def transliterate: (String string, ?untyped replacement) -> String
220
+
221
+ private
222
+ def approximations: -> Hash[untyped, untyped]
223
+ def add_default_approximations: -> Hash[String, String]
224
+ def add: (Hash[untyped, untyped] hash) -> untyped
225
+ end
226
+ end
227
+
228
+ module Memoize
229
+ def available_locales: -> untyped
230
+ def store_translations: (untyped locale, untyped data, ?untyped options) -> untyped
231
+ def reload!: -> untyped
232
+ def eager_load!: -> untyped
233
+ def lookup: (untyped locale, untyped key, ?untyped scope, ?untyped options) -> untyped
234
+ def memoized_lookup: -> untyped
235
+ def reset_memoizations!: (?untyped locale) -> untyped
236
+ end
237
+
238
+ class LazyLoadable
239
+ def initialize: (?lazy_load: bool) -> void
240
+ def initialized?: -> bool
241
+ def reload!: -> untyped
242
+ def eager_load!: -> untyped
243
+ def available_locales: -> untyped
244
+ def lookup: (untyped locale, untyped key, ?Array[untyped] scope, ?untyped options) -> untyped
245
+ def init_translations: -> void
246
+ def initialized_locales: -> Hash[untyped, untyped]
247
+
248
+ private
249
+ def lazy_load?: -> bool
250
+ def load_translations_and_collect_file_errors: (untyped files) -> Array[untyped]
251
+ def filenames_for_current_locale: -> untyped
252
+ def assert_file_named_correctly!: (untyped file, untyped translations) -> void
253
+
254
+ class FilenameIncorrect < StandardError
255
+ def initialize: (untyped file, Symbol? expected_locale, untyped unexpected_locales) -> void
256
+ end
257
+ end
258
+
259
+ class LocaleExtractor
260
+ def self.locale_from_path: (String path) -> Symbol?
261
+ end
262
+
263
+ module Pluralization
264
+ def pluralize: (untyped locale, untyped entry, untyped count) -> untyped
265
+ def pluralizers: -> Hash[untyped, untyped]
266
+ def pluralizer: (untyped locale) -> untyped
267
+ end
268
+ end
269
+ end
@@ -0,0 +1,117 @@
1
+ module I18n
2
+ extend Base
3
+
4
+ RESERVED_KEYS: Array[Symbol]
5
+ DEFAULT_INTERPOLATION_PATTERNS: [Regexp]
6
+ INTERPOLATION_PATTERN: Regexp
7
+ VERSION: String
8
+
9
+ module Base
10
+ def config: -> I18n::Config
11
+ def config=: (I18n::Config value) -> I18n::Config
12
+
13
+ def locale: -> Symbol
14
+ def locale=: (untyped value) -> untyped
15
+ def backend: -> untyped
16
+ def backend=: (untyped value) -> untyped
17
+ def default_locale: -> Symbol
18
+ def default_locale=: (untyped value) -> untyped
19
+ def available_locales: -> Array[String | Symbol]
20
+ def available_locales=: (untyped value) -> untyped
21
+ def default_separator: -> String
22
+ def default_separator=: (String value) -> String
23
+ def exception_handler: -> untyped
24
+ def exception_handler=: (untyped value) -> untyped
25
+ def load_path: -> Array[untyped]
26
+ def load_path=: (untyped value) -> untyped
27
+ def enforce_available_locales: -> untyped
28
+ def enforce_available_locales=: (untyped value) -> untyped
29
+
30
+ def reload!: -> void
31
+ def eager_load!: -> void
32
+ def translate: (String | Symbol | Array[untyped] key, ?throw: bool throw, ?raise: bool raise, ?locale: untyped? locale, **untyped options) -> String
33
+ alias t translate
34
+ def translate!: (untyped key, **untyped options) -> String
35
+ alias t! translate!
36
+ def exists?: (untyped key, ?untyped? _locale, ?locale: untyped locale, **untyped options) -> bool
37
+ def transliterate: (untyped key, ?throw: bool, ?raise: bool, ?locale: untyped?, ?replacement: untyped?, **untyped) -> untyped
38
+ def localize: (untyped object, ?locale: untyped, ?format: untyped, **untyped) -> untyped
39
+ alias l localize
40
+ def with_locale: (?untyped? tmp_locale) { () -> untyped } -> untyped
41
+ def normalize_keys: (untyped locale, untyped key, untyped scope, ?untyped separator) -> Array[Symbol]
42
+ def locale_available?: (Symbol | String locale) -> bool
43
+ def enforce_available_locales!: (untyped locale) -> nil
44
+ def available_locales_initialized?: -> bool
45
+ end
46
+
47
+ class Config
48
+ def locale: -> Symbol
49
+ def locale=: (untyped locale) -> untyped
50
+ def backend: -> untyped
51
+ def backend=: (untyped backend) -> untyped
52
+ def default_locale: -> Symbol
53
+ def default_locale=: (untyped locale) -> untyped
54
+ def available_locales: -> Array[String | Symbol]
55
+ def available_locales_set: -> untyped
56
+ def available_locales=: (untyped locales) -> void
57
+ def available_locales_initialized?: -> bool
58
+ def clear_available_locales_set: -> void
59
+ def default_separator: -> String
60
+ def default_separator=: (String separator) -> String
61
+ def exception_handler: -> untyped
62
+ def exception_handler=: (untyped exception_handler) -> untyped
63
+ def missing_interpolation_argument_handler: -> untyped
64
+ def missing_interpolation_argument_handler=: (untyped exception_handler) -> untyped
65
+ def load_path: -> Array[untyped]
66
+ def load_path=: (untyped load_path) -> void
67
+ def enforce_available_locales: -> untyped
68
+ def enforce_available_locales=: (untyped enforce_available_locales) -> untyped
69
+ def interpolation_patterns: -> untyped
70
+ def interpolation_patterns=: (untyped interpolation_patterns) -> untyped
71
+ end
72
+
73
+ module Utils
74
+ def self.except: (Hash[untyped, untyped] hash, *untyped keys) -> Hash[untyped, untyped]
75
+ | (Hash[untyped, untyped] hash, *untyped keys) -> Hash[untyped, untyped]
76
+ def self.deep_merge: (Hash[untyped, untyped] hash, Hash[untyped, untyped] other_hash) -> Hash[untyped, untyped]
77
+ def self.deep_merge!: (untyped hash, untyped other_hash) -> Hash[untyped, untyped]
78
+ def self.deep_symbolize_keys: (Hash[untyped, untyped] hash) -> Hash[Symbol, untyped]
79
+ def self.deep_symbolize_keys_in_object: (untyped value) -> untyped
80
+ end
81
+
82
+ class ArgumentError < ::ArgumentError
83
+ end
84
+
85
+ class Disabled < ArgumentError
86
+ end
87
+
88
+ class InvalidLocale < ArgumentError
89
+ end
90
+
91
+ class InvalidLocaleData < ArgumentError
92
+ end
93
+
94
+ class MissingTranslation < ArgumentError
95
+ end
96
+
97
+ class MissingTranslationData < ArgumentError
98
+ end
99
+
100
+ class InvalidPluralizationData < ArgumentError
101
+ end
102
+
103
+ class MissingInterpolationArgument < ArgumentError
104
+ end
105
+
106
+ class ReservedInterpolationKey < ArgumentError
107
+ end
108
+
109
+ class UnknownFileType < ArgumentError
110
+ end
111
+
112
+ class UnsupportedMethod < ArgumentError
113
+ end
114
+
115
+ class InvalidFilenames < ArgumentError
116
+ end
117
+ end
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: listen
3
+ version: '3.2'
4
+ source:
5
+ type: git
6
+ name: ruby/gem_rbs_collection
7
+ revision: 3e93a59bd5da185b68187991630ac9a54a2468a7
8
+ remote: https://github.com/ruby/gem_rbs_collection.git
9
+ repo_dir: gems
@@ -0,0 +1,25 @@
1
+ module Listen
2
+ # Listens to file system modifications on a either single directory or
3
+ # multiple directories.
4
+ #
5
+ # @param (see Listen::Listener#new)
6
+ #
7
+ # @yield [modified, added, removed] the changed files
8
+ # @yieldparam [Array<String>] modified the list of modified files
9
+ # @yieldparam [Array<String>] added the list of added files
10
+ # @yieldparam [Array<String>] removed the list of removed files
11
+ #
12
+ # @return [Listen::Listener] the listener
13
+ #
14
+ def self.to: (*String dirs,
15
+ ?debug: bool,
16
+ ?wait_for_delay: Integer?,
17
+ ?relative: bool,
18
+ ?force_polling: bool,
19
+ ?ignore: Regexp | Array[Regexp],
20
+ ?ignore!: Regexp,
21
+ ?only: Regexp?,
22
+ ?polling_fallback_message: String?) {
23
+ (Array[String] modified, Array[String] added, Array[String] removed) -> void
24
+ } -> Listener
25
+ end