Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.13 KB

2014-12-22.md

File metadata and controls

47 lines (29 loc) · 1.13 KB

Kashyap

Image optimization tools:

Tool for Optimizing SVGs: https://github.com/svg/svgo-gui

Tool for Optimizing PNGs:

There is a pretty neat command-line tool for optimizing PNG files called optipng. That can be installed via homebrew:

brew install optipng

Usage:

optipng -o7 --keep file.png

the o7 is the optimization level (in this case, maximum optimization) and --keep lets you take a backup before compressing the image. The backed up file in this case would be saved as file.png.bak

Yuva

rack_session_access gem

Most of the specs generally start with signing in of user. This typically invoices these steps:

  • visiting landing page
  • clicking on login link
  • filling in username, and details
  • clicking login
  • app will populate session, and
  • user is redirected to dashboard

If there are lots of feature specs, the above process consumes bit of time. Effectively what we are doing is just setting user_id in session.

Since capybara wont allow accesing session, we can use this gem rack_session_access to populate session directly.