Skip to content

Commit

Permalink
Make a few updates for latest Rubocop (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
petergoldstein authored Apr 25, 2022
1 parent 313c2d8 commit 8ad238d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/dalli/protocol/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ def pipeline_complete?
end

def username
@options[:username] || ENV['MEMCACHE_USERNAME']
@options[:username] || ENV.fetch('MEMCACHE_USERNAME', nil)
end

def password
@options[:password] || ENV['MEMCACHE_PASSWORD']
@options[:password] || ENV.fetch('MEMCACHE_PASSWORD', nil)
end

def require_auth?
Expand Down
2 changes: 1 addition & 1 deletion lib/dalli/servers_arg_normalizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def self.normalize_servers(arg)
def self.apply_defaults(arg)
return arg unless arg.nil?

ENV[ENV_VAR_NAME] || DEFAULT_SERVERS
ENV.fetch(ENV_VAR_NAME, nil) || DEFAULT_SERVERS
end

def self.validate_type(arg)
Expand Down

0 comments on commit 8ad238d

Please sign in to comment.