app/interactors/switch_server.rb
def current_machine_verified
    sirene_server1 = Rails.configuration.switch_server['sirene_server1']
    sirene_server2 = Rails.configuration.switch_server['sirene_server2']

    if [sirene_server1, sirene_server2].include? current_machine_name
      current_machine_name
    else
      stdout_error_log 'Error during server switch: This server doesnt seem to be registered in Rails config.'
      context.fail!
    end
  end
# Routing to current machine, but first a security check to see if configuration is OK
Routing to current machine, but first a security check to see if configuration is OK
Routing to current machine but first a security check to see if configuration is OK
def current_machine_verified
    sirene_server1 = Rails.configuration.switch_server['sirene_server1']
    sirene_server2 = Rails.configuration.switch_server['sirene_server2']
    if [sirene_server1, sirene_server2].include? current_machine_name
      current_machine_name
    else
      stdout_error_log 'Error during server switch: This server doesnt seem to be registered in Rails config.'
      context.fail!
    end
  end
def current_machine_verified sirene_server1 = Rails . configuration . switch_server [ 'sirene_server1' ] sirene_server2 = Rails . configuration . switch_server [ 'sirene_server2' ] if [ sirene_server1 , sirene_server2 ] . include? current_machine_name current_machine_name else stdout_error_log 'Error during server switch: This server doesnt seem to be registered in Rails config.' context . fail! end end
Routing to current machine, but first a security check to see if configuration is OK
Routing to current machine but first a security check to see if configuration is OK