From f2738686d552f554362e0959803f10f6cd30637e Mon Sep 17 00:00:00 2001 From: spengreb Date: Tue, 8 Oct 2019 22:07:00 +0200 Subject: [PATCH] Change how ruby executes commands --- app/controllers/vouchers_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/vouchers_controller.rb b/app/controllers/vouchers_controller.rb index 76297ee..991d797 100644 --- a/app/controllers/vouchers_controller.rb +++ b/app/controllers/vouchers_controller.rb @@ -5,7 +5,7 @@ class VouchersController < ApplicationController # GET /vouchers def index @vouchers = Voucher.all - whitelist = %x(mcrcon -c -H mine.vereto.net -p #{ENV["MC_RCON_PASS"]} 'whitelist list' | sed 's/There are*.*whitelisted players: //g').gsub("\n", "").split(", ") + whitelist = %x[mcrcon -c -H mine.vereto.net -p #{ENV["MC_RCON_PASS"]} 'whitelist list' | sed 's/There are*.*whitelisted players: //g'].gsub("\n", "").split(", ") render json: { :vouchers => @vouchers, :whitelist => whitelist }.to_json end