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"
@solr_url = url
configurable :amqp_host, ''
configurable :amqp_port, 5672
......@@ -134,4 +134,8 @@ describe Expander::Configuration do
Expander.config.node_count.should == 23
it "appends /solr to the legacy solr_url" do
Expander.config.solr_url = "http://localhost:8983"
@config.solr_url.should == "http://localhost:8983/solr"
\ 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