mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Remove unused method
This commit is contained in:
parent
e21de1c42d
commit
05bdb11ee3
2 changed files with 0 additions and 36 deletions
3
.reek
3
.reek
|
@ -281,7 +281,6 @@ DuplicateMethodCall:
|
||||||
- Depp::Domain#default_params
|
- Depp::Domain#default_params
|
||||||
- Depp::Domain#renew
|
- Depp::Domain#renew
|
||||||
- Depp::Keyrelay#keyrelay
|
- Depp::Keyrelay#keyrelay
|
||||||
- Depp::User#repp_request
|
|
||||||
- Depp::User#validate_existance_in_server
|
- Depp::User#validate_existance_in_server
|
||||||
- Directo#self.dump_result_to_db
|
- Directo#self.dump_result_to_db
|
||||||
- Directo#self.load_price
|
- Directo#self.load_price
|
||||||
|
@ -760,7 +759,6 @@ TooManyStatements:
|
||||||
- Depp::Domain#create_nameservers_hash
|
- Depp::Domain#create_nameservers_hash
|
||||||
- Depp::Domain#default_params
|
- Depp::Domain#default_params
|
||||||
- Depp::Domain#transfer
|
- Depp::Domain#transfer
|
||||||
- Depp::User#repp_request
|
|
||||||
- Depp::User#validate_existance_in_server
|
- Depp::User#validate_existance_in_server
|
||||||
- Directo#self.send_monthly_invoices
|
- Directo#self.send_monthly_invoices
|
||||||
- Directo#self.send_receipts
|
- Directo#self.send_receipts
|
||||||
|
@ -938,7 +936,6 @@ FeatureEnvy:
|
||||||
- Depp::Domain#renew
|
- Depp::Domain#renew
|
||||||
- Depp::Domain#transfer
|
- Depp::Domain#transfer
|
||||||
- Depp::Keyrelay#keyrelay
|
- Depp::Keyrelay#keyrelay
|
||||||
- Depp::User#repp_request
|
|
||||||
- DomainMailModel#format
|
- DomainMailModel#format
|
||||||
- Epp::Contact#attach_legal_document
|
- Epp::Contact#attach_legal_document
|
||||||
- Epp::Contact#attrs_from
|
- Epp::Contact#attrs_from
|
||||||
|
|
|
@ -36,39 +36,6 @@ module Depp
|
||||||
Nokogiri::XML(e.response_xml.to_s).remove_namespaces!
|
Nokogiri::XML(e.response_xml.to_s).remove_namespaces!
|
||||||
end
|
end
|
||||||
|
|
||||||
# rubocop:disable Metrics/AbcSize
|
|
||||||
def repp_request(path, params = {})
|
|
||||||
client_cert = File.read(ENV['cert_path'])
|
|
||||||
client_key = File.read(ENV['key_path'])
|
|
||||||
|
|
||||||
repp_url = Rails.env.test? ? 'http://localhost:8989/repp/v1/' : ENV['repp_url']
|
|
||||||
uri = URI.parse("#{repp_url}#{path}")
|
|
||||||
uri.query = URI.encode_www_form(params)
|
|
||||||
|
|
||||||
req = Net::HTTP::Get.new(uri)
|
|
||||||
req.basic_auth tag, password
|
|
||||||
|
|
||||||
res = Net::HTTP.start(uri.hostname, uri.port,
|
|
||||||
use_ssl: (uri.scheme == 'https'),
|
|
||||||
verify_mode: OpenSSL::SSL::VERIFY_NONE,
|
|
||||||
cert: OpenSSL::X509::Certificate.new(client_cert),
|
|
||||||
key: OpenSSL::PKey::RSA.new(client_key)) do |http|
|
|
||||||
http.request(req)
|
|
||||||
end
|
|
||||||
|
|
||||||
ret = OpenStruct.new(code: res.code)
|
|
||||||
ret.parsed_body = JSON.parse(res.body) if res.body.present?
|
|
||||||
|
|
||||||
if ret.parsed_body && ret.parsed_body['error']
|
|
||||||
ret.message = ret.parsed_body['error']
|
|
||||||
else
|
|
||||||
ret.message = res.message
|
|
||||||
end
|
|
||||||
|
|
||||||
ret
|
|
||||||
end
|
|
||||||
# rubocop:enable Metrics/AbcSize
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# rubocop:disable Metrics/AbcSize
|
# rubocop:disable Metrics/AbcSize
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue