Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
fix: enable use_ssl for net::http gem
Browse files Browse the repository at this point in the history
Set ssl to true
  • Loading branch information
LindseySaari authored Mar 10, 2022
2 parents 9d34522 + 29c091a commit 07974eb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
inherit_from: .rubocop_todo.yml

require: rubocop-rails

AllCops:
Expand Down
12 changes: 12 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions lib/argo_cd/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 07974eb

Please sign in to comment.