Skip to content

Commit 529009b

Browse files
committed
fixtests(indico-ingestor): typo
1 parent f3f16b9 commit 529009b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/ingestors/ical_ingestor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def self.config
1919
end
2020

2121
def read(source_url)
22-
@token << Rails.application.config.secrets.indico_api_token
22+
@token = Rails.application.config.secrets.indico_api_token
2323
@verbose = false
2424
sources = get_sources(source_url)
2525
return if sources.nil?

lib/ingestors/ingestor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def stats_summary(type)
5050
summary
5151
end
5252

53-
def open_url(url, token: '', raise: false)
53+
def open_url(url, raise: false, token: nil)
5454
options = {
5555
redirect: false, # We're doing redirects manually below, since open-uri can't handle http -> https redirection
5656
read_timeout: 5
5757
}
5858
options[:ssl_verify_mode] = config[:ssl_verify_mode] if config.key?(:ssl_verify_mode)
5959
redirect_attempts = 5
60-
options['Authorization'] = "Bearer #{token}" if token
60+
options['Authorization'] = "Bearer #{token}" unless token.nil?
6161
begin
6262
URI(url).open(options)
6363
rescue OpenURI::HTTPRedirect => e

0 commit comments

Comments
 (0)