Skip to content

Commit

Permalink
Merge pull request #39 from n2uitive/opsource_cloud_files
Browse files Browse the repository at this point in the history
Inconsistencies in Opsource Cloud Files
  • Loading branch information
itsderek23 committed Oct 28, 2011
2 parents eadb57a + e7650f3 commit 7a4a9af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions opsource_cloud_files/opsource_cloud_files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,19 @@ def report_from_info(info)
def percent_used(used, allocated)
(used / allocated * 100).ceil
end


def headers
{'x-client-specification' => '2'}
end

def http(uri)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http
end

def request(path)
req = Net::HTTP::Get.new(path)
req = Net::HTTP::Get.new(path, headers)
req.basic_auth(option('username'), option('password'))
req
end
Expand Down

0 comments on commit 7a4a9af

Please sign in to comment.