More code style fixes

This commit is contained in:
Jyri-Petteri Paloposki 2020-10-27 21:39:19 +02:00
parent 465419f46a
commit d4c9041ccd
61 changed files with 406 additions and 422 deletions

View file

@ -2,16 +2,16 @@ require 'net/https'
require File.expand_path(File.dirname(__FILE__) + '/tracks_xml_builder')
module TracksCli
class TracksAPI
def initialize(options)
@options = options
@options = options
end
def get_http(uri)
http = Net::HTTP.new(uri.host, uri.port)
if uri.scheme == "https" # enable SSL/TLS
# Enable SSL/TLS
if uri.scheme == "https"
http.use_ssl = true
http.ca_path = "/etc/ssl/certs/" # Debian based path
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
@ -57,7 +57,5 @@ module TracksCli
def get_context(context_id)
get(context_uri_for(context_id))
end
end
end
end