Commit c130f0629d30ed83efb812e5c37be6cd8e829e66

Authored by Fernando Brito
1 parent 3259d858
Exists in wikilibras

Add wikilibras python script path to .env and initializer

config/examples/.env.example
... ... @@ -3,5 +3,4 @@ DOMAIN_NAME: # for api callback
3 3  
4 4 VLIBRAS_API:
5 5  
6   -# gmail password
7   -# api address...
8 6 \ No newline at end of file
  7 +WIKILIBRAS_PYTHON_SCRIPT_PATH:
9 8 \ No newline at end of file
... ...
config/initializers/check_env_vars.rb
... ... @@ -5,3 +5,10 @@ end
5 5 if ENV['VLIBRAS_API_URL'].nil? || ENV['VLIBRAS_API_URL'].empty?
6 6 raise 'VLIBRAS_API_URL must be set in .env'
7 7 end
  8 +
  9 +if ENV['WIKILIBRAS_PYTHON_SCRIPT_PATH'].nil? || ENV['WIKILIBRAS_PYTHON_SCRIPT_PATH'].empty?
  10 + raise 'WIKILIBRAS_PYTHON_SCRIPT_PATH must be set in .env'
  11 +end
  12 +
  13 +`test -e #{ENV['WIKILIBRAS_PYTHON_SCRIPT_PATH']}`
  14 +raise SystemCallError, "WIKILIBRAS_PYTHON_SCRIPT_PATH not found" unless $?.success?
... ...