class GitSnatch::Curler
Public Class Methods
new(curl)
click to toggle source
# File lib/git_snatch/curler.rb, line 3 def initialize(curl) @curl = curl end
Public Instance Methods
build()
click to toggle source
# File lib/git_snatch/curler.rb, line 7 def build @curl.tap do |c| c.http_auth_types = auth_types if auth? c.username = username if username c.password = password if password end end
Private Instance Methods
auth?()
click to toggle source
# File lib/git_snatch/curler.rb, line 25 def auth? username && password end
auth_types()
click to toggle source
# File lib/git_snatch/curler.rb, line 29 def auth_types GitSnatch.configuration.auth_types end
password()
click to toggle source
# File lib/git_snatch/curler.rb, line 21 def password GitSnatch.configuration.password end
username()
click to toggle source
# File lib/git_snatch/curler.rb, line 17 def username GitSnatch.configuration.username end