Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Rubocop violations #195

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/gruf/cli/executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def determine_services(services = [])
# next check CLI arguments
services = @options[:services].to_s.split(',').map(&:strip).uniq
# finally, if none, use global gruf autoloaded services
services = (::Gruf.services || []) unless services.any?
services = ::Gruf.services || [] unless services.any?

services
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def call(&block)
# @return [::Gruf::Logger]
#
def logger
@logger ||= (options.fetch(:logger, nil) || Gruf.logger)
@logger ||= options.fetch(:logger, nil) || Gruf.logger
end

##
Expand Down
2 changes: 1 addition & 1 deletion lib/gruf/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def clear_interceptors
# @return [Array<Class>]
#
def services
@services ||= (::Gruf.services || (options.fetch(:services, nil) || []))
@services ||= ::Gruf.services || (options.fetch(:services, nil) || [])
end

##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class FakeRequestLogFormatter; end
it 'supports nested filtering' do
expected = Marshal.load(Marshal.dump(params))
expected[:data][:array] = 'REDACTED'
expected[:hello].each do |key, _val|
expected[:hello].each_key do |key|
expected[:hello][key] = 'REDACTED'
end
expect(subject).to eq expected
Expand Down