Skip to content

Commit

Permalink
🚨Fix Rubocop warnings per CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeelaudibert committed Jul 21, 2023
1 parent 1c56449 commit c96521c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Style/ClassAndModuleChildren:
# General config to enable every `Pendent` cop
AllCops:
NewCops: enable
TargetRubyVersion: 2.5
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

source 'https://rubygems.org'

gem 'rake', '~> 12.0'
group :development, :test do
gem 'fakeredis', '~> 0.9'
gem 'minitest', '~> 5.0'
gem 'rake', '~> 12.0'
end

# Specify your gem's dependencies in clock-limiter.gemspec
gemspec
2 changes: 0 additions & 2 deletions clock-limiter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ Gem::Specification.new do |spec|

# Dependencies
spec.add_runtime_dependency 'redis', '>= 3'
spec.add_development_dependency 'fakeredis', '~> 0.9'
spec.add_development_dependency 'minitest', '~> 5.0'
end
2 changes: 1 addition & 1 deletion lib/clock/limiter/limiter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def key(period, group_key)
# according to the [Clock::Limiter::Configuration#time_provider]
#
# @param [Clock::Limiter::Period] period
def current_period(period)
def current_period(period) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
case period
when Period::SECOND
Clock::Limiter.configuration.time_provider.call.sec
Expand Down
4 changes: 2 additions & 2 deletions test/clock/limiter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_properly_configures_gem
assert Clock::Limiter.configuration.time_provider
end

def test_good_path
def test_good_path # rubocop:disable Metrics/MethodLength
configure_gem

failed_count = 0
Expand All @@ -65,7 +65,7 @@ def call
assert_equal 2, failed_count
end

def test_with_clock_limiter_with_group_key
def test_with_clock_limiter_with_group_key # rubocop:disable Metrics/MethodLength
configure_gem

failed_groups = []
Expand Down

0 comments on commit c96521c

Please sign in to comment.