bin/avst-wizard in avst-wizard-0.0.37 vs bin/avst-wizard in avst-wizard-0.0.38

- old
+ new

@@ -149,19 +149,19 @@ host_url = nil puts "Going via #{base_url}" end runner = AvstWizard::AvstWizard.new(base_url, context_path, required_config, url_required_part, host_url) - + initial_path = context_path ? context_path : "/" # wait for app to start # until get_stage returns recognized state or time out number_of_retries = 60 # get current state and cookies, follow redirects code = runner.get_stage_and_fetch_cookie to_search_for = runner.get_current_url puts "Searching for #{to_search_for}" - if to_search_for != "/" and final_stages_config[%r{#{to_search_for}}] != nil + if to_search_for != initial_path and final_stages_config[%r{#{to_search_for}}] != nil not_recognized = false else not_recognized = true end counter=0 @@ -174,21 +174,21 @@ counter=counter+1 # try to get recognised state code = runner.get_stage_and_fetch_cookie to_search_for = runner.get_current_url puts "Looping: Searching for #{to_search_for}" - if to_search_for != "/" and code.to_i == 200 and final_stages_config[%r{#{to_search_for}}] != nil + if to_search_for != initial_path and code.to_i == 200 and final_stages_config[%r{#{to_search_for}}] != nil not_recognized = false else puts "Stage with url #{to_search_for} not recognized, retrying in 5 secs, attempt #{counter}/#{number_of_retries}, response code #{code}".yellow end end previous_url = "" retries = 0 done = false called = false - while !done and to_search_for != "/" + while !done and to_search_for != initial_path puts "Searching for config for #{to_search_for}".green stage_config = final_stages_config[%r{#{to_search_for}}] unless stage_config abort("Stage #{to_search_for} not found! Plaese add it to default.yaml").red end