Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

saw

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

saw

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Saw

As a developer/admin, I saw user coming to registration page, with parameters. I saw user clking on "Connect".

What the user might have done? this is a common question developers do have while debugging any issue, going through the logs checking for particular log statement or request param, and then after spending an hour coming with a decision that user must have done this. Saw saves this hour, time spent on debugging and answering this question What user might have done?.

This is one more simply way to track what user is doing.

Installation

Add this line to your application's Gemfile:

gem 'saw'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install saw

And then install

$ rails generate saw install

Next

$ rake db:migrate

Usage

before_filter :saw

Or

saw 'visiting details page', { :extra => 'something' } 

Or

# in views

<button id="button-retry" onclick="open_pop_up_form();" class="mybutton medium green">
  Connect to your Device
</button>

<script type="text/javascript">
  function open_pop_up_form(){
    $.post("/visits", { doing: "clicked on 'Connect to your Device' " } );
    ....
    

Access users' visits as

visit = @user.visits.sample
visit.user_agent
visit.remote_host
visit.hits.map(&:note)
visit.lasts # => 00:12:45
visit.title # => 00:12:45 on Apr 14, 2013
visit.summary

hit = visit.hits.sample
hit.note
hit.url
hit.http_method
hit.action
hit.json_data
hit.created_at

A visit is not a single request made to the server but a session. Similalry a hit is not necessary to be a request hit.

Testing (TBD)

ruby test/saw_test.rb 

FAQs

Package last updated on 10 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc