diff --git a/.rubocop.yml b/.rubocop.yml index 5745099c..c21f28cc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,5 @@ +inherit_from: .rubocop_todo.yml + require: rubocop-rails AllCops: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000..d30c459b --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,12 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2022-03-10 20:19:18 UTC using RuboCop version 1.25.1. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 1 +# Configuration parameters: IgnoredMethods, CountRepeatedAttributes. +Metrics/AbcSize: + Max: 18 diff --git a/lib/argo_cd/client.rb b/lib/argo_cd/client.rb index dde448b4..663e24d3 100644 --- a/lib/argo_cd/client.rb +++ b/lib/argo_cd/client.rb @@ -27,6 +27,7 @@ def app_info def get_app_info(uri) https = Net::HTTP.new(uri.host, uri.port) https.verify_mode = OpenSSL::SSL::VERIFY_NONE if Rails.env.development? + https.use_ssl = true if Rails.env.production? response = https.get(uri, request_headers) Response.new(response: response) @@ -59,6 +60,7 @@ def generate_token uri = URI("#{base_path}/api/v1/session") https = Net::HTTP.new(uri.host, uri.port) https.verify_mode = OpenSSL::SSL::VERIFY_NONE if Rails.env.development? + https.use_ssl = true if Rails.env.production? request = build_request(uri)