lib/hackerone/client.rb in hackerone-client-0.21.0 vs lib/hackerone/client.rb in hackerone-client-0.22.0
- old
+ new
@@ -1,10 +1,11 @@
# frozen_string_literal: true
require "faraday"
require "json"
-require "active_support/time"
+require "active_support"
+require "active_support/core_ext/numeric/time"
require_relative "client/version"
require_relative "client/report"
require_relative "client/activity"
require_relative "client/program"
require_relative "client/reporter"
@@ -199,10 +200,10 @@
unless ENV["HACKERONE_TOKEN_NAME"] && ENV["HACKERONE_TOKEN"]
raise NotConfiguredError, "HACKERONE_TOKEN_NAME HACKERONE_TOKEN environment variables must be set"
end
@connection ||= Faraday.new(url: "https://api.hackerone.com/v1") do |faraday|
- faraday.basic_auth(ENV["HACKERONE_TOKEN_NAME"], ENV["HACKERONE_TOKEN"])
+ faraday.request(:authorization, :basic, ENV["HACKERONE_TOKEN_NAME"], ENV["HACKERONE_TOKEN"])
faraday.adapter Faraday.default_adapter
end
end
def with_retry(attempts = 3, &block)