Skip to content

Commit e0d939a

Browse files
authored
Merge pull request #248 from envato/rubocop
Resolve issues identified by RuboCop
2 parents 7d4f987 + 66160f3 commit e0d939a

22 files changed

+52
-49
lines changed

.rubocop.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# The behavior of RuboCop can be controlled via the .rubocop.yml
2+
# configuration file. It makes it possible to enable/disable
3+
# certain cops (checks) and to alter their behavior if they accept
4+
# any parameters. The file can be placed either in your home
5+
# directory or in some project directory.
6+
#
7+
# RuboCop will start looking for the configuration file in the directory
8+
# where the inspected file is and continue its way up to the root directory.
9+
#
10+
# See https://docs.rubocop.org/rubocop/configuration
11+
112
inherit_from: .rubocop_todo.yml
13+
inherit_mode:
14+
merge:
15+
- Exclude
216

317
AllCops:
418
NewCops: disable

.rubocop_todo.yml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Configuration parameters: AllowedParentClasses.
10-
Lint/MissingSuper:
11-
Exclude:
12-
- 'lib/event_sourcery/errors.rb'
13-
14-
Lint/RescueException:
15-
Exclude:
16-
- 'lib/event_sourcery/event_processing/esp_process.rb'
17-
189
# This cop supports safe autocorrection (--autocorrect).
1910
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
2011
# NotImplementedExceptions: NotImplementedError
@@ -33,7 +24,6 @@ Metrics/AbcSize:
3324
# AllowedMethods: refine
3425
Metrics/BlockLength:
3526
Exclude:
36-
- '**/*.gemspec'
3727
- 'lib/event_sourcery/rspec/event_store_shared_examples.rb'
3828
- 'spec/event_sourcery/aggregate_root_spec.rb'
3929
- 'spec/event_sourcery/event_body_serializer_spec.rb'
@@ -80,36 +70,3 @@ Metrics/ParameterLists:
8070
- 'lib/event_sourcery/event.rb'
8171
- 'lib/event_sourcery/event_processing/esp_runner.rb'
8272
- 'lib/event_sourcery/event_store/subscription.rb'
83-
84-
# Configuration parameters: AllowedConstants.
85-
Style/Documentation:
86-
Exclude:
87-
- 'spec/**/*'
88-
- 'test/**/*'
89-
- 'lib/event_sourcery.rb'
90-
- 'lib/event_sourcery/aggregate_root.rb'
91-
- 'lib/event_sourcery/config.rb'
92-
- 'lib/event_sourcery/errors.rb'
93-
- 'lib/event_sourcery/event_processing/error_handlers/error_handler.rb'
94-
- 'lib/event_sourcery/event_processing/error_handlers/exponential_backoff_retry.rb'
95-
- 'lib/event_sourcery/event_processing/error_handlers/no_retry.rb'
96-
- 'lib/event_sourcery/event_processing/esp_process.rb'
97-
- 'lib/event_sourcery/event_processing/event_stream_processor.rb'
98-
- 'lib/event_sourcery/event_processing/event_stream_processor_registry.rb'
99-
- 'lib/event_sourcery/event_store/each_by_range.rb'
100-
- 'lib/event_sourcery/event_store/event_builder.rb'
101-
- 'lib/event_sourcery/event_store/event_sink.rb'
102-
- 'lib/event_sourcery/event_store/event_source.rb'
103-
- 'lib/event_sourcery/event_store/event_type_serializers/underscored.rb'
104-
- 'lib/event_sourcery/memory/config.rb'
105-
- 'lib/event_sourcery/memory/projector.rb'
106-
107-
Style/MultilineBlockChain:
108-
Exclude:
109-
- 'lib/event_sourcery/event_store/event_type_serializers/underscored.rb'
110-
111-
# Configuration parameters: AllowedMethods.
112-
# AllowedMethods: respond_to_missing?
113-
Style/OptionalBooleanParameter:
114-
Exclude:
115-
- 'lib/event_sourcery/event_store/event_type_serializers/underscored.rb'

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10-
[Unreleased]: https://github.com/envato/event_sourcery/compare/v1.0.3...HEAD
10+
[Unreleased]: https://github.com/envato/event_sourcery/compare/v1.0.4...HEAD
11+
12+
## [1.0.4] - 2026-01-17
13+
14+
### Changed
15+
16+
- Resolve issues as identified by RuboCop ([#248]).
17+
18+
[1.0.4]: https://github.com/envato/event_sourcery/compare/v1.0.3...v1.0.4
19+
[#248]: https://github.com/envato/event_sourcery/pull/248
1120

1221
## [1.0.3] - 2025-12-29
1322

event_sourcery.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Gem::Specification.new do |spec|
1212

1313
spec.summary = 'Event Sourcing Library'
1414
spec.description = ''
15-
spec.homepage = 'https://github.com/envato/event_sourcery'
15+
spec.homepage = "https://github.com/envato/#{spec.name}"
1616
spec.license = 'MIT'
1717
spec.metadata = {
1818
'allowed_push_host' => 'https://rubygems.org',
1919
'bug_tracker_uri' => "#{spec.homepage}/issues",
2020
'changelog_uri' => "#{spec.homepage}/blob/HEAD/CHANGELOG.md",
21-
'documentation_uri' => "https://www.rubydoc.info/gems/event_sourcery/#{spec.version}",
21+
'documentation_uri' => "https://www.rubydoc.info/gems/#{spec.name}/#{spec.version}",
2222
'source_code_uri' => "#{spec.homepage}/tree/v#{spec.version}"
2323
}
2424

lib/event_sourcery.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
require 'event_sourcery/memory/config'
3535
require 'event_sourcery/memory/projector'
3636

37+
# Event sourcing framework for Ruby applications.
3738
module EventSourcery
3839
# Configure EventSourcery
3940
#

lib/event_sourcery/aggregate_root.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def self.included(base)
6464
end
6565
end
6666

67+
# Class methods for aggregate root event handling configuration.
6768
module ClassMethods
6869
# Collection of event handlers for the events that this aggregate cares about
6970
#

lib/event_sourcery/config.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require 'logger'
44

55
module EventSourcery
6+
# Configuration settings for EventSourcery.
67
class Config
78
# The default Proc to be run when an aggregate loads an event type that
89
# it doesn't know how to handle.

lib/event_sourcery/errors.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ module EventSourcery
77
AtomicWriteToMultipleAggregatesNotSupported = Class.new(Error)
88
MultipleCatchAllHandlersDefined = Class.new(Error)
99

10+
# Error raised when event processing fails with contextual information.
1011
class EventProcessingError < Error
1112
attr_reader :event, :processor
1213

1314
def initialize(event:, processor:)
15+
super()
1416
@event = event
1517
@processor = processor
1618
end

lib/event_sourcery/event_processing/error_handlers/error_handler.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module EventSourcery
44
module EventProcessing
55
module ErrorHandlers
6+
# Base module for error handling strategies in event processing.
67
module ErrorHandler
78
# The default with_error_handling method. Will always raise NotImplementedError
89
#

lib/event_sourcery/event_processing/error_handlers/exponential_backoff_retry.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module EventSourcery
44
module EventProcessing
55
module ErrorHandlers
6+
# Error handler that retries with exponentially increasing delays.
67
class ExponentialBackoffRetry
78
include EventSourcery::EventProcessing::ErrorHandlers::ErrorHandler
89

0 commit comments

Comments
 (0)