From 0f08dc208520002adc89676147838e95ab15c681 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Mon, 30 May 2016 15:08:46 -0300 Subject: [PATCH] Load Kalibro service addresses from file --- .travis.yml | 1 + CHANGELOG.md | 4 ++++ bin/setup | 1 + config/environments/development.rb | 3 +++ config/environments/test.rb | 3 +++ config/kalibro.yml.sample | 2 ++ 6 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 config/kalibro.yml.sample diff --git a/.travis.yml b/.travis.yml index 78dda5f..088faea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ before_script: - bash install.sh - popd - cp config/database.yml.sample config/database.yml + - cp config/kalibro.yml.sample config/kalibro.yml # Do not run setup as the Kalibro services are up and this is not even necessary! - bundle exec rake db:create - bundle exec rake db:migrate diff --git a/CHANGELOG.md b/CHANGELOG.md index fe9b412..8783d3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Prezento is the web interface for Mezuro. The version numbers below try to follow the conventions at http://semver.org/. +## Unreleased + +- Always load Kalibro service addresses from file + ## v1.0.1 - 11/05/2016 - Fix kalibro services address init under production diff --git a/bin/setup b/bin/setup index 2438e38..6ab91a3 100755 --- a/bin/setup +++ b/bin/setup @@ -25,6 +25,7 @@ Dir.chdir APP_ROOT do unless File.exist?("config/database.yml") run "cp config/database.yml.sample config/database.yml" run "cp features/support/kalibro_cucumber_helpers.yml.sample features/support/kalibro_cucumber_helpers.yml" + run "cp config/kalibro.yml.sample config/kalibro.yml" end puts "\n== Preparing database ==".green diff --git a/config/environments/development.rb b/config/environments/development.rb index 59d8727..bac5733 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -44,4 +44,7 @@ Rails.application.configure do # Raises error for missing translations # config.action_view.raise_on_missing_translations = true + + # Kalibro URL + Likeno.configure_with(Rails.root.join('config', 'kalibro.yml')) end diff --git a/config/environments/test.rb b/config/environments/test.rb index a7cd09b..ba45ce7 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -45,4 +45,7 @@ Rails.application.configure do # Raises error for missing translations # config.action_view.raise_on_missing_translations = true + + # Kalibro URL + Likeno.configure_with(Rails.root.join('config', 'kalibro.yml')) end diff --git a/config/kalibro.yml.sample b/config/kalibro.yml.sample new file mode 100644 index 0000000..f8b114a --- /dev/null +++ b/config/kalibro.yml.sample @@ -0,0 +1,2 @@ +processor_address: "http://localhost:8082" +configurations_address: "http://localhost:8083" -- libgit2 0.21.2