Sha256: 46317120d684706cf45d7c6821b303dfbe1592cd718df4109f4f8851ed1fe815

Contents?: true

Size: 444 Bytes

Versions: 1

Compression:

Stored size: 444 Bytes

Contents

#!/usr/bin/env ruby

require "bundler/setup"
require "redis_eval"

if url = ENV["REDIS_EVAL_URL"]
  RedisEval.config.redis_options = { url: url }
end

lua_script = ARGV[0] || (raise ArgumentError, "Unknown script path")
key_count = ARGV[1].to_i
argv = ARGV[2..-1] || []

raise ArgumentError, "Not enough KEYS of argument." if key_count > argv.size
keys = argv.shift(key_count)

script = RedisEval.build(lua_script)
p script.execute(keys, argv)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redis_eval-0.1.0 exe/redis_eval_test