fractor 0.1.4 → 0.1.6

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-main-ci-rubocop-yml +552 -0
  3. data/.rubocop.yml +14 -8
  4. data/.rubocop_todo.yml +162 -46
  5. data/README.adoc +1364 -376
  6. data/examples/auto_detection/auto_detection.rb +9 -9
  7. data/examples/continuous_chat_common/message_protocol.rb +53 -0
  8. data/examples/continuous_chat_fractor/README.adoc +217 -0
  9. data/examples/continuous_chat_fractor/chat_client.rb +303 -0
  10. data/examples/continuous_chat_fractor/chat_common.rb +83 -0
  11. data/examples/continuous_chat_fractor/chat_server.rb +167 -0
  12. data/examples/continuous_chat_fractor/simulate.rb +345 -0
  13. data/examples/continuous_chat_server/README.adoc +135 -0
  14. data/examples/continuous_chat_server/chat_client.rb +303 -0
  15. data/examples/continuous_chat_server/chat_server.rb +359 -0
  16. data/examples/continuous_chat_server/simulate.rb +343 -0
  17. data/examples/hierarchical_hasher/hierarchical_hasher.rb +12 -8
  18. data/examples/multi_work_type/multi_work_type.rb +30 -29
  19. data/examples/pipeline_processing/pipeline_processing.rb +15 -15
  20. data/examples/producer_subscriber/producer_subscriber.rb +20 -16
  21. data/examples/scatter_gather/scatter_gather.rb +29 -28
  22. data/examples/simple/sample.rb +5 -5
  23. data/examples/specialized_workers/specialized_workers.rb +44 -37
  24. data/lib/fractor/continuous_server.rb +188 -0
  25. data/lib/fractor/result_aggregator.rb +1 -1
  26. data/lib/fractor/supervisor.rb +277 -104
  27. data/lib/fractor/version.rb +1 -1
  28. data/lib/fractor/work_queue.rb +68 -0
  29. data/lib/fractor/work_result.rb +1 -1
  30. data/lib/fractor/worker.rb +2 -1
  31. data/lib/fractor/wrapped_ractor.rb +12 -2
  32. data/lib/fractor.rb +2 -0
  33. metadata +15 -2
data/.rubocop_todo.yml CHANGED
@@ -1,29 +1,78 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-10-09 11:44:45 UTC using RuboCop version 1.75.4.
3
+ # on 2025-10-17 09:59:37 UTC using RuboCop version 1.81.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 3
10
- # Configuration parameters: AllowedMethods.
11
- # AllowedMethods: enums
12
- Lint/ConstantDefinitionInBlock:
9
+ # Offense count: 1
10
+ # Configuration parameters: Severity.
11
+ Gemspec/RequiredRubyVersion:
13
12
  Exclude:
14
- - 'spec/fractor/integration_spec.rb'
15
- - 'spec/fractor/work_spec.rb'
13
+ - 'fractor.gemspec'
16
14
 
17
15
  # Offense count: 1
18
- Lint/HashCompareByIdentity:
16
+ # This cop supports safe autocorrection (--autocorrect).
17
+ Layout/ElseAlignment:
19
18
  Exclude:
20
- - 'examples/producer_subscriber/producer_subscriber.rb'
19
+ - 'lib/fractor/wrapped_ractor.rb'
20
+
21
+ # Offense count: 1
22
+ # This cop supports safe autocorrection (--autocorrect).
23
+ # Configuration parameters: EnforcedStyleAlignWith, Severity.
24
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
25
+ Layout/EndAlignment:
26
+ Exclude:
27
+ - 'lib/fractor/wrapped_ractor.rb'
28
+
29
+ # Offense count: 1
30
+ # This cop supports safe autocorrection (--autocorrect).
31
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
32
+ # SupportedHashRocketStyles: key, separator, table
33
+ # SupportedColonStyles: key, separator, table
34
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
35
+ Layout/HashAlignment:
36
+ Exclude:
37
+ - 'lib/fractor/wrapped_ractor.rb'
21
38
 
22
39
  # Offense count: 2
23
- # Configuration parameters: AllowedParentClasses.
24
- Lint/MissingSuper:
40
+ # This cop supports safe autocorrection (--autocorrect).
41
+ # Configuration parameters: Width, AllowedPatterns.
42
+ Layout/IndentationWidth:
25
43
  Exclude:
26
- - 'examples/specialized_workers/specialized_workers.rb'
44
+ - 'lib/fractor/wrapped_ractor.rb'
45
+
46
+ # Offense count: 86
47
+ # This cop supports safe autocorrection (--autocorrect).
48
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
49
+ # URISchemes: http, https
50
+ Layout/LineLength:
51
+ Exclude:
52
+ - 'fractor.gemspec'
53
+ - 'lib/fractor/result_aggregator.rb'
54
+ - 'lib/fractor/supervisor.rb'
55
+ - 'lib/fractor/wrapped_ractor.rb'
56
+ - 'spec/fixtures/long_running_fractor.rb'
57
+ - 'spec/fractor/integration_spec.rb'
58
+ - 'spec/fractor/signal_handling_spec.rb'
59
+ - 'spec/fractor/supervisor_spec.rb'
60
+ - 'spec/fractor/wrapped_ractor_spec.rb'
61
+
62
+ # Offense count: 1
63
+ # This cop supports safe autocorrection (--autocorrect).
64
+ # Configuration parameters: AllowInHeredoc.
65
+ Layout/TrailingWhitespace:
66
+ Exclude:
67
+ - 'lib/fractor/wrapped_ractor.rb'
68
+
69
+ # Offense count: 3
70
+ # Configuration parameters: AllowedMethods.
71
+ # AllowedMethods: enums
72
+ Lint/ConstantDefinitionInBlock:
73
+ Exclude:
74
+ - 'spec/fractor/integration_spec.rb'
75
+ - 'spec/fractor/work_spec.rb'
27
76
 
28
77
  # Offense count: 4
29
78
  Lint/RescueException:
@@ -31,58 +80,125 @@ Lint/RescueException:
31
80
  - 'lib/fractor/supervisor.rb'
32
81
  - 'lib/fractor/wrapped_ractor.rb'
33
82
 
34
- # Offense count: 24
35
- # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
83
+ # Offense count: 8
84
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
36
85
  Metrics/AbcSize:
37
- Max: 98
86
+ Exclude:
87
+ - 'lib/fractor/supervisor.rb'
88
+ - 'lib/fractor/wrapped_ractor.rb'
38
89
 
39
- # Offense count: 15
40
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
90
+ # Offense count: 2
91
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
41
92
  # AllowedMethods: refine
42
93
  Metrics/BlockLength:
43
- Max: 142
94
+ Max: 47
44
95
 
45
- # Offense count: 4
46
- # Configuration parameters: CountComments, CountAsOne.
47
- Metrics/ClassLength:
48
- Max: 171
96
+ # Offense count: 2
97
+ # Configuration parameters: CountBlocks, CountModifierForms.
98
+ Metrics/BlockNesting:
99
+ Max: 5
49
100
 
50
- # Offense count: 9
51
- # Configuration parameters: AllowedMethods, AllowedPatterns.
101
+ # Offense count: 7
102
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
52
103
  Metrics/CyclomaticComplexity:
53
- Max: 37
104
+ Exclude:
105
+ - 'lib/fractor/supervisor.rb'
106
+ - 'lib/fractor/wrapped_ractor.rb'
54
107
 
55
- # Offense count: 46
108
+ # Offense count: 14
56
109
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
57
110
  Metrics/MethodLength:
58
- Max: 78
111
+ Max: 158
112
+
113
+ # Offense count: 7
114
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
115
+ Metrics/PerceivedComplexity:
116
+ Exclude:
117
+ - 'lib/fractor/supervisor.rb'
118
+ - 'lib/fractor/wrapped_ractor.rb'
59
119
 
60
120
  # Offense count: 1
61
- # Configuration parameters: Max, CountKeywordArgs.
62
- Metrics/ParameterLists:
63
- MaxOptionalParameters: 4
121
+ # Configuration parameters: MinSize.
122
+ Performance/CollectionLiteralInLoop:
123
+ Exclude:
124
+ - 'lib/fractor/supervisor.rb'
64
125
 
65
- # Offense count: 6
66
- # Configuration parameters: AllowedMethods, AllowedPatterns.
67
- Metrics/PerceivedComplexity:
68
- Max: 37
126
+ # Offense count: 3
127
+ # This cop supports unsafe autocorrection (--autocorrect-all).
128
+ Performance/TimesMap:
129
+ Exclude:
130
+ - 'spec/fractor/work_queue_spec.rb'
131
+
132
+ # Offense count: 2
133
+ # Configuration parameters: Prefixes, AllowedPatterns.
134
+ # Prefixes: when, with, without
135
+ RSpec/ContextWording:
136
+ Exclude:
137
+ - 'spec/fractor/supervisor_spec.rb'
138
+ - 'spec/fractor_spec.rb'
139
+
140
+ # Offense count: 2
141
+ # Configuration parameters: IgnoredMetadata.
142
+ RSpec/DescribeClass:
143
+ Exclude:
144
+ - '**/spec/features/**/*'
145
+ - '**/spec/requests/**/*'
146
+ - '**/spec/routing/**/*'
147
+ - '**/spec/system/**/*'
148
+ - '**/spec/views/**/*'
149
+ - 'spec/fractor/integration_spec.rb'
150
+ - 'spec/fractor/signal_handling_spec.rb'
151
+
152
+ # Offense count: 36
153
+ # Configuration parameters: CountAsOne.
154
+ RSpec/ExampleLength:
155
+ Max: 28
69
156
 
70
157
  # Offense count: 1
71
- Security/Eval:
158
+ # This cop supports safe autocorrection (--autocorrect).
159
+ RSpec/ExpectActual:
160
+ Exclude:
161
+ - '**/spec/routing/**/*'
162
+ - 'spec/fractor/wrapped_ractor_spec.rb'
163
+
164
+ # Offense count: 1
165
+ # Configuration parameters: AssignmentOnly.
166
+ RSpec/InstanceVariable:
167
+ Exclude:
168
+ - 'spec/fractor/integration_spec.rb'
169
+
170
+ # Offense count: 3
171
+ RSpec/LeakyConstantDeclaration:
72
172
  Exclude:
73
- - 'examples/multi_work_type/multi_work_type.rb'
173
+ - 'spec/fractor/integration_spec.rb'
174
+ - 'spec/fractor/work_spec.rb'
175
+
176
+ # Offense count: 35
177
+ RSpec/MultipleExpectations:
178
+ Max: 7
74
179
 
75
180
  # Offense count: 1
76
- # Configuration parameters: AllowedConstants.
77
- Style/Documentation:
181
+ # This cop supports safe autocorrection (--autocorrect).
182
+ # Configuration parameters: EnforcedStyle, AllowComments.
183
+ # SupportedStyles: empty, nil, both
184
+ Style/EmptyElse:
78
185
  Exclude:
79
- - 'spec/**/*'
80
- - 'test/**/*'
81
- - 'examples/hierarchical_hasher/hierarchical_hasher.rb'
186
+ - 'lib/fractor/supervisor.rb'
82
187
 
83
- # Offense count: 12
188
+ # Offense count: 1
84
189
  # This cop supports safe autocorrection (--autocorrect).
85
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
86
- # URISchemes: http, https
87
- Layout/LineLength:
88
- Max: 160
190
+ # Configuration parameters: .
191
+ # SupportedStyles: percent, brackets
192
+ Style/SymbolArray:
193
+ EnforcedStyle: percent
194
+ MinSize: 3
195
+
196
+ # Offense count: 16
197
+ # This cop supports safe autocorrection (--autocorrect).
198
+ # Configuration parameters: EnforcedStyleForMultiline.
199
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
200
+ Style/TrailingCommaInArguments:
201
+ Exclude:
202
+ - 'lib/fractor/continuous_server.rb'
203
+ - 'spec/fractor/continuous_server_spec.rb'
204
+ - 'spec/fractor/work_queue_spec.rb'