Skip to content

Commit

Permalink
Merge pull request #40 from GSA-TTS/clean-up-faraday
Browse files Browse the repository at this point in the history
Add faraday initializer to always set to typhoeus
  • Loading branch information
rahearn authored Sep 26, 2024
2 parents 141580d + 2b461ba commit d48e9bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy-proxy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
default: https://github.com/GSA-TTS/cg-egress-proxy.git
proxy_version:
description: git ref to be deployed
default: update-caddy
default: main
runs:
using: composite
steps:
Expand Down
4 changes: 1 addition & 3 deletions app/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ class Document < ApplicationRecord
validate :url_is_https

def contents
@contents = Faraday.new(url) do |conn|
conn.adapter :typhoeus
end.get.body
@contents ||= Faraday.get(url).body
end

private
Expand Down
1 change: 1 addition & 0 deletions config/initializers/faraday.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Faraday.default_adapter = :typhoeus

0 comments on commit d48e9bd

Please sign in to comment.