class Gitcloudcli::Git

Public Instance Methods

delete(remote_path, message=nil) click to toggle source
# File lib/gitcloudcli/command/git/git.rb, line 12
def delete(remote_path, message=nil) end
info(remote_path, infos=[]) click to toggle source
# File lib/gitcloudcli/command/git/git.rb, line 8
def info(remote_path, infos=[]) end
list(dir=nil, infos=[]) click to toggle source
# File lib/gitcloudcli/command/git/git.rb, line 6
def list(dir=nil, infos=[]) end
request(method, urlStr, header, formdata, body) click to toggle source
# File lib/gitcloudcli/command/git/git.rb, line 14
def request(method, urlStr, header, formdata, body)
  if urlStr
    uri = URI.parse(URI.encode(urlStr))
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
  else
    raise "urlStr not give"
  end

  if !header
    header={}
  end

  if method==:GET
    request = Net::HTTP::Get.new(uri.request_uri, header)
  elsif method==:POST
    request = Net::HTTP::Post.new(uri.request_uri, header)
  elsif method==:PUT
    request = Net::HTTP::Put.new(uri.request_uri, header)
  elsif method==:DELETE
    request = Net::HTTP::Delete.new(uri.request_uri, header)
  else
    raise "unsuppose method #{method}"
  end

  if body
    request.body = body
  end
  if formdata
    request.form_data = formdata
  end
  response = http.request(request)
end
upload(local_path, filename=nil, message=nil, infos=[]) click to toggle source
# File lib/gitcloudcli/command/git/git.rb, line 10
def upload(local_path, filename=nil, message=nil, infos=[]) end