Commit 27c75e58 authored by Andrea Campi's avatar Andrea Campi Committed by Bryan McLellan
Browse files

CHEF-2652: backward-compatibility hack to ease migration from old config files.

parent c24e7e39
......@@ -145,6 +145,15 @@ module Chef
configurable :solr_url, "http://localhost:8983/solr"
# override the setter for solr_url for backward compatibilty
def solr_url=(url)
if url && url == "http://localhost:8983"
log.warn {"You seem to have a legacy setting for solr_url: did you mean #{url}/solr ?"}
url = "#{url}/solr"
end
@solr_url = url
end
configurable :amqp_host, '0.0.0.0'
configurable :amqp_port, 5672
......
......@@ -134,4 +134,8 @@ describe Expander::Configuration do
Expander.config.node_count.should == 23
end
it "appends /solr to the legacy solr_url" do
Expander.config.solr_url = "http://localhost:8983"
@config.solr_url.should == "http://localhost:8983/solr"
end
end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment