lib/oxidized/hook/githubrepo.rb in oxidized-0.22.0 vs lib/oxidized/hook/githubrepo.rb in oxidized-0.23.0
- old
+ new
@@ -47,10 +47,10 @@
def credentials
Proc.new do |url, username_from_url, allowed_types|
if cfg.has_key?('username')
git_user = cfg.username
else
- git_user = username_from_url ? username_from_url : 'git'
+ git_user = username_from_url || 'git'
end
if cfg.has_key?('password')
log "Authenticating using username and password as '#{git_user}'", :debug
Rugged::Credentials::UserPassword.new(username: git_user, password: cfg.password)