# This file potentially overwritten on deploy

if Rails.env.production?
  FLOW_REGISTRY_OPTIONS = {}
else
  FLOW_REGISTRY_OPTIONS = { show_drafts: true }
end

# Uncomment the following to run smartanswers with the test flows instead of the real ones
#
#FLOW_REGISTRY_OPTIONS[:smart_answer_load_path] = Rails.root.join('test', 'fixtures', 'smart_answer_flows')

# If an env var isn't to specify showing drafts we'll decide it based on Rails
# environment
show_drafts = ENV["SHOW_DRAFT_FLOWS"] ? true : !Rails.env.production?

FLOW_REGISTRY_OPTIONS = { show_drafts: show_drafts }

# Uncomment the following to run smartanswers with the test flows instead of the real ones
#
#FLOW_REGISTRY_OPTIONS[:smart_answer_load_path] = Rails.root.join('test', 'fixtures', 'smart_answer_flows')

Handle showing flow drafts based off env var
Handle showing flow drafts based off env var

Previously this file was overridden on a deployment, this changes it so
that the configuration can be determined based off the presence of an
environment variable.
