lib/oschadbank/request.rb in oschadbank-0.1.7 vs lib/oschadbank/request.rb in oschadbank-0.1.8

- old
+ new

@@ -16,11 +16,18 @@ end private def make_request - Faraday.post(request_url, request_params) + connection = Faraday::Connection.new(request_url, ssl: { + ca_file: cert_file, + }) + connection.post(request_url, request_params) rescue Faraday::Error => e raise RequestError, e.message + end + + def cert_file + File.expand_path("../../data/cert.pem", File.dirname(__FILE__)) end end end