From e591c2ee7ec050e3ef30e08e721836ecec811cbd Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Tue, 13 Apr 2021 10:28:36 -0400 Subject: [PATCH] Keep writer around for now --- lib/flipper/cloud/configuration.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/flipper/cloud/configuration.rb b/lib/flipper/cloud/configuration.rb index f502b08da..912d7a4bd 100644 --- a/lib/flipper/cloud/configuration.rb +++ b/lib/flipper/cloud/configuration.rb @@ -69,12 +69,9 @@ def initialize(options = {}) end if ENV["FLIPPER_CLOUD_SYNC_METHOD"] - warn "FLIPPER_CLOUD_SYNC_METHOD is deprecated and has no effect. Set FLIPPER_CLOUD_SYNC_SECRET to enable webhook syncing" - end - - if options[:sync_method] - warn ":sync_method is deprecated and has no effect." + warn "FLIPPER_CLOUD_SYNC_METHOD is deprecated and has no effect." end + self.sync_method = opts[:sync_method] if opts[:sync_method] @instrumenter = options.fetch(:instrumenter, Instrumenters::Noop) @read_timeout = options.fetch(:read_timeout) { ENV.fetch("FLIPPER_CLOUD_READ_TIMEOUT", 5).to_f } @@ -123,6 +120,10 @@ def sync_method sync_secret ? :webhook : :poll end + def sync_method=(_) + warn "Flipper::Cloud: sync_method is deprecated and has no effect." + end + private def app_adapter