Evaluate Lua scripts with Redis.
Add this line to your application's Gemfile:
gem "redis_eval"
And then execute:
$ bundle
Or install it yourself as:
$ gem install redis_eval
Build and execute a script source as argument.
script = RedisEval::Script.new("return {KEYS[1], ARGV[1]}")
script.execute([1], [2]) # => ["1", "2"]
Find and build scripts from a specific directory.
scripts = RedisEval::ScriptSet.new("/path/to/script_dir")
scripts.hello.execute(keys, argv) # build /path/to/script_dir/hello.lua and run.
Bug reports and pull requests are welcome on GitHub at https://github.com/i2bskn/redis_eval.
The gem is available as open source under the terms of the MIT License.