fractor 0.1.3 → 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 (34) 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 +154 -48
  5. data/README.adoc +1371 -317
  6. data/examples/auto_detection/README.adoc +52 -0
  7. data/examples/auto_detection/auto_detection.rb +170 -0
  8. data/examples/continuous_chat_common/message_protocol.rb +53 -0
  9. data/examples/continuous_chat_fractor/README.adoc +217 -0
  10. data/examples/continuous_chat_fractor/chat_client.rb +303 -0
  11. data/examples/continuous_chat_fractor/chat_common.rb +83 -0
  12. data/examples/continuous_chat_fractor/chat_server.rb +167 -0
  13. data/examples/continuous_chat_fractor/simulate.rb +345 -0
  14. data/examples/continuous_chat_server/README.adoc +135 -0
  15. data/examples/continuous_chat_server/chat_client.rb +303 -0
  16. data/examples/continuous_chat_server/chat_server.rb +359 -0
  17. data/examples/continuous_chat_server/simulate.rb +343 -0
  18. data/examples/hierarchical_hasher/hierarchical_hasher.rb +12 -8
  19. data/examples/multi_work_type/multi_work_type.rb +30 -29
  20. data/examples/pipeline_processing/pipeline_processing.rb +15 -15
  21. data/examples/producer_subscriber/producer_subscriber.rb +20 -16
  22. data/examples/scatter_gather/scatter_gather.rb +29 -28
  23. data/examples/simple/sample.rb +38 -6
  24. data/examples/specialized_workers/specialized_workers.rb +44 -37
  25. data/lib/fractor/continuous_server.rb +188 -0
  26. data/lib/fractor/result_aggregator.rb +1 -1
  27. data/lib/fractor/supervisor.rb +291 -108
  28. data/lib/fractor/version.rb +1 -1
  29. data/lib/fractor/work_queue.rb +68 -0
  30. data/lib/fractor/work_result.rb +1 -1
  31. data/lib/fractor/worker.rb +2 -1
  32. data/lib/fractor/wrapped_ractor.rb +12 -2
  33. data/lib/fractor.rb +2 -0
  34. metadata +17 -2
data/.rubocop_todo.yml CHANGED
@@ -1,98 +1,204 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-05-08 09:25:37 UTC using RuboCop version 1.75.5.
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/DuplicateMethods:
16
+ # This cop supports safe autocorrection (--autocorrect).
17
+ Layout/ElseAlignment:
19
18
  Exclude:
20
- - 'lib/fractor/supervisor.rb'
19
+ - 'lib/fractor/wrapped_ractor.rb'
21
20
 
22
21
  # Offense count: 1
23
- Lint/HashCompareByIdentity:
22
+ # This cop supports safe autocorrection (--autocorrect).
23
+ # Configuration parameters: EnforcedStyleAlignWith, Severity.
24
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
25
+ Layout/EndAlignment:
24
26
  Exclude:
25
- - 'examples/producer_subscriber/producer_subscriber.rb'
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'
26
38
 
27
39
  # Offense count: 2
28
- # Configuration parameters: AllowedParentClasses.
29
- Lint/MissingSuper:
40
+ # This cop supports safe autocorrection (--autocorrect).
41
+ # Configuration parameters: Width, AllowedPatterns.
42
+ Layout/IndentationWidth:
30
43
  Exclude:
31
- - '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'
32
68
 
33
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'
76
+
77
+ # Offense count: 4
34
78
  Lint/RescueException:
35
79
  Exclude:
80
+ - 'lib/fractor/supervisor.rb'
36
81
  - 'lib/fractor/wrapped_ractor.rb'
37
82
 
38
- # Offense count: 18
39
- # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
83
+ # Offense count: 8
84
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
40
85
  Metrics/AbcSize:
41
- Max: 98
86
+ Exclude:
87
+ - 'lib/fractor/supervisor.rb'
88
+ - 'lib/fractor/wrapped_ractor.rb'
42
89
 
43
- # Offense count: 9
44
- # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
90
+ # Offense count: 2
91
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
45
92
  # AllowedMethods: refine
46
93
  Metrics/BlockLength:
47
- Max: 101
94
+ Max: 47
48
95
 
49
96
  # Offense count: 2
50
- # Configuration parameters: CountComments, CountAsOne.
51
- Metrics/ClassLength:
52
- Max: 159
97
+ # Configuration parameters: CountBlocks, CountModifierForms.
98
+ Metrics/BlockNesting:
99
+ Max: 5
53
100
 
54
- # Offense count: 3
55
- # Configuration parameters: AllowedMethods, AllowedPatterns.
101
+ # Offense count: 7
102
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
56
103
  Metrics/CyclomaticComplexity:
57
- Max: 37
104
+ Exclude:
105
+ - 'lib/fractor/supervisor.rb'
106
+ - 'lib/fractor/wrapped_ractor.rb'
58
107
 
59
- # Offense count: 33
108
+ # Offense count: 14
60
109
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
61
110
  Metrics/MethodLength:
62
- Max: 67
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'
63
119
 
64
120
  # Offense count: 1
65
- # Configuration parameters: Max, CountKeywordArgs.
66
- Metrics/ParameterLists:
67
- MaxOptionalParameters: 4
121
+ # Configuration parameters: MinSize.
122
+ Performance/CollectionLiteralInLoop:
123
+ Exclude:
124
+ - 'lib/fractor/supervisor.rb'
125
+
126
+ # Offense count: 3
127
+ # This cop supports unsafe autocorrection (--autocorrect-all).
128
+ Performance/TimesMap:
129
+ Exclude:
130
+ - 'spec/fractor/work_queue_spec.rb'
68
131
 
69
132
  # Offense count: 2
70
- # Configuration parameters: AllowedMethods, AllowedPatterns.
71
- Metrics/PerceivedComplexity:
72
- Max: 37
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
73
156
 
74
157
  # Offense count: 1
75
- Security/Eval:
158
+ # This cop supports safe autocorrection (--autocorrect).
159
+ RSpec/ExpectActual:
76
160
  Exclude:
77
- - 'examples/multi_work_type/multi_work_type.rb'
161
+ - '**/spec/routing/**/*'
162
+ - 'spec/fractor/wrapped_ractor_spec.rb'
78
163
 
79
164
  # Offense count: 1
80
- # Configuration parameters: AllowedConstants.
81
- Style/Documentation:
165
+ # Configuration parameters: AssignmentOnly.
166
+ RSpec/InstanceVariable:
167
+ Exclude:
168
+ - 'spec/fractor/integration_spec.rb'
169
+
170
+ # Offense count: 3
171
+ RSpec/LeakyConstantDeclaration:
82
172
  Exclude:
83
- - 'spec/**/*'
84
- - 'test/**/*'
85
- - 'examples/hierarchical_hasher/hierarchical_hasher.rb'
173
+ - 'spec/fractor/integration_spec.rb'
174
+ - 'spec/fractor/work_spec.rb'
175
+
176
+ # Offense count: 35
177
+ RSpec/MultipleExpectations:
178
+ Max: 7
86
179
 
87
- # Offense count: 13
180
+ # Offense count: 1
88
181
  # This cop supports safe autocorrection (--autocorrect).
89
- Style/IfUnlessModifier:
182
+ # Configuration parameters: EnforcedStyle, AllowComments.
183
+ # SupportedStyles: empty, nil, both
184
+ Style/EmptyElse:
90
185
  Exclude:
91
186
  - 'lib/fractor/supervisor.rb'
92
187
 
93
- # Offense count: 6
188
+ # Offense count: 1
189
+ # This cop supports safe autocorrection (--autocorrect).
190
+ # Configuration parameters: .
191
+ # SupportedStyles: percent, brackets
192
+ Style/SymbolArray:
193
+ EnforcedStyle: percent
194
+ MinSize: 3
195
+
196
+ # Offense count: 16
94
197
  # This cop supports safe autocorrection (--autocorrect).
95
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
96
- # URISchemes: http, https
97
- Layout/LineLength:
98
- Max: 160
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'