docbrown/lib/tasks/fastly.rake
rhymes 2d26318cf9
[deploy] Replace (black|white)list with more inclusive language (#7459)
* Replace isBlacklisted

* Update fastly.rake task

* More renames

* Rename Faslty config file

* More changes

* Replace isForbiddenFromPreloading with isNotPreloadable

* Skip problematic test

* Re-enable
2020-04-27 18:00:12 +02:00

20 lines
497 B
Ruby

namespace :fastly do
desc "Update VCL for safe params on Fastly"
task update_safe_params: :environment do
fastly_credentials = %w[
FASTLY_API_KEY
FASTLY_SERVICE_ID
FASTLY_SAFE_PARAMS_SNIPPET_NAME
]
if fastly_credentials.any? { |cred| ApplicationConfig[cred].blank? }
Rails.logger.info(
"Fastly not configured. Please set #{fastly_credentials.join(", ")} in your environment."
)
next
end
FastlyVCL::SafeParams.update
end
end