Commit 0f08dc208520002adc89676147838e95ab15c681

Authored by Rafael Reggiani Manzo
1 parent 019699d2
Exists in colab

Load Kalibro service addresses from file

This makes explicit that this is configurable and will be more packaging
friendly as the configuration file will get linked from /etc.

Signed-off-by: Eduardo Araújo <duduktamg@hotmail.com>
@@ -26,6 +26,7 @@ before_script: @@ -26,6 +26,7 @@ before_script:
26 - bash install.sh 26 - bash install.sh
27 - popd 27 - popd
28 - cp config/database.yml.sample config/database.yml 28 - cp config/database.yml.sample config/database.yml
  29 + - cp config/kalibro.yml.sample config/kalibro.yml
29 # Do not run setup as the Kalibro services are up and this is not even necessary! 30 # Do not run setup as the Kalibro services are up and this is not even necessary!
30 - bundle exec rake db:create 31 - bundle exec rake db:create
31 - bundle exec rake db:migrate 32 - bundle exec rake db:migrate
@@ -4,6 +4,10 @@ Prezento is the web interface for Mezuro. @@ -4,6 +4,10 @@ Prezento is the web interface for Mezuro.
4 4
5 The version numbers below try to follow the conventions at http://semver.org/. 5 The version numbers below try to follow the conventions at http://semver.org/.
6 6
  7 +## Unreleased
  8 +
  9 +- Always load Kalibro service addresses from file
  10 +
7 ## v1.0.1 - 11/05/2016 11 ## v1.0.1 - 11/05/2016
8 12
9 - Fix kalibro services address init under production 13 - Fix kalibro services address init under production
@@ -25,6 +25,7 @@ Dir.chdir APP_ROOT do @@ -25,6 +25,7 @@ Dir.chdir APP_ROOT do
25 unless File.exist?("config/database.yml") 25 unless File.exist?("config/database.yml")
26 run "cp config/database.yml.sample config/database.yml" 26 run "cp config/database.yml.sample config/database.yml"
27 run "cp features/support/kalibro_cucumber_helpers.yml.sample features/support/kalibro_cucumber_helpers.yml" 27 run "cp features/support/kalibro_cucumber_helpers.yml.sample features/support/kalibro_cucumber_helpers.yml"
  28 + run "cp config/kalibro.yml.sample config/kalibro.yml"
28 end 29 end
29 30
30 puts "\n== Preparing database ==".green 31 puts "\n== Preparing database ==".green
config/environments/development.rb
@@ -44,4 +44,7 @@ Rails.application.configure do @@ -44,4 +44,7 @@ Rails.application.configure do
44 44
45 # Raises error for missing translations 45 # Raises error for missing translations
46 # config.action_view.raise_on_missing_translations = true 46 # config.action_view.raise_on_missing_translations = true
  47 +
  48 + # Kalibro URL
  49 + Likeno.configure_with(Rails.root.join('config', 'kalibro.yml'))
47 end 50 end
config/environments/test.rb
@@ -45,4 +45,7 @@ Rails.application.configure do @@ -45,4 +45,7 @@ Rails.application.configure do
45 45
46 # Raises error for missing translations 46 # Raises error for missing translations
47 # config.action_view.raise_on_missing_translations = true 47 # config.action_view.raise_on_missing_translations = true
  48 +
  49 + # Kalibro URL
  50 + Likeno.configure_with(Rails.root.join('config', 'kalibro.yml'))
48 end 51 end
config/kalibro.yml.sample 0 → 100644
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +processor_address: "http://localhost:8082"
  2 +configurations_address: "http://localhost:8083"