rubysky 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gem_rbs_collection/activesupport/7.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport-7.0.rbs +140 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport-generated.rbs +11950 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport.rbs +583 -0
- data/.gem_rbs_collection/activesupport/7.0/manifest.yaml +16 -0
- data/.gem_rbs_collection/activesupport/7.0/patch.rbs +55 -0
- data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/ast/2.4/ast.rbs +73 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/array.rbs +4 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/executor.rbs +26 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/hash.rbs +4 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/map.rbs +58 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/promises.rbs +249 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/utility/processor_counter.rbs +5 -0
- data/.gem_rbs_collection/connection_pool/2.4/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/connection_pool/2.4/connection_pool.rbs +34 -0
- data/.gem_rbs_collection/connection_pool/2.4/manifest.yaml +2 -0
- data/.gem_rbs_collection/diff-lcs/1.5/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/diff-lcs/1.5/diff-lcs.rbs +11 -0
- data/.gem_rbs_collection/i18n/1.10/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/i18n/1.10/backend.rbs +269 -0
- data/.gem_rbs_collection/i18n/1.10/i18n.rbs +117 -0
- data/.gem_rbs_collection/listen/3.9/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/listen/3.9/listen.rbs +25 -0
- data/.gem_rbs_collection/listen/3.9/listener.rbs +24 -0
- data/.gem_rbs_collection/parallel/1.20/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/parallel/1.20/parallel.rbs +86 -0
- data/.gem_rbs_collection/parser/3.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/parser/3.2/manifest.yaml +7 -0
- data/.gem_rbs_collection/parser/3.2/parser.rbs +104 -0
- data/.gem_rbs_collection/parser/3.2/polyfill.rbs +4 -0
- data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rainbow/3.0/global.rbs +7 -0
- data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +209 -0
- data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +5 -0
- data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rake/13.0/manifest.yaml +2 -0
- data/.gem_rbs_collection/rake/13.0/rake.rbs +28 -0
- data/.gem_rbs_collection/regexp_parser/2.8/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/regexp_parser/2.8/regexp_parser.rbs +17 -0
- data/.gem_rbs_collection/rubocop/1.57/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubocop/1.57/rubocop.rbs +34 -0
- data/.gem_rbs_collection/rubocop-ast/1.30/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubocop-ast/1.30/rubocop-ast.rbs +15 -0
- data/.gem_rbs_collection/tzinfo/2.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/tzinfo/2.0/manifest.yaml +7 -0
- data/.gem_rbs_collection/tzinfo/2.0/tzinfo.rbs +601 -0
- data/.rspec +3 -0
- data/.rubocop.yml +18 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +12 -0
- data/Steepfile +32 -0
- data/lib/rubysky/client.rb +40 -0
- data/lib/rubysky/post.rb +15 -0
- data/lib/rubysky/raw/client.rb +133 -0
- data/lib/rubysky/raw/did_doc.rb +15 -0
- data/lib/rubysky/raw/embed.rb +18 -0
- data/lib/rubysky/raw/post.rb +29 -0
- data/lib/rubysky/raw/session.rb +41 -0
- data/lib/rubysky/version.rb +5 -0
- data/lib/rubysky.rb +17 -0
- data/rbs_collection.lock.yaml +232 -0
- data/rbs_collection.yaml +18 -0
- data/sig/rubysky.rbs +101 -0
- metadata +129 -0
@@ -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,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
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Listen
|
2
|
+
class Listener
|
3
|
+
# Starts processing events and starts adapters
|
4
|
+
# or resumes invoking callbacks if paused
|
5
|
+
def start: () -> void
|
6
|
+
|
7
|
+
# Stops both listening for events and processing them
|
8
|
+
def stop: () -> void
|
9
|
+
|
10
|
+
# Stops invoking callbacks (messages pile up)
|
11
|
+
def pause: () -> void
|
12
|
+
|
13
|
+
# processing means callbacks are called
|
14
|
+
def processing?: () -> bool
|
15
|
+
|
16
|
+
def paused?: () -> bool
|
17
|
+
|
18
|
+
def ignore: (Regexp regexps) -> void
|
19
|
+
|
20
|
+
def ignore!: (Regexp regexps) -> void
|
21
|
+
|
22
|
+
def only: (Regexp regexps) -> void
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module Parallel
|
2
|
+
class Break < StandardError
|
3
|
+
attr_reader value: untyped
|
4
|
+
|
5
|
+
def initialize: (?untyped value) -> void
|
6
|
+
end
|
7
|
+
|
8
|
+
class Kill < Break
|
9
|
+
end
|
10
|
+
|
11
|
+
type stop = Object
|
12
|
+
Stop: stop
|
13
|
+
|
14
|
+
VERSION: String
|
15
|
+
|
16
|
+
Version: String
|
17
|
+
|
18
|
+
type callable_source[T] = ^() -> (T | stop)
|
19
|
+
|
20
|
+
def self.all?: [T] (Enumerable[T] | callable_source[T] source,
|
21
|
+
?in_processes: Integer,
|
22
|
+
?in_threads: Integer,
|
23
|
+
?progress: _ToStr,
|
24
|
+
?start: ^(T item, Integer index) -> void,
|
25
|
+
?finish: ^(T item, Integer index, boolish result) -> void) { (T) -> boolish } -> bool
|
26
|
+
|
27
|
+
def self.any?: [T] (Enumerable[T] | callable_source[T] source,
|
28
|
+
?in_processes: Integer,
|
29
|
+
?in_threads: Integer,
|
30
|
+
?progress: _ToStr,
|
31
|
+
?start: ^(T item, Integer index) -> void,
|
32
|
+
?finish: ^(T item, Integer index, boolish result) -> void) { (T) -> boolish } -> bool
|
33
|
+
|
34
|
+
def self.each: [T, U] (Enumerable[T] source,
|
35
|
+
?in_processes: Integer,
|
36
|
+
?in_threads: Integer,
|
37
|
+
?progress: _ToStr,
|
38
|
+
?start: ^(T item, Integer index) -> void,
|
39
|
+
?finish: ^(T item, Integer index, U result) -> void) { (T) -> U } -> Enumerable[U]
|
40
|
+
| [T, U] (callable_source[T] source,
|
41
|
+
?in_processes: Integer,
|
42
|
+
?in_threads: Integer,
|
43
|
+
?progress: _ToStr,
|
44
|
+
?start: ^(T item, Integer index) -> void,
|
45
|
+
?finish: ^(T item, Integer index, U result) -> void) { (T) -> U } -> callable_source[T]
|
46
|
+
|
47
|
+
def self.each_with_index: [T, U] (Enumerable[T] source,
|
48
|
+
?in_processes: Integer,
|
49
|
+
?in_threads: Integer,
|
50
|
+
?progress: _ToStr,
|
51
|
+
?start: ^(T item, Integer index) -> void,
|
52
|
+
?finish: ^(T item, Integer index, U result) -> void) { (T, Integer) -> U } -> Enumerable[T]
|
53
|
+
| [T, U] (callable_source[T] array,
|
54
|
+
?in_processes: Integer,
|
55
|
+
?in_threads: Integer,
|
56
|
+
?progress: _ToStr,
|
57
|
+
?start: ^(T item, Integer index) -> void,
|
58
|
+
?finish: ^(T item, Integer index, U result) -> void) { (T, Integer) -> U } -> callable_source[U]
|
59
|
+
|
60
|
+
def self.flat_map: [T, U] (Enumerable[T] | callable_source[T] src,
|
61
|
+
?in_processes: Integer,
|
62
|
+
?in_threads: Integer,
|
63
|
+
?progress: _ToStr,
|
64
|
+
?start: ^(T item, Integer index) -> void,
|
65
|
+
?finish: ^(T item, Integer index, U result) -> void) { (T) -> U } -> Array[U]
|
66
|
+
|
67
|
+
def self.map: [T, U] (Enumerable[T] | callable_source[T] | Thread::Queue source,
|
68
|
+
?in_processes: Integer,
|
69
|
+
?in_threads: Integer,
|
70
|
+
?progress: _ToStr,
|
71
|
+
?start: ^(T item, Integer index) -> void,
|
72
|
+
?finish: ^(T item, Integer index, U result) -> void) { (T) -> U } -> Array[U]
|
73
|
+
|
74
|
+
def self.map_with_index: [T, U] (Enumerable[T] | callable_source[T] source,
|
75
|
+
?in_processes: Integer,
|
76
|
+
?in_threads: Integer,
|
77
|
+
?progress: _ToStr,
|
78
|
+
?start: ^(T item, Integer index) -> untyped,
|
79
|
+
?finish: ^(T item, Integer index, U result) -> untyped) { (T, Integer) -> U } -> Array[U]
|
80
|
+
|
81
|
+
def self.physical_processor_count: () -> Integer
|
82
|
+
|
83
|
+
def self.processor_count: () -> Integer
|
84
|
+
|
85
|
+
def self.worker_number: () -> Integer
|
86
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# manifest.yaml describes dependencies which do not appear in the gemspec.
|
2
|
+
# If this gem includes such dependencies, comment-out the following lines and
|
3
|
+
# declare the dependencies.
|
4
|
+
# If all dependencies appear in the gemspec, you should remove this file.
|
5
|
+
#
|
6
|
+
# dependencies:
|
7
|
+
# - name: pathname
|
@@ -0,0 +1,104 @@
|
|
1
|
+
module Parser
|
2
|
+
CurrentRuby: Parser::Base
|
3
|
+
|
4
|
+
class Base < Racc::Parser
|
5
|
+
def parse: (String string, ?String file, ?Integer line) -> Parser::AST::Node?
|
6
|
+
end
|
7
|
+
|
8
|
+
class Ruby18 < Base
|
9
|
+
end
|
10
|
+
class Ruby19 < Base
|
11
|
+
end
|
12
|
+
class Ruby20 < Base
|
13
|
+
end
|
14
|
+
class Ruby21 < Base
|
15
|
+
end
|
16
|
+
class Ruby22 < Base
|
17
|
+
end
|
18
|
+
class Ruby23 < Base
|
19
|
+
end
|
20
|
+
class Ruby24 < Base
|
21
|
+
end
|
22
|
+
class Ruby25 < Base
|
23
|
+
end
|
24
|
+
class Ruby26 < Base
|
25
|
+
end
|
26
|
+
class Ruby27 < Base
|
27
|
+
end
|
28
|
+
class Ruby30 < Base
|
29
|
+
end
|
30
|
+
class Ruby31 < Base
|
31
|
+
end
|
32
|
+
class Ruby32 < Base
|
33
|
+
end
|
34
|
+
class Ruby33 < Base
|
35
|
+
end
|
36
|
+
|
37
|
+
module AST
|
38
|
+
class Node < ::AST::Node
|
39
|
+
attr_reader location: Source::Map
|
40
|
+
alias loc location
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
module Source
|
45
|
+
class Range
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# A buffer with source code. {Buffer} contains the source code itself,
|
50
|
+
# associated location information (name and first line), and takes care
|
51
|
+
# of encoding.
|
52
|
+
#
|
53
|
+
# A source buffer is immutable once populated.
|
54
|
+
#
|
55
|
+
# @!attribute [r] name
|
56
|
+
# Buffer name. If the buffer was created from a file, the name corresponds
|
57
|
+
# to relative path to the file.
|
58
|
+
# @return [String] buffer name
|
59
|
+
#
|
60
|
+
# @!attribute [r] first_line
|
61
|
+
# First line of the buffer, 1 by default.
|
62
|
+
# @return [Integer] first line
|
63
|
+
#
|
64
|
+
# @api public
|
65
|
+
#
|
66
|
+
class Buffer
|
67
|
+
attr_reader name: String
|
68
|
+
attr_reader first_line: Integer
|
69
|
+
|
70
|
+
def self.recognize_encoding: (String) -> Encoding
|
71
|
+
def self.reencode_string: (String) -> String
|
72
|
+
|
73
|
+
def initialize: (untyped name, ?Integer first_line, ?source: untyped) -> void
|
74
|
+
def read: () -> self
|
75
|
+
def source: () -> String
|
76
|
+
def source=: (String) -> String
|
77
|
+
def raw_source: (String) -> String
|
78
|
+
def decompose_position: (Integer) -> [Integer, Integer]
|
79
|
+
def source_lines: () -> Array[String]
|
80
|
+
def source_line: (Integer) -> String
|
81
|
+
def line_range: (Integer) -> ::Range[Integer]
|
82
|
+
def source_range: () -> ::Range[Integer]
|
83
|
+
def last_line: () -> Integer
|
84
|
+
end
|
85
|
+
|
86
|
+
class TreeRewriter
|
87
|
+
def replace: (untyped range, String content) -> self
|
88
|
+
end
|
89
|
+
|
90
|
+
class Map
|
91
|
+
def line: () -> Integer
|
92
|
+
def first_line: () -> Integer
|
93
|
+
def last_line: () -> Integer
|
94
|
+
def column: () -> Integer
|
95
|
+
def first_column: () -> Integer
|
96
|
+
def last_column: () -> Integer
|
97
|
+
end
|
98
|
+
|
99
|
+
class Comment
|
100
|
+
def location: () -> Map
|
101
|
+
alias loc location
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|