X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..e48fab1439736d27ef70d0b56b09c71215fe7d27:/cookbooks/trac/files/default/trac-authenticate?ds=sidebyside diff --git a/cookbooks/trac/files/default/trac-authenticate b/cookbooks/trac/files/default/trac-authenticate index cfd33e756..a25563736 100755 --- a/cookbooks/trac/files/default/trac-authenticate +++ b/cookbooks/trac/files/default/trac-authenticate @@ -9,7 +9,9 @@ pass = gets.chop request = Net::HTTP::Get.new("/api/0.6/user/details") request.basic_auth user, pass -response = Net::HTTP.new("api.openstreetmap.org").request(request) +response = Net::HTTP.start("api.openstreetmap.org", :use_ssl => true) do |http| + http.request(request) +end -exit!(0) if response.kind_of?(Net::HTTPSuccess) +exit!(0) if response.is_a?(Net::HTTPSuccess) exit!(1)