wal 0.0.0 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/README.md +49 -0
  4. data/Rakefile +9 -1
  5. data/exe/wal +64 -0
  6. data/lib/wal/active_record_context_extension.rb +15 -0
  7. data/lib/wal/noop_watcher.rb +12 -0
  8. data/lib/wal/record_watcher.rb +389 -0
  9. data/lib/wal/replicator.rb +205 -0
  10. data/lib/wal/streaming_watcher.rb +74 -0
  11. data/lib/wal/version.rb +2 -1
  12. data/lib/wal/watcher.rb +95 -0
  13. data/lib/wal.rb +128 -1
  14. data/rbi/wal.rbi +295 -0
  15. data/sig/wal.rbs +184 -2
  16. data/sorbet/config +7 -0
  17. data/sorbet/rbi/annotations/.gitattributes +1 -0
  18. data/sorbet/rbi/annotations/activemodel.rbi +89 -0
  19. data/sorbet/rbi/annotations/activerecord.rbi +98 -0
  20. data/sorbet/rbi/annotations/activesupport.rbi +463 -0
  21. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  22. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  23. data/sorbet/rbi/gems/.gitattributes +1 -0
  24. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +9 -0
  25. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +9 -0
  26. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +9 -0
  27. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +21122 -0
  28. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +9 -0
  29. data/sorbet/rbi/gems/actionview@8.0.2.rbi +16423 -0
  30. data/sorbet/rbi/gems/activejob@8.0.2.rbi +9 -0
  31. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +6866 -0
  32. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +43227 -0
  33. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +9 -0
  34. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +21110 -0
  35. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  36. data/sorbet/rbi/gems/base64@0.3.0.rbi +545 -0
  37. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +619 -0
  38. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +78 -0
  39. data/sorbet/rbi/gems/builder@3.3.0.rbi +9 -0
  40. data/sorbet/rbi/gems/commander@5.0.0.rbi +9 -0
  41. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +11657 -0
  42. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +9 -0
  43. data/sorbet/rbi/gems/crass@1.0.6.rbi +623 -0
  44. data/sorbet/rbi/gems/date@3.4.1.rbi +75 -0
  45. data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +1134 -0
  46. data/sorbet/rbi/gems/docker-api@2.4.0.rbi +1719 -0
  47. data/sorbet/rbi/gems/docopt@0.6.1.rbi +9 -0
  48. data/sorbet/rbi/gems/drb@2.2.3.rbi +1661 -0
  49. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  50. data/sorbet/rbi/gems/excon@1.2.7.rbi +1514 -0
  51. data/sorbet/rbi/gems/globalid@1.2.1.rbi +9 -0
  52. data/sorbet/rbi/gems/highline@3.0.1.rbi +9 -0
  53. data/sorbet/rbi/gems/i18n@1.14.7.rbi +2359 -0
  54. data/sorbet/rbi/gems/io-console@0.8.0.rbi +9 -0
  55. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  56. data/sorbet/rbi/gems/loofah@2.24.1.rbi +1105 -0
  57. data/sorbet/rbi/gems/mail@2.8.1.rbi +9 -0
  58. data/sorbet/rbi/gems/marcel@1.0.4.rbi +9 -0
  59. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +9 -0
  60. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1704 -0
  61. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
  62. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +9 -0
  63. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +9 -0
  64. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +292 -0
  65. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +9 -0
  66. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  67. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +9 -0
  68. data/sorbet/rbi/gems/nokogiri@1.18.8.rbi +8206 -0
  69. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +354 -0
  70. data/sorbet/rbi/gems/parallel@1.27.0.rbi +291 -0
  71. data/sorbet/rbi/gems/parlour@9.1.1.rbi +3071 -0
  72. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +7338 -0
  73. data/sorbet/rbi/gems/pg-replication-protocol@0.0.7.rbi +633 -0
  74. data/sorbet/rbi/gems/pg@1.5.9.rbi +2806 -0
  75. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  76. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  77. data/sorbet/rbi/gems/prism@1.4.0.rbi +41732 -0
  78. data/sorbet/rbi/gems/psych@5.2.3.rbi +2435 -0
  79. data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
  80. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +727 -0
  81. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +734 -0
  82. data/sorbet/rbi/gems/rack@3.1.16.rbi +4940 -0
  83. data/sorbet/rbi/gems/rackup@2.2.1.rbi +230 -0
  84. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +858 -0
  85. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +785 -0
  86. data/sorbet/rbi/gems/rails@8.0.2.rbi +9 -0
  87. data/sorbet/rbi/gems/railties@8.0.2.rbi +3865 -0
  88. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  89. data/sorbet/rbi/gems/rake@13.2.1.rbi +3120 -0
  90. data/sorbet/rbi/gems/rbi@0.3.6.rbi +6893 -0
  91. data/sorbet/rbi/gems/rbs@3.9.4.rbi +6978 -0
  92. data/sorbet/rbi/gems/rdoc@6.12.0.rbi +12760 -0
  93. data/sorbet/rbi/gems/reline@0.6.0.rbi +2451 -0
  94. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5240 -0
  95. data/sorbet/rbi/gems/rspec-core@3.13.4.rbi +11348 -0
  96. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +8189 -0
  97. data/sorbet/rbi/gems/rspec-mocks@3.13.5.rbi +5350 -0
  98. data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +164 -0
  99. data/sorbet/rbi/gems/rspec-support@3.13.4.rbi +1630 -0
  100. data/sorbet/rbi/gems/rspec@3.13.1.rbi +83 -0
  101. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +75 -0
  102. data/sorbet/rbi/gems/spoom@1.6.3.rbi +6985 -0
  103. data/sorbet/rbi/gems/stringio@3.1.5.rbi +9 -0
  104. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3628 -0
  105. data/sorbet/rbi/gems/testcontainers-core@0.2.0.rbi +1005 -0
  106. data/sorbet/rbi/gems/testcontainers-postgres@0.2.0.rbi +145 -0
  107. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  108. data/sorbet/rbi/gems/timeout@0.4.3.rbi +157 -0
  109. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  110. data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
  111. data/sorbet/rbi/gems/useragent@0.16.11.rbi +9 -0
  112. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +9 -0
  113. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +9 -0
  114. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  115. data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
  116. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +9 -0
  117. data/sorbet/tapioca/config.yml +5 -0
  118. data/sorbet/tapioca/require.rb +12 -0
  119. metadata +231 -6
@@ -0,0 +1,354 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `ostruct` gem.
5
+ # Please instead update this file by running `bin/tapioca gem ostruct`.
6
+
7
+
8
+ # An OpenStruct is a data structure, similar to a Hash, that allows the
9
+ # definition of arbitrary attributes with their accompanying values. This is
10
+ # accomplished by using Ruby's metaprogramming to define methods on the class
11
+ # itself.
12
+ #
13
+ # == Examples
14
+ #
15
+ # require "ostruct"
16
+ #
17
+ # person = OpenStruct.new
18
+ # person.name = "John Smith"
19
+ # person.age = 70
20
+ #
21
+ # person.name # => "John Smith"
22
+ # person.age # => 70
23
+ # person.address # => nil
24
+ #
25
+ # An OpenStruct employs a Hash internally to store the attributes and values
26
+ # and can even be initialized with one:
27
+ #
28
+ # australia = OpenStruct.new(:country => "Australia", :capital => "Canberra")
29
+ # # => #<OpenStruct country="Australia", capital="Canberra">
30
+ #
31
+ # Hash keys with spaces or characters that could normally not be used for
32
+ # method calls (e.g. <code>()[]*</code>) will not be immediately available
33
+ # on the OpenStruct object as a method for retrieval or assignment, but can
34
+ # still be reached through the Object#send method or using [].
35
+ #
36
+ # measurements = OpenStruct.new("length (in inches)" => 24)
37
+ # measurements[:"length (in inches)"] # => 24
38
+ # measurements.send("length (in inches)") # => 24
39
+ #
40
+ # message = OpenStruct.new(:queued? => true)
41
+ # message.queued? # => true
42
+ # message.send("queued?=", false)
43
+ # message.queued? # => false
44
+ #
45
+ # Removing the presence of an attribute requires the execution of the
46
+ # delete_field method as setting the property value to +nil+ will not
47
+ # remove the attribute.
48
+ #
49
+ # first_pet = OpenStruct.new(:name => "Rowdy", :owner => "John Smith")
50
+ # second_pet = OpenStruct.new(:name => "Rowdy")
51
+ #
52
+ # first_pet.owner = nil
53
+ # first_pet # => #<OpenStruct name="Rowdy", owner=nil>
54
+ # first_pet == second_pet # => false
55
+ #
56
+ # first_pet.delete_field(:owner)
57
+ # first_pet # => #<OpenStruct name="Rowdy">
58
+ # first_pet == second_pet # => true
59
+ #
60
+ # Ractor compatibility: A frozen OpenStruct with shareable values is itself shareable.
61
+ #
62
+ # == Caveats
63
+ #
64
+ # An OpenStruct utilizes Ruby's method lookup structure to find and define the
65
+ # necessary methods for properties. This is accomplished through the methods
66
+ # method_missing and define_singleton_method.
67
+ #
68
+ # This should be a consideration if there is a concern about the performance of
69
+ # the objects that are created, as there is much more overhead in the setting
70
+ # of these properties compared to using a Hash or a Struct.
71
+ # Creating an open struct from a small Hash and accessing a few of the
72
+ # entries can be 200 times slower than accessing the hash directly.
73
+ #
74
+ # This is a potential security issue; building OpenStruct from untrusted user data
75
+ # (e.g. JSON web request) may be susceptible to a "symbol denial of service" attack
76
+ # since the keys create methods and names of methods are never garbage collected.
77
+ #
78
+ # This may also be the source of incompatibilities between Ruby versions:
79
+ #
80
+ # o = OpenStruct.new
81
+ # o.then # => nil in Ruby < 2.6, enumerator for Ruby >= 2.6
82
+ #
83
+ # Builtin methods may be overwritten this way, which may be a source of bugs
84
+ # or security issues:
85
+ #
86
+ # o = OpenStruct.new
87
+ # o.methods # => [:to_h, :marshal_load, :marshal_dump, :each_pair, ...
88
+ # o.methods = [:foo, :bar]
89
+ # o.methods # => [:foo, :bar]
90
+ #
91
+ # To help remedy clashes, OpenStruct uses only protected/private methods ending with <code>!</code>
92
+ # and defines aliases for builtin public methods by adding a <code>!</code>:
93
+ #
94
+ # o = OpenStruct.new(make: 'Bentley', class: :luxury)
95
+ # o.class # => :luxury
96
+ # o.class! # => OpenStruct
97
+ #
98
+ # It is recommended (but not enforced) to not use fields ending in <code>!</code>;
99
+ # Note that a subclass' methods may not be overwritten, nor can OpenStruct's own methods
100
+ # ending with <code>!</code>.
101
+ #
102
+ # For all these reasons, consider not using OpenStruct at all.
103
+ #
104
+ # source://ostruct//lib/ostruct.rb#109
105
+ class OpenStruct
106
+ # Creates a new OpenStruct object. By default, the resulting OpenStruct
107
+ # object will have no attributes.
108
+ #
109
+ # The optional +hash+, if given, will generate attributes and values
110
+ # (can be a Hash, an OpenStruct or a Struct).
111
+ # For example:
112
+ #
113
+ # require "ostruct"
114
+ # hash = { "country" => "Australia", :capital => "Canberra" }
115
+ # data = OpenStruct.new(hash)
116
+ #
117
+ # data # => #<OpenStruct country="Australia", capital="Canberra">
118
+ #
119
+ # @return [OpenStruct] a new instance of OpenStruct
120
+ #
121
+ # source://ostruct//lib/ostruct.rb#134
122
+ def initialize(hash = T.unsafe(nil)); end
123
+
124
+ # Compares this object and +other+ for equality. An OpenStruct is equal to
125
+ # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are
126
+ # equal.
127
+ #
128
+ # require "ostruct"
129
+ # first_pet = OpenStruct.new("name" => "Rowdy")
130
+ # second_pet = OpenStruct.new(:name => "Rowdy")
131
+ # third_pet = OpenStruct.new("name" => "Rowdy", :age => nil)
132
+ #
133
+ # first_pet == second_pet # => true
134
+ # first_pet == third_pet # => false
135
+ #
136
+ # source://ostruct//lib/ostruct.rb#423
137
+ def ==(other); end
138
+
139
+ # :call-seq:
140
+ # ostruct[name] -> object
141
+ #
142
+ # Returns the value of an attribute, or +nil+ if there is no such attribute.
143
+ #
144
+ # require "ostruct"
145
+ # person = OpenStruct.new("name" => "John Smith", "age" => 70)
146
+ # person[:age] # => 70, same as person.age
147
+ #
148
+ # source://ostruct//lib/ostruct.rb#303
149
+ def [](name); end
150
+
151
+ # :call-seq:
152
+ # ostruct[name] = obj -> obj
153
+ #
154
+ # Sets the value of an attribute.
155
+ #
156
+ # require "ostruct"
157
+ # person = OpenStruct.new("name" => "John Smith", "age" => 70)
158
+ # person[:age] = 42 # equivalent to person.age = 42
159
+ # person.age # => 42
160
+ #
161
+ # source://ostruct//lib/ostruct.rb#318
162
+ def []=(name, value); end
163
+
164
+ # Removes the named field from the object and returns the value the field
165
+ # contained if it was defined. You may optionally provide a block.
166
+ # If the field is not defined, the result of the block is returned,
167
+ # or a NameError is raised if no block was given.
168
+ #
169
+ # require "ostruct"
170
+ #
171
+ # person = OpenStruct.new(name: "John", age: 70, pension: 300)
172
+ #
173
+ # person.delete_field!("age") # => 70
174
+ # person # => #<OpenStruct name="John", pension=300>
175
+ #
176
+ # Setting the value to +nil+ will not remove the attribute:
177
+ #
178
+ # person.pension = nil
179
+ # person # => #<OpenStruct name="John", pension=nil>
180
+ #
181
+ # person.delete_field('number') # => NameError
182
+ #
183
+ # person.delete_field('number') { 8675_309 } # => 8675309
184
+ #
185
+ # source://ostruct//lib/ostruct.rb#371
186
+ def delete_field(name, &block); end
187
+
188
+ # source://ostruct//lib/ostruct.rb#371
189
+ def delete_field!(name, &block); end
190
+
191
+ # :call-seq:
192
+ # ostruct.dig(name, *identifiers) -> object
193
+ #
194
+ # Finds and returns the object in nested objects
195
+ # that is specified by +name+ and +identifiers+.
196
+ # The nested objects may be instances of various classes.
197
+ # See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
198
+ #
199
+ # Examples:
200
+ # require "ostruct"
201
+ # address = OpenStruct.new("city" => "Anytown NC", "zip" => 12345)
202
+ # person = OpenStruct.new("name" => "John Smith", "address" => address)
203
+ # person.dig(:address, "zip") # => 12345
204
+ # person.dig(:business_address, "zip") # => nil
205
+ #
206
+ # source://ostruct//lib/ostruct.rb#340
207
+ def dig(name, *names); end
208
+
209
+ # source://ostruct//lib/ostruct.rb#340
210
+ def dig!(name, *names); end
211
+
212
+ # :call-seq:
213
+ # ostruct.each_pair {|name, value| block } -> ostruct
214
+ # ostruct.each_pair -> Enumerator
215
+ #
216
+ # Yields all attributes (as symbols) along with the corresponding values
217
+ # or returns an enumerator if no block is given.
218
+ #
219
+ # require "ostruct"
220
+ # data = OpenStruct.new("country" => "Australia", :capital => "Canberra")
221
+ # data.each_pair.to_a # => [[:country, "Australia"], [:capital, "Canberra"]]
222
+ #
223
+ # source://ostruct//lib/ostruct.rb#211
224
+ def each_pair; end
225
+
226
+ # source://ostruct//lib/ostruct.rb#211
227
+ def each_pair!; end
228
+
229
+ # Provides marshalling support for use by the YAML library.
230
+ #
231
+ # source://ostruct//lib/ostruct.rb#446
232
+ def encode_with(coder); end
233
+
234
+ # source://ostruct//lib/ostruct.rb#446
235
+ def encode_with!(coder); end
236
+
237
+ # Compares this object and +other+ for equality. An OpenStruct is eql? to
238
+ # +other+ when +other+ is an OpenStruct and the two objects' Hash tables are
239
+ # eql?.
240
+ #
241
+ # @return [Boolean]
242
+ #
243
+ # source://ostruct//lib/ostruct.rb#433
244
+ def eql?(other); end
245
+
246
+ # source://ostruct//lib/ostruct.rb#269
247
+ def freeze; end
248
+
249
+ # source://ostruct//lib/ostruct.rb#269
250
+ def freeze!; end
251
+
252
+ # Computes a hash code for this OpenStruct.
253
+ #
254
+ # source://ostruct//lib/ostruct.rb#439
255
+ def hash; end
256
+
257
+ # source://ostruct//lib/ostruct.rb#439
258
+ def hash!; end
259
+
260
+ # Provides marshalling support for use by the YAML library.
261
+ #
262
+ # source://ostruct//lib/ostruct.rb#459
263
+ def init_with(coder); end
264
+
265
+ # source://ostruct//lib/ostruct.rb#459
266
+ def init_with!(coder); end
267
+
268
+ # Returns a string containing a detailed summary of the keys and values.
269
+ #
270
+ # source://ostruct//lib/ostruct.rb#388
271
+ def inspect; end
272
+
273
+ # source://ostruct//lib/ostruct.rb#388
274
+ def inspect!; end
275
+
276
+ # Provides marshalling support for use by the Marshal library.
277
+ #
278
+ # source://ostruct//lib/ostruct.rb#220
279
+ def marshal_dump; end
280
+
281
+ # source://ostruct//lib/ostruct.rb#220
282
+ def marshal_dump!; end
283
+
284
+ # source://ostruct//lib/ostruct.rb#406
285
+ def table; end
286
+
287
+ # source://ostruct//lib/ostruct.rb#182
288
+ def to_h(&block); end
289
+
290
+ # source://ostruct//lib/ostruct.rb#182
291
+ def to_h!(&block); end
292
+
293
+ # Returns a string containing a detailed summary of the keys and values.
294
+ #
295
+ # source://ostruct//lib/ostruct.rb#388
296
+ def to_s; end
297
+
298
+ # source://ostruct//lib/ostruct.rb#388
299
+ def to_s!; end
300
+
301
+ protected
302
+
303
+ # source://ostruct//lib/ostruct.rb#406
304
+ def table!; end
305
+
306
+ private
307
+
308
+ # source://ostruct//lib/ostruct.rb#147
309
+ def initialize_clone(orig); end
310
+
311
+ # source://ostruct//lib/ostruct.rb#152
312
+ def initialize_dup(orig); end
313
+
314
+ # source://ostruct//lib/ostruct.rb#251
315
+ def is_method_protected!(name); end
316
+
317
+ #
318
+ # Provides marshalling support for use by the Marshal library.
319
+ #
320
+ # source://ostruct//lib/ostruct.rb#157
321
+ def marshal_load(hash); end
322
+
323
+ # source://ostruct//lib/ostruct.rb#274
324
+ def method_missing(mid, *args); end
325
+
326
+ # Used internally to defined properties on the
327
+ # OpenStruct. It does this by using the metaprogramming function
328
+ # define_singleton_method for both the getter method and the setter method.
329
+ #
330
+ # source://ostruct//lib/ostruct.rb#234
331
+ def new_ostruct_member!(name); end
332
+
333
+ # :call-seq:
334
+ # ostruct[name] = obj -> obj
335
+ #
336
+ # Sets the value of an attribute.
337
+ #
338
+ # require "ostruct"
339
+ # person = OpenStruct.new("name" => "John Smith", "age" => 70)
340
+ # person[:age] = 42 # equivalent to person.age = 42
341
+ # person.age # => 42
342
+ #
343
+ # source://ostruct//lib/ostruct.rb#318
344
+ def set_ostruct_member_value!(name, value); end
345
+
346
+ # source://ostruct//lib/ostruct.rb#157
347
+ def update_to_values!(hash); end
348
+ end
349
+
350
+ # source://ostruct//lib/ostruct.rb#112
351
+ OpenStruct::HAS_PERFORMANCE_WARNINGS = T.let(T.unsafe(nil), TrueClass)
352
+
353
+ # source://ostruct//lib/ostruct.rb#110
354
+ OpenStruct::VERSION = T.let(T.unsafe(nil), String)
@@ -0,0 +1,291 @@
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
+ # source://parallel//lib/parallel/version.rb#2
9
+ module Parallel
10
+ class << self
11
+ # @return [Boolean]
12
+ #
13
+ # source://parallel//lib/parallel.rb#243
14
+ def all?(*args, &block); end
15
+
16
+ # @return [Boolean]
17
+ #
18
+ # source://parallel//lib/parallel.rb#238
19
+ def any?(*args, &block); end
20
+
21
+ # source://parallel//lib/parallel.rb#234
22
+ def each(array, options = T.unsafe(nil), &block); end
23
+
24
+ # source://parallel//lib/parallel.rb#248
25
+ def each_with_index(array, options = T.unsafe(nil), &block); end
26
+
27
+ # source://parallel//lib/parallel.rb#307
28
+ def filter_map(*_arg0, **_arg1, &_arg2); end
29
+
30
+ # source://parallel//lib/parallel.rb#303
31
+ def flat_map(*_arg0, **_arg1, &_arg2); end
32
+
33
+ # source://parallel//lib/parallel.rb#228
34
+ def in_processes(options = T.unsafe(nil), &block); end
35
+
36
+ # source://parallel//lib/parallel.rb#212
37
+ def in_threads(options = T.unsafe(nil)); end
38
+
39
+ # source://parallel//lib/parallel.rb#252
40
+ def map(source, options = T.unsafe(nil), &block); end
41
+
42
+ # source://parallel//lib/parallel.rb#299
43
+ def map_with_index(array, options = T.unsafe(nil), &block); end
44
+
45
+ # Number of physical processor cores on the current system.
46
+ #
47
+ # source://parallel//lib/parallel.rb#312
48
+ def physical_processor_count; end
49
+
50
+ # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup,
51
+ # used for process scheduling
52
+ #
53
+ # source://parallel//lib/parallel.rb#342
54
+ def processor_count; end
55
+
56
+ # source://parallel//lib/parallel.rb#346
57
+ def worker_number; end
58
+
59
+ # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed
60
+ #
61
+ # source://parallel//lib/parallel.rb#351
62
+ def worker_number=(worker_num); end
63
+
64
+ private
65
+
66
+ # source://parallel//lib/parallel.rb#384
67
+ def add_progress_bar!(job_factory, options); end
68
+
69
+ # source://parallel//lib/parallel.rb#699
70
+ def available_processor_count; end
71
+
72
+ # source://parallel//lib/parallel.rb#647
73
+ def call_with_index(item, index, options, &block); end
74
+
75
+ # source://parallel//lib/parallel.rb#579
76
+ def create_workers(job_factory, options, &block); end
77
+
78
+ # options is either a Integer or a Hash with :count
79
+ #
80
+ # source://parallel//lib/parallel.rb#637
81
+ def extract_count_from_options(options); end
82
+
83
+ # source://parallel//lib/parallel.rb#665
84
+ def instrument_finish(item, index, result, options); end
85
+
86
+ # yield results in the order of the input items
87
+ # needs to use `options` to store state between executions
88
+ # needs to use `done` index since a nil result would also be valid
89
+ #
90
+ # source://parallel//lib/parallel.rb#674
91
+ def instrument_finish_in_order(item, index, result, options); end
92
+
93
+ # source://parallel//lib/parallel.rb#694
94
+ def instrument_start(item, index, options); end
95
+
96
+ # source://parallel//lib/parallel.rb#357
97
+ def physical_processor_count_windows; end
98
+
99
+ # source://parallel//lib/parallel.rb#613
100
+ def process_incoming_jobs(read, write, job_factory, options, &block); end
101
+
102
+ # source://parallel//lib/parallel.rb#567
103
+ def replace_worker(job_factory, workers, index, options, blk); end
104
+
105
+ # source://parallel//lib/parallel.rb#378
106
+ def run(command); end
107
+
108
+ # source://parallel//lib/parallel.rb#658
109
+ def with_instrumentation(item, index, options); end
110
+
111
+ # source://parallel//lib/parallel.rb#409
112
+ def work_direct(job_factory, options, &block); end
113
+
114
+ # source://parallel//lib/parallel.rb#519
115
+ def work_in_processes(job_factory, options, &blk); end
116
+
117
+ # source://parallel//lib/parallel.rb#453
118
+ def work_in_ractors(job_factory, options); end
119
+
120
+ # source://parallel//lib/parallel.rb#428
121
+ def work_in_threads(job_factory, options, &block); end
122
+
123
+ # source://parallel//lib/parallel.rb#587
124
+ def worker(job_factory, options, &block); end
125
+ end
126
+ end
127
+
128
+ # source://parallel//lib/parallel.rb#11
129
+ class Parallel::Break < ::StandardError
130
+ # @return [Break] a new instance of Break
131
+ #
132
+ # source://parallel//lib/parallel.rb#14
133
+ def initialize(value = T.unsafe(nil)); end
134
+
135
+ # Returns the value of attribute value.
136
+ #
137
+ # source://parallel//lib/parallel.rb#12
138
+ def value; end
139
+ end
140
+
141
+ # source://parallel//lib/parallel.rb#8
142
+ class Parallel::DeadWorker < ::StandardError; end
143
+
144
+ # source://parallel//lib/parallel.rb#32
145
+ class Parallel::ExceptionWrapper
146
+ # @return [ExceptionWrapper] a new instance of ExceptionWrapper
147
+ #
148
+ # source://parallel//lib/parallel.rb#35
149
+ def initialize(exception); end
150
+
151
+ # Returns the value of attribute exception.
152
+ #
153
+ # source://parallel//lib/parallel.rb#33
154
+ def exception; end
155
+ end
156
+
157
+ # source://parallel//lib/parallel.rb#98
158
+ class Parallel::JobFactory
159
+ # @return [JobFactory] a new instance of JobFactory
160
+ #
161
+ # source://parallel//lib/parallel.rb#99
162
+ def initialize(source, mutex); end
163
+
164
+ # source://parallel//lib/parallel.rb#107
165
+ def next; end
166
+
167
+ # generate item that is sent to workers
168
+ # just index is faster + less likely to blow up with unserializable errors
169
+ #
170
+ # source://parallel//lib/parallel.rb#136
171
+ def pack(item, index); end
172
+
173
+ # source://parallel//lib/parallel.rb#126
174
+ def size; end
175
+
176
+ # unpack item that is sent to workers
177
+ #
178
+ # source://parallel//lib/parallel.rb#141
179
+ def unpack(data); end
180
+
181
+ private
182
+
183
+ # @return [Boolean]
184
+ #
185
+ # source://parallel//lib/parallel.rb#147
186
+ def producer?; end
187
+
188
+ # source://parallel//lib/parallel.rb#151
189
+ def queue_wrapper(array); end
190
+ end
191
+
192
+ # source://parallel//lib/parallel.rb#20
193
+ class Parallel::Kill < ::Parallel::Break; end
194
+
195
+ # source://parallel//lib/parallel.rb#6
196
+ Parallel::Stop = T.let(T.unsafe(nil), Object)
197
+
198
+ # source://parallel//lib/parallel.rb#23
199
+ class Parallel::UndumpableException < ::StandardError
200
+ # @return [UndumpableException] a new instance of UndumpableException
201
+ #
202
+ # source://parallel//lib/parallel.rb#26
203
+ def initialize(original); end
204
+
205
+ # Returns the value of attribute backtrace.
206
+ #
207
+ # source://parallel//lib/parallel.rb#24
208
+ def backtrace; end
209
+ end
210
+
211
+ # source://parallel//lib/parallel.rb#156
212
+ class Parallel::UserInterruptHandler
213
+ class << self
214
+ # source://parallel//lib/parallel.rb#181
215
+ def kill(thing); end
216
+
217
+ # kill all these pids or threads if user presses Ctrl+c
218
+ #
219
+ # source://parallel//lib/parallel.rb#161
220
+ def kill_on_ctrl_c(pids, options); end
221
+
222
+ private
223
+
224
+ # source://parallel//lib/parallel.rb#205
225
+ def restore_interrupt(old, signal); end
226
+
227
+ # source://parallel//lib/parallel.rb#190
228
+ def trap_interrupt(signal); end
229
+ end
230
+ end
231
+
232
+ # source://parallel//lib/parallel.rb#157
233
+ Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol)
234
+
235
+ # source://parallel//lib/parallel/version.rb#3
236
+ Parallel::VERSION = T.let(T.unsafe(nil), String)
237
+
238
+ # source://parallel//lib/parallel/version.rb#3
239
+ Parallel::Version = T.let(T.unsafe(nil), String)
240
+
241
+ # source://parallel//lib/parallel.rb#51
242
+ class Parallel::Worker
243
+ # @return [Worker] a new instance of Worker
244
+ #
245
+ # source://parallel//lib/parallel.rb#55
246
+ def initialize(read, write, pid); end
247
+
248
+ # might be passed to started_processes and simultaneously closed by another thread
249
+ # when running in isolation mode, so we have to check if it is closed before closing
250
+ #
251
+ # source://parallel//lib/parallel.rb#68
252
+ def close_pipes; end
253
+
254
+ # Returns the value of attribute pid.
255
+ #
256
+ # source://parallel//lib/parallel.rb#52
257
+ def pid; end
258
+
259
+ # Returns the value of attribute read.
260
+ #
261
+ # source://parallel//lib/parallel.rb#52
262
+ def read; end
263
+
264
+ # source://parallel//lib/parallel.rb#61
265
+ def stop; end
266
+
267
+ # Returns the value of attribute thread.
268
+ #
269
+ # source://parallel//lib/parallel.rb#53
270
+ def thread; end
271
+
272
+ # Sets the attribute thread
273
+ #
274
+ # @param value the value to set the attribute thread to.
275
+ #
276
+ # source://parallel//lib/parallel.rb#53
277
+ def thread=(_arg0); end
278
+
279
+ # source://parallel//lib/parallel.rb#73
280
+ def work(data); end
281
+
282
+ # Returns the value of attribute write.
283
+ #
284
+ # source://parallel//lib/parallel.rb#52
285
+ def write; end
286
+
287
+ private
288
+
289
+ # source://parallel//lib/parallel.rb#91
290
+ def wait; end
291
+ end