optimistic-json 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/CHANGELOG.md +6 -0
- data/Rakefile +5 -1
- data/lib/optimistic/json/parser.rb +28 -7
- data/lib/optimistic/json/version.rb +2 -1
- data/lib/optimistic/json.rb +1 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +550 -0
- data/sorbet/rbi/gems/benchmark@0.5.0.rbi +621 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1068 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
- data/sorbet/rbi/gems/gem-release@2.2.2.rbi +1335 -0
- data/sorbet/rbi/gems/io-console@0.6.0.rbi +9 -0
- data/sorbet/rbi/gems/json@2.7.0.rbi +1797 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +12986 -0
- data/sorbet/rbi/gems/logger@1.6.0.rbi +845 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +218 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +147 -0
- data/sorbet/rbi/gems/parallel@1.28.0.rbi +270 -0
- data/sorbet/rbi/gems/parser@3.2.2.4.rbi +5154 -0
- data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
- data/sorbet/rbi/gems/psych@5.1.1.1.rbi +2321 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +169 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +362 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3025 -0
- data/sorbet/rbi/gems/rbi@0.3.11.rbi +5505 -0
- data/sorbet/rbi/gems/rbs@4.0.2.rbi +6908 -0
- data/sorbet/rbi/gems/rdoc@6.6.0.rbi +9 -0
- data/sorbet/rbi/gems/regexp_parser@2.8.2.rbi +3268 -0
- data/sorbet/rbi/gems/reline@0.4.1.rbi +9 -0
- data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4798 -0
- data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +9405 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +6013 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +4750 -0
- data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +1261 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +15 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +6750 -0
- data/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +1058 -0
- data/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +875 -0
- data/sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi +7696 -0
- data/sorbet/rbi/gems/rubocop@1.58.0.rbi +53790 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
- data/sorbet/rbi/gems/rubydex@0.2.3.rbi +787 -0
- data/sorbet/rbi/gems/spoom@1.7.14.rbi +6151 -0
- data/sorbet/rbi/gems/stringio@3.1.0.rbi +9 -0
- data/sorbet/rbi/gems/tapioca@0.19.1.rbi +3558 -0
- data/sorbet/rbi/gems/thor@1.5.0.rbi +3870 -0
- data/sorbet/rbi/gems/tsort@0.2.0.rbi +387 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +64 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +54 -22
- data/sig/optimistic/json.rbs +0 -6
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
|
|
3
|
+
# DO NOT EDIT MANUALLY
|
|
4
|
+
# This is an autogenerated file for types exported from the `multi_json` gem.
|
|
5
|
+
# Please instead update this file by running `bin/tapioca gem multi_json`.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:1
|
|
9
|
+
module MultiJson
|
|
10
|
+
include ::MultiJson::Options
|
|
11
|
+
extend ::MultiJson::Options
|
|
12
|
+
extend ::MultiJson
|
|
13
|
+
|
|
14
|
+
# Get the current adapter class.
|
|
15
|
+
#
|
|
16
|
+
# pkg:gem/multi_json#lib/multi_json.rb:70
|
|
17
|
+
def adapter; end
|
|
18
|
+
|
|
19
|
+
# pkg:gem/multi_json#lib/multi_json.rb:95
|
|
20
|
+
def adapter=(new_adapter); end
|
|
21
|
+
|
|
22
|
+
# pkg:gem/multi_json#lib/multi_json.rb:26
|
|
23
|
+
def cached_options(*_arg0); end
|
|
24
|
+
|
|
25
|
+
# pkg:gem/multi_json#lib/multi_json.rb:129
|
|
26
|
+
def current_adapter(options = T.unsafe(nil)); end
|
|
27
|
+
|
|
28
|
+
# pkg:gem/multi_json#lib/multi_json.rb:127
|
|
29
|
+
def decode(string, options = T.unsafe(nil)); end
|
|
30
|
+
|
|
31
|
+
# The default adapter based on what you currently
|
|
32
|
+
# have loaded and installed. First checks to see
|
|
33
|
+
# if any adapters are already loaded, then checks
|
|
34
|
+
# to see which are installed if none are loaded.
|
|
35
|
+
#
|
|
36
|
+
# pkg:gem/multi_json#lib/multi_json.rb:46
|
|
37
|
+
def default_adapter; end
|
|
38
|
+
|
|
39
|
+
# pkg:gem/multi_json#lib/multi_json.rb:67
|
|
40
|
+
def default_engine; end
|
|
41
|
+
|
|
42
|
+
# pkg:gem/multi_json#lib/multi_json.rb:18
|
|
43
|
+
def default_options; end
|
|
44
|
+
|
|
45
|
+
# pkg:gem/multi_json#lib/multi_json.rb:11
|
|
46
|
+
def default_options=(value); end
|
|
47
|
+
|
|
48
|
+
# Encodes a Ruby object as JSON.
|
|
49
|
+
#
|
|
50
|
+
# pkg:gem/multi_json#lib/multi_json.rb:138
|
|
51
|
+
def dump(object, options = T.unsafe(nil)); end
|
|
52
|
+
|
|
53
|
+
# pkg:gem/multi_json#lib/multi_json.rb:141
|
|
54
|
+
def encode(object, options = T.unsafe(nil)); end
|
|
55
|
+
|
|
56
|
+
# pkg:gem/multi_json#lib/multi_json.rb:77
|
|
57
|
+
def engine; end
|
|
58
|
+
|
|
59
|
+
# pkg:gem/multi_json#lib/multi_json.rb:96
|
|
60
|
+
def engine=(new_adapter); end
|
|
61
|
+
|
|
62
|
+
# Decode a JSON string into Ruby.
|
|
63
|
+
#
|
|
64
|
+
# <b>Options</b>
|
|
65
|
+
#
|
|
66
|
+
# <tt>:symbolize_keys</tt> :: If true, will use symbols instead of strings for the keys.
|
|
67
|
+
# <tt>:adapter</tt> :: If set, the selected adapter will be used for this call.
|
|
68
|
+
#
|
|
69
|
+
# pkg:gem/multi_json#lib/multi_json.rb:119
|
|
70
|
+
def load(string, options = T.unsafe(nil)); end
|
|
71
|
+
|
|
72
|
+
# pkg:gem/multi_json#lib/multi_json.rb:98
|
|
73
|
+
def load_adapter(new_adapter); end
|
|
74
|
+
|
|
75
|
+
# pkg:gem/multi_json#lib/multi_json.rb:26
|
|
76
|
+
def reset_cached_options!(*_arg0); end
|
|
77
|
+
|
|
78
|
+
# Set the JSON parser utilizing a symbol, string, or class.
|
|
79
|
+
# Supported by default are:
|
|
80
|
+
#
|
|
81
|
+
# * <tt>:oj</tt>
|
|
82
|
+
# * <tt>:json_gem</tt>
|
|
83
|
+
# * <tt>:json_pure</tt>
|
|
84
|
+
# * <tt>:ok_json</tt>
|
|
85
|
+
# * <tt>:yajl</tt>
|
|
86
|
+
# * <tt>:nsjsonserialization</tt> (MacRuby only)
|
|
87
|
+
# * <tt>:gson</tt> (JRuby only)
|
|
88
|
+
# * <tt>:jr_jackson</tt> (JRuby only)
|
|
89
|
+
#
|
|
90
|
+
# pkg:gem/multi_json#lib/multi_json.rb:90
|
|
91
|
+
def use(new_adapter); end
|
|
92
|
+
|
|
93
|
+
# Executes passed block using specified adapter.
|
|
94
|
+
#
|
|
95
|
+
# pkg:gem/multi_json#lib/multi_json.rb:144
|
|
96
|
+
def with_adapter(new_adapter); end
|
|
97
|
+
|
|
98
|
+
# pkg:gem/multi_json#lib/multi_json.rb:151
|
|
99
|
+
def with_engine(new_adapter); end
|
|
100
|
+
|
|
101
|
+
private
|
|
102
|
+
|
|
103
|
+
# pkg:gem/multi_json#lib/multi_json.rb:155
|
|
104
|
+
def load_adapter_from_string_name(name); end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# pkg:gem/multi_json#lib/multi_json.rb:31
|
|
108
|
+
MultiJson::ALIASES = T.let(T.unsafe(nil), Hash)
|
|
109
|
+
|
|
110
|
+
# pkg:gem/multi_json#lib/multi_json/adapter_error.rb:2
|
|
111
|
+
class MultiJson::AdapterError < ::ArgumentError
|
|
112
|
+
# pkg:gem/multi_json#lib/multi_json/adapter_error.rb:3
|
|
113
|
+
def cause; end
|
|
114
|
+
|
|
115
|
+
class << self
|
|
116
|
+
# pkg:gem/multi_json#lib/multi_json/adapter_error.rb:5
|
|
117
|
+
def build(original_exception); end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# pkg:gem/multi_json#lib/multi_json/parse_error.rb:16
|
|
122
|
+
MultiJson::DecodeError = MultiJson::ParseError
|
|
123
|
+
|
|
124
|
+
# pkg:gem/multi_json#lib/multi_json/parse_error.rb:16
|
|
125
|
+
MultiJson::LoadError = MultiJson::ParseError
|
|
126
|
+
|
|
127
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:2
|
|
128
|
+
module MultiJson::Options
|
|
129
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:25
|
|
130
|
+
def default_dump_options; end
|
|
131
|
+
|
|
132
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:21
|
|
133
|
+
def default_load_options; end
|
|
134
|
+
|
|
135
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:17
|
|
136
|
+
def dump_options(*args); end
|
|
137
|
+
|
|
138
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:8
|
|
139
|
+
def dump_options=(options); end
|
|
140
|
+
|
|
141
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:13
|
|
142
|
+
def load_options(*args); end
|
|
143
|
+
|
|
144
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:3
|
|
145
|
+
def load_options=(options); end
|
|
146
|
+
|
|
147
|
+
private
|
|
148
|
+
|
|
149
|
+
# pkg:gem/multi_json#lib/multi_json/options.rb:31
|
|
150
|
+
def get_options(options, *args); end
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# pkg:gem/multi_json#lib/multi_json/options_cache.rb:2
|
|
154
|
+
module MultiJson::OptionsCache
|
|
155
|
+
extend ::MultiJson::OptionsCache
|
|
156
|
+
|
|
157
|
+
# pkg:gem/multi_json#lib/multi_json/options_cache.rb:10
|
|
158
|
+
def fetch(type, key, &block); end
|
|
159
|
+
|
|
160
|
+
# pkg:gem/multi_json#lib/multi_json/options_cache.rb:5
|
|
161
|
+
def reset; end
|
|
162
|
+
|
|
163
|
+
private
|
|
164
|
+
|
|
165
|
+
# pkg:gem/multi_json#lib/multi_json/options_cache.rb:24
|
|
166
|
+
def write(cache, key); end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Normally MultiJson is used with a few option sets for both dump/load
|
|
170
|
+
# methods. When options are generated dynamically though, every call would
|
|
171
|
+
# cause a cache miss and the cache would grow indefinitely. To prevent
|
|
172
|
+
# this, we just reset the cache every time the number of keys outgrows
|
|
173
|
+
# 1000.
|
|
174
|
+
#
|
|
175
|
+
# pkg:gem/multi_json#lib/multi_json/options_cache.rb:22
|
|
176
|
+
MultiJson::OptionsCache::MAX_CACHE_SIZE = T.let(T.unsafe(nil), Integer)
|
|
177
|
+
|
|
178
|
+
# pkg:gem/multi_json#lib/multi_json/parse_error.rb:2
|
|
179
|
+
class MultiJson::ParseError < ::StandardError
|
|
180
|
+
# pkg:gem/multi_json#lib/multi_json/parse_error.rb:3
|
|
181
|
+
def cause; end
|
|
182
|
+
|
|
183
|
+
# pkg:gem/multi_json#lib/multi_json/parse_error.rb:3
|
|
184
|
+
def data; end
|
|
185
|
+
|
|
186
|
+
class << self
|
|
187
|
+
# pkg:gem/multi_json#lib/multi_json/parse_error.rb:5
|
|
188
|
+
def build(original_exception, data); end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# pkg:gem/multi_json#lib/multi_json.rb:33
|
|
193
|
+
MultiJson::REQUIREMENT_MAP = T.let(T.unsafe(nil), Array)
|
|
194
|
+
|
|
195
|
+
# pkg:gem/multi_json#lib/multi_json/version.rb:16
|
|
196
|
+
MultiJson::VERSION = T.let(T.unsafe(nil), String)
|
|
197
|
+
|
|
198
|
+
# pkg:gem/multi_json#lib/multi_json/version.rb:2
|
|
199
|
+
class MultiJson::Version
|
|
200
|
+
class << self
|
|
201
|
+
# @return [String]
|
|
202
|
+
#
|
|
203
|
+
# pkg:gem/multi_json#lib/multi_json/version.rb:10
|
|
204
|
+
def to_s; end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# pkg:gem/multi_json#lib/multi_json/version.rb:3
|
|
209
|
+
MultiJson::Version::MAJOR = T.let(T.unsafe(nil), Integer)
|
|
210
|
+
|
|
211
|
+
# pkg:gem/multi_json#lib/multi_json/version.rb:4
|
|
212
|
+
MultiJson::Version::MINOR = T.let(T.unsafe(nil), Integer)
|
|
213
|
+
|
|
214
|
+
# pkg:gem/multi_json#lib/multi_json/version.rb:5
|
|
215
|
+
MultiJson::Version::PATCH = T.let(T.unsafe(nil), Integer)
|
|
216
|
+
|
|
217
|
+
# pkg:gem/multi_json#lib/multi_json/version.rb:6
|
|
218
|
+
MultiJson::Version::PRE = T.let(T.unsafe(nil), T.untyped)
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
|
|
3
|
+
# DO NOT EDIT MANUALLY
|
|
4
|
+
# This is an autogenerated file for types exported from the `netrc` gem.
|
|
5
|
+
# Please instead update this file by running `bin/tapioca gem netrc`.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# pkg:gem/netrc#lib/netrc.rb:3
|
|
9
|
+
class Netrc
|
|
10
|
+
# pkg:gem/netrc#lib/netrc.rb:166
|
|
11
|
+
def initialize(path, data); end
|
|
12
|
+
|
|
13
|
+
# pkg:gem/netrc#lib/netrc.rb:180
|
|
14
|
+
def [](k); end
|
|
15
|
+
|
|
16
|
+
# pkg:gem/netrc#lib/netrc.rb:188
|
|
17
|
+
def []=(k, info); end
|
|
18
|
+
|
|
19
|
+
# pkg:gem/netrc#lib/netrc.rb:200
|
|
20
|
+
def delete(key); end
|
|
21
|
+
|
|
22
|
+
# pkg:gem/netrc#lib/netrc.rb:211
|
|
23
|
+
def each(&block); end
|
|
24
|
+
|
|
25
|
+
# pkg:gem/netrc#lib/netrc.rb:196
|
|
26
|
+
def length; end
|
|
27
|
+
|
|
28
|
+
# pkg:gem/netrc#lib/netrc.rb:215
|
|
29
|
+
def new_item(m, l, p); end
|
|
30
|
+
|
|
31
|
+
# pkg:gem/netrc#lib/netrc.rb:178
|
|
32
|
+
def new_item_prefix; end
|
|
33
|
+
|
|
34
|
+
# pkg:gem/netrc#lib/netrc.rb:178
|
|
35
|
+
def new_item_prefix=(_arg0); end
|
|
36
|
+
|
|
37
|
+
# pkg:gem/netrc#lib/netrc.rb:219
|
|
38
|
+
def save; end
|
|
39
|
+
|
|
40
|
+
# pkg:gem/netrc#lib/netrc.rb:233
|
|
41
|
+
def unparse; end
|
|
42
|
+
|
|
43
|
+
class << self
|
|
44
|
+
# pkg:gem/netrc#lib/netrc.rb:42
|
|
45
|
+
def check_permissions(path); end
|
|
46
|
+
|
|
47
|
+
# pkg:gem/netrc#lib/netrc.rb:33
|
|
48
|
+
def config; end
|
|
49
|
+
|
|
50
|
+
# pkg:gem/netrc#lib/netrc.rb:37
|
|
51
|
+
def configure; end
|
|
52
|
+
|
|
53
|
+
# pkg:gem/netrc#lib/netrc.rb:10
|
|
54
|
+
def default_path; end
|
|
55
|
+
|
|
56
|
+
# pkg:gem/netrc#lib/netrc.rb:14
|
|
57
|
+
def home_path; end
|
|
58
|
+
|
|
59
|
+
# pkg:gem/netrc#lib/netrc.rb:85
|
|
60
|
+
def lex(lines); end
|
|
61
|
+
|
|
62
|
+
# pkg:gem/netrc#lib/netrc.rb:29
|
|
63
|
+
def netrc_filename; end
|
|
64
|
+
|
|
65
|
+
# Returns two values, a header and a list of items.
|
|
66
|
+
# Each item is a tuple, containing some or all of:
|
|
67
|
+
# - machine keyword (including trailing whitespace+comments)
|
|
68
|
+
# - machine name
|
|
69
|
+
# - login keyword (including surrounding whitespace+comments)
|
|
70
|
+
# - login
|
|
71
|
+
# - password keyword (including surrounding whitespace+comments)
|
|
72
|
+
# - password
|
|
73
|
+
# - trailing chars
|
|
74
|
+
# This lets us change individual fields, then write out the file
|
|
75
|
+
# with all its original formatting.
|
|
76
|
+
#
|
|
77
|
+
# pkg:gem/netrc#lib/netrc.rb:129
|
|
78
|
+
def parse(ts); end
|
|
79
|
+
|
|
80
|
+
# Reads path and parses it as a .netrc file. If path doesn't
|
|
81
|
+
# exist, returns an empty object. Decrypt paths ending in .gpg.
|
|
82
|
+
#
|
|
83
|
+
# pkg:gem/netrc#lib/netrc.rb:51
|
|
84
|
+
def read(path = T.unsafe(nil)); end
|
|
85
|
+
|
|
86
|
+
# pkg:gem/netrc#lib/netrc.rb:112
|
|
87
|
+
def skip?(s); end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# pkg:gem/netrc#lib/netrc.rb:8
|
|
92
|
+
Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped)
|
|
93
|
+
|
|
94
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
95
|
+
class Netrc::Entry < ::Struct
|
|
96
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
97
|
+
def login; end
|
|
98
|
+
|
|
99
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
100
|
+
def login=(_); end
|
|
101
|
+
|
|
102
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
103
|
+
def password; end
|
|
104
|
+
|
|
105
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
106
|
+
def password=(_); end
|
|
107
|
+
|
|
108
|
+
# pkg:gem/netrc#lib/netrc.rb:245
|
|
109
|
+
def to_ary; end
|
|
110
|
+
|
|
111
|
+
class << self
|
|
112
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
113
|
+
def [](*_arg0); end
|
|
114
|
+
|
|
115
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
116
|
+
def inspect; end
|
|
117
|
+
|
|
118
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
119
|
+
def keyword_init?; end
|
|
120
|
+
|
|
121
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
122
|
+
def members; end
|
|
123
|
+
|
|
124
|
+
# pkg:gem/netrc#lib/netrc.rb:244
|
|
125
|
+
def new(*_arg0); end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# pkg:gem/netrc#lib/netrc.rb:250
|
|
130
|
+
class Netrc::Error < ::StandardError; end
|
|
131
|
+
|
|
132
|
+
# pkg:gem/netrc#lib/netrc.rb:68
|
|
133
|
+
class Netrc::TokenArray < ::Array
|
|
134
|
+
# pkg:gem/netrc#lib/netrc.rb:76
|
|
135
|
+
def readto; end
|
|
136
|
+
|
|
137
|
+
# pkg:gem/netrc#lib/netrc.rb:69
|
|
138
|
+
def take; end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# pkg:gem/netrc#lib/netrc.rb:4
|
|
142
|
+
Netrc::VERSION = T.let(T.unsafe(nil), String)
|
|
143
|
+
|
|
144
|
+
# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows
|
|
145
|
+
#
|
|
146
|
+
# pkg:gem/netrc#lib/netrc.rb:7
|
|
147
|
+
Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped)
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
|
|
3
|
+
# DO NOT EDIT MANUALLY
|
|
4
|
+
# This is an autogenerated file for types exported from the `parallel` gem.
|
|
5
|
+
# Please instead update this file by running `bin/tapioca gem parallel`.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# pkg:gem/parallel#lib/parallel/version.rb:2
|
|
9
|
+
module Parallel
|
|
10
|
+
class << self
|
|
11
|
+
# pkg:gem/parallel#lib/parallel.rb:254
|
|
12
|
+
def all?(*args, &block); end
|
|
13
|
+
|
|
14
|
+
# pkg:gem/parallel#lib/parallel.rb:249
|
|
15
|
+
def any?(*args, &block); end
|
|
16
|
+
|
|
17
|
+
# pkg:gem/parallel#lib/parallel.rb:245
|
|
18
|
+
def each(array, options = T.unsafe(nil), &block); end
|
|
19
|
+
|
|
20
|
+
# pkg:gem/parallel#lib/parallel.rb:259
|
|
21
|
+
def each_with_index(array, options = T.unsafe(nil), &block); end
|
|
22
|
+
|
|
23
|
+
# pkg:gem/parallel#lib/parallel.rb:318
|
|
24
|
+
def filter_map(*_arg0, **_arg1, &_arg2); end
|
|
25
|
+
|
|
26
|
+
# pkg:gem/parallel#lib/parallel.rb:314
|
|
27
|
+
def flat_map(*_arg0, **_arg1, &_arg2); end
|
|
28
|
+
|
|
29
|
+
# pkg:gem/parallel#lib/parallel.rb:239
|
|
30
|
+
def in_processes(options = T.unsafe(nil), &block); end
|
|
31
|
+
|
|
32
|
+
# pkg:gem/parallel#lib/parallel.rb:223
|
|
33
|
+
def in_threads(options = T.unsafe(nil)); end
|
|
34
|
+
|
|
35
|
+
# pkg:gem/parallel#lib/parallel.rb:263
|
|
36
|
+
def map(source, options = T.unsafe(nil), &block); end
|
|
37
|
+
|
|
38
|
+
# pkg:gem/parallel#lib/parallel.rb:310
|
|
39
|
+
def map_with_index(array, options = T.unsafe(nil), &block); end
|
|
40
|
+
|
|
41
|
+
# Number of physical processor cores on the current system.
|
|
42
|
+
#
|
|
43
|
+
# pkg:gem/parallel#lib/parallel.rb:323
|
|
44
|
+
def physical_processor_count; end
|
|
45
|
+
|
|
46
|
+
# Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup,
|
|
47
|
+
# used for process scheduling
|
|
48
|
+
#
|
|
49
|
+
# pkg:gem/parallel#lib/parallel.rb:353
|
|
50
|
+
def processor_count; end
|
|
51
|
+
|
|
52
|
+
# pkg:gem/parallel#lib/parallel.rb:357
|
|
53
|
+
def worker_number; end
|
|
54
|
+
|
|
55
|
+
# TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed
|
|
56
|
+
#
|
|
57
|
+
# pkg:gem/parallel#lib/parallel.rb:362
|
|
58
|
+
def worker_number=(worker_num); end
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
62
|
+
# pkg:gem/parallel#lib/parallel.rb:395
|
|
63
|
+
def add_progress_bar!(job_factory, options); end
|
|
64
|
+
|
|
65
|
+
# pkg:gem/parallel#lib/parallel.rb:710
|
|
66
|
+
def available_processor_count; end
|
|
67
|
+
|
|
68
|
+
# pkg:gem/parallel#lib/parallel.rb:658
|
|
69
|
+
def call_with_index(item, index, options, &block); end
|
|
70
|
+
|
|
71
|
+
# pkg:gem/parallel#lib/parallel.rb:590
|
|
72
|
+
def create_workers(job_factory, options, &block); end
|
|
73
|
+
|
|
74
|
+
# options is either a Integer or a Hash with :count
|
|
75
|
+
#
|
|
76
|
+
# pkg:gem/parallel#lib/parallel.rb:648
|
|
77
|
+
def extract_count_from_options(options); end
|
|
78
|
+
|
|
79
|
+
# pkg:gem/parallel#lib/parallel.rb:676
|
|
80
|
+
def instrument_finish(item, index, result, options); end
|
|
81
|
+
|
|
82
|
+
# yield results in the order of the input items
|
|
83
|
+
# needs to use `options` to store state between executions
|
|
84
|
+
# needs to use `done` index since a nil result would also be valid
|
|
85
|
+
#
|
|
86
|
+
# pkg:gem/parallel#lib/parallel.rb:685
|
|
87
|
+
def instrument_finish_in_order(item, index, result, options); end
|
|
88
|
+
|
|
89
|
+
# pkg:gem/parallel#lib/parallel.rb:705
|
|
90
|
+
def instrument_start(item, index, options); end
|
|
91
|
+
|
|
92
|
+
# pkg:gem/parallel#lib/parallel.rb:368
|
|
93
|
+
def physical_processor_count_windows; end
|
|
94
|
+
|
|
95
|
+
# pkg:gem/parallel#lib/parallel.rb:624
|
|
96
|
+
def process_incoming_jobs(read, write, job_factory, options, &block); end
|
|
97
|
+
|
|
98
|
+
# pkg:gem/parallel#lib/parallel.rb:578
|
|
99
|
+
def replace_worker(job_factory, workers, index, options, blk); end
|
|
100
|
+
|
|
101
|
+
# pkg:gem/parallel#lib/parallel.rb:389
|
|
102
|
+
def run(command); end
|
|
103
|
+
|
|
104
|
+
# pkg:gem/parallel#lib/parallel.rb:669
|
|
105
|
+
def with_instrumentation(item, index, options); end
|
|
106
|
+
|
|
107
|
+
# pkg:gem/parallel#lib/parallel.rb:420
|
|
108
|
+
def work_direct(job_factory, options, &block); end
|
|
109
|
+
|
|
110
|
+
# pkg:gem/parallel#lib/parallel.rb:530
|
|
111
|
+
def work_in_processes(job_factory, options, &blk); end
|
|
112
|
+
|
|
113
|
+
# pkg:gem/parallel#lib/parallel.rb:464
|
|
114
|
+
def work_in_ractors(job_factory, options); end
|
|
115
|
+
|
|
116
|
+
# pkg:gem/parallel#lib/parallel.rb:439
|
|
117
|
+
def work_in_threads(job_factory, options, &block); end
|
|
118
|
+
|
|
119
|
+
# pkg:gem/parallel#lib/parallel.rb:598
|
|
120
|
+
def worker(job_factory, options, &block); end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# pkg:gem/parallel#lib/parallel.rb:11
|
|
125
|
+
class Parallel::Break < ::StandardError
|
|
126
|
+
# pkg:gem/parallel#lib/parallel.rb:14
|
|
127
|
+
def initialize(value = T.unsafe(nil)); end
|
|
128
|
+
|
|
129
|
+
# marshal_dump that is used for ruby exceptions
|
|
130
|
+
# avoid dumping the cause since nobody needs that and it can include undumpable exceptions
|
|
131
|
+
#
|
|
132
|
+
# pkg:gem/parallel#lib/parallel.rb:21
|
|
133
|
+
def _dump(_depth); end
|
|
134
|
+
|
|
135
|
+
# pkg:gem/parallel#lib/parallel.rb:12
|
|
136
|
+
def value; end
|
|
137
|
+
|
|
138
|
+
class << self
|
|
139
|
+
# marshal_load that is used for ruby exceptions
|
|
140
|
+
#
|
|
141
|
+
# pkg:gem/parallel#lib/parallel.rb:26
|
|
142
|
+
def _load(data); end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# pkg:gem/parallel#lib/parallel.rb:8
|
|
147
|
+
class Parallel::DeadWorker < ::StandardError; end
|
|
148
|
+
|
|
149
|
+
# pkg:gem/parallel#lib/parallel.rb:43
|
|
150
|
+
class Parallel::ExceptionWrapper
|
|
151
|
+
# pkg:gem/parallel#lib/parallel.rb:46
|
|
152
|
+
def initialize(exception); end
|
|
153
|
+
|
|
154
|
+
# pkg:gem/parallel#lib/parallel.rb:44
|
|
155
|
+
def exception; end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# pkg:gem/parallel#lib/parallel.rb:109
|
|
159
|
+
class Parallel::JobFactory
|
|
160
|
+
# pkg:gem/parallel#lib/parallel.rb:110
|
|
161
|
+
def initialize(source, mutex); end
|
|
162
|
+
|
|
163
|
+
# pkg:gem/parallel#lib/parallel.rb:118
|
|
164
|
+
def next; end
|
|
165
|
+
|
|
166
|
+
# generate item that is sent to workers
|
|
167
|
+
# just index is faster + less likely to blow up with unserializable errors
|
|
168
|
+
#
|
|
169
|
+
# pkg:gem/parallel#lib/parallel.rb:147
|
|
170
|
+
def pack(item, index); end
|
|
171
|
+
|
|
172
|
+
# pkg:gem/parallel#lib/parallel.rb:137
|
|
173
|
+
def size; end
|
|
174
|
+
|
|
175
|
+
# unpack item that is sent to workers
|
|
176
|
+
#
|
|
177
|
+
# pkg:gem/parallel#lib/parallel.rb:152
|
|
178
|
+
def unpack(data); end
|
|
179
|
+
|
|
180
|
+
private
|
|
181
|
+
|
|
182
|
+
# pkg:gem/parallel#lib/parallel.rb:158
|
|
183
|
+
def producer?; end
|
|
184
|
+
|
|
185
|
+
# pkg:gem/parallel#lib/parallel.rb:162
|
|
186
|
+
def queue_wrapper(array); end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# pkg:gem/parallel#lib/parallel.rb:31
|
|
190
|
+
class Parallel::Kill < ::Parallel::Break; end
|
|
191
|
+
|
|
192
|
+
# pkg:gem/parallel#lib/parallel.rb:6
|
|
193
|
+
Parallel::Stop = T.let(T.unsafe(nil), Object)
|
|
194
|
+
|
|
195
|
+
# pkg:gem/parallel#lib/parallel.rb:34
|
|
196
|
+
class Parallel::UndumpableException < ::StandardError
|
|
197
|
+
# pkg:gem/parallel#lib/parallel.rb:37
|
|
198
|
+
def initialize(original); end
|
|
199
|
+
|
|
200
|
+
# pkg:gem/parallel#lib/parallel.rb:35
|
|
201
|
+
def backtrace; end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# pkg:gem/parallel#lib/parallel.rb:167
|
|
205
|
+
class Parallel::UserInterruptHandler
|
|
206
|
+
class << self
|
|
207
|
+
# pkg:gem/parallel#lib/parallel.rb:192
|
|
208
|
+
def kill(thing); end
|
|
209
|
+
|
|
210
|
+
# kill all these pids or threads if user presses Ctrl+c
|
|
211
|
+
#
|
|
212
|
+
# pkg:gem/parallel#lib/parallel.rb:172
|
|
213
|
+
def kill_on_ctrl_c(pids, options); end
|
|
214
|
+
|
|
215
|
+
private
|
|
216
|
+
|
|
217
|
+
# pkg:gem/parallel#lib/parallel.rb:216
|
|
218
|
+
def restore_interrupt(old, signal); end
|
|
219
|
+
|
|
220
|
+
# pkg:gem/parallel#lib/parallel.rb:201
|
|
221
|
+
def trap_interrupt(signal); end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# pkg:gem/parallel#lib/parallel.rb:168
|
|
226
|
+
Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol)
|
|
227
|
+
|
|
228
|
+
# pkg:gem/parallel#lib/parallel/version.rb:3
|
|
229
|
+
Parallel::VERSION = T.let(T.unsafe(nil), String)
|
|
230
|
+
|
|
231
|
+
# pkg:gem/parallel#lib/parallel/version.rb:3
|
|
232
|
+
Parallel::Version = T.let(T.unsafe(nil), String)
|
|
233
|
+
|
|
234
|
+
# pkg:gem/parallel#lib/parallel.rb:62
|
|
235
|
+
class Parallel::Worker
|
|
236
|
+
# pkg:gem/parallel#lib/parallel.rb:66
|
|
237
|
+
def initialize(read, write, pid); end
|
|
238
|
+
|
|
239
|
+
# might be passed to started_processes and simultaneously closed by another thread
|
|
240
|
+
# when running in isolation mode, so we have to check if it is closed before closing
|
|
241
|
+
#
|
|
242
|
+
# pkg:gem/parallel#lib/parallel.rb:79
|
|
243
|
+
def close_pipes; end
|
|
244
|
+
|
|
245
|
+
# pkg:gem/parallel#lib/parallel.rb:63
|
|
246
|
+
def pid; end
|
|
247
|
+
|
|
248
|
+
# pkg:gem/parallel#lib/parallel.rb:63
|
|
249
|
+
def read; end
|
|
250
|
+
|
|
251
|
+
# pkg:gem/parallel#lib/parallel.rb:72
|
|
252
|
+
def stop; end
|
|
253
|
+
|
|
254
|
+
# pkg:gem/parallel#lib/parallel.rb:64
|
|
255
|
+
def thread; end
|
|
256
|
+
|
|
257
|
+
# pkg:gem/parallel#lib/parallel.rb:64
|
|
258
|
+
def thread=(_arg0); end
|
|
259
|
+
|
|
260
|
+
# pkg:gem/parallel#lib/parallel.rb:84
|
|
261
|
+
def work(data); end
|
|
262
|
+
|
|
263
|
+
# pkg:gem/parallel#lib/parallel.rb:63
|
|
264
|
+
def write; end
|
|
265
|
+
|
|
266
|
+
private
|
|
267
|
+
|
|
268
|
+
# pkg:gem/parallel#lib/parallel.rb:102
|
|
269
|
+
def wait; end
|
|
270
|
+
end
|