docbrown/lib/tasks/fastly.rake
Alex 8b51d8e4b8
[deploy] Fix Fastly rake task spec and Travis CI (#7487)
* Try changing exit to next

* Add breaking test

* Fix search.rake

* Remove test failure
2020-04-23 16:06:57 -04:00

17 lines
492 B
Ruby

namespace :fastly do
desc "Update VCL for whitelisted params on Fastly"
task update_whitelisted_params: :environment do
fastly_credentials = %w[
FASTLY_API_KEY
FASTLY_SERVICE_ID
FASTLY_WHITELIST_PARAMS_SNIPPET_NAME
]
if fastly_credentials.any? { |cred| ApplicationConfig[cred].blank? }
puts "Fastly not configured. Please set #{fastly_credentials.join(", ")} in your environment."
next
end
FastlyVCL::WhitelistedParams.update
end
end