Version
fastly (13.1.0)
Ruby 3.4.0
What happened
As stated in the README, I initialize the client with:
# Rails.application.credentials.fastly_api_token is a valid, confirmed-working API token
Fastly.configure do |config|
config.api_token = Rails.application.credentials.fastly_api_token
end
This results in an error:
IndexError: string not matched
from .../fastly-13.1.0/lib/fastly/configuration.rb:60:in 'String#[]='
When setting api_key instead:
Fastly.configure do |config|
config.api_key = Rails.application.credentials.fastly_api_token
end
There is no error and the value of Rails.application.credentials.fastly_api_token is the output.
However, with config.api_key set, all requests fail with a 401 response.
I can only get things working if I forcibly set the environment variable:
ENV["FASTLY_API_TOKEN"] = Rails.application.credentials.fastly_api_token
Version
fastly (13.1.0)Ruby 3.4.0
What happened
As stated in the README, I initialize the client with:
This results in an error:
When setting
api_keyinstead:There is no error and the value of
Rails.application.credentials.fastly_api_tokenis the output.However, with
config.api_keyset, all requests fail with a 401 response.I can only get things working if I forcibly set the environment variable: