Project

almaz

0.01
No commit activity in last 3 years
No release in over 3 years
Almaz is watching!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.1.1
>= 0.9.4
 Project Readme

Almaz

Almaz is always watching!

Explanation

Almaz is rack middlware which logs request information to a redis server, under a preset user session variable.

Installation

  
    gem install almaz
  

Example

Almaz::Capture

  
    require 'almaz'

    use Almaz::Capture
  
    Almaz.redis_config = {:db => 0, :host => 'localhost', :port => 6379} # this is also the default
    Almaz.session_variable = :user
  

By using Almaz::Capture and setting the session_variable to :user, all request are now logged under ‘almaz::user::(session[:user])’ in redis. Each user gets a separate list in the redis DB. All request that don’t have the session variable :user are logged under ‘almaz::user::’.

Almaz::View

  
    require 'almaz'

    use Almaz::View
    Almaz::View.user('jpoz','password')
  
    use Almaz::Capture
    Almaz.session_variable = :user
  

Almaz::View is a separate middleware allows the information saved by Almaz::Capture into redis to be consumed via json. It has two routes:

  1. ‘/almaz’ a index of all the keys in the Redis DB
  2. ‘/almaz/:val’ the list of request information for the user who has the session variable value :val

Both are protected behind basic HTTP authentication. Which is setup by calling Almaz::View.user(‘username’,‘password’).

Related Projects

Almaz MacRuby Client – http://github.com/jpoz/almaz_client

Coming soon

Almaz::Client

Yet another rack middleware to consume the json given out by Almaz::View.

fail