def script(file, *args)
      begin
        cache = Minuteman::LUA_CACHE[Minuteman.config.redis.url]

        if cache.key?(file)
          sha = cache[file]
        else
          src = File.read(file)
          sha = Minuteman.config.redis.call("SCRIPT", "LOAD", src)

          cache[file] = sha
        end

        Minuteman.config.redis.call!("EVALSHA", sha, *args)

      rescue RuntimeError
        case $!.message
        when ErrorPatterns::NOSCRIPT
          Minuteman::LUA_CACHE[Minuteman.config.redis.url].clear
          retry
        when ErrorPatterns::DUPLICATE
          raise UniqueIndexViolation, $1
        else
          raise $!
        end
      end
    end
def script(file, *args)
      begin
        cache = Minuteman::LUA_CACHE[Minuteman.config.redis.url]

        if cache.key?(file)
          sha = cache[file]
        else
          src = File.read(file)
          sha = Minuteman.config.redis.call("SCRIPT", "LOAD", src)

          cache[file] = sha
        end

        Minuteman.config.redis.call!("EVALSHA", sha, *args)

      rescue RuntimeError
        case $!.message
        when ErrorPatterns::NOSCRIPT
          Minuteman::LUA_CACHE[Minuteman.config.redis.url].clear
          retry
        when ErrorPatterns::DUPLICATE
          raise UniqueIndexViolation, $1
        else
          raise $!
        end
      end
    end
Code taken from Ohm. Just small changes to adapt to the current Minuteman
 stuff. elcuervo <3 (soveran + djanowski)