Sha256: 1d2b0dc032bd3b7483d539560b2a2ac413fd71b6c2948d1fe23490ea7cd9b2d5

Contents?: true

Size: 622 Bytes

Versions: 2

Compression:

Stored size: 622 Bytes

Contents

module Polytrix
  module Runners
    class LinuxChallengeRunner < ChallengeRunner
      def script_extension
        'sh'
      end

      def challenge_command(env_file, challenge_script)
        challenge_script = "./#{challenge_script}" unless challenge_script.to_s.start_with? '/'
        if File.exist? 'scripts/wrapper'
          # ". #{env_file} && scripts/wrapper #{challenge_script}"
          "scripts/wrapper #{challenge_script}"
        else
          "#{challenge_script}"
        end
      end

      def save_environment_variable(key, value)
        "export #{key}=\"#{value}\""
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
polytrix-0.1.2 lib/polytrix/runners/linux_challenge_runner.rb
polytrix-0.1.1 lib/polytrix/runners/linux_challenge_runner.rb