README.md in safely_block-0.2.1 vs README.md in safely_block-0.2.2

- old
+ new

@@ -8,12 +8,22 @@ Exceptions are rescued and automatically reported to your favorite reporting service. In development and test environments, exceptions are raised so you can fix them. +[Read more](https://ankane.org/safely-pattern) + [![Build Status](https://travis-ci.org/ankane/safely.svg?branch=master)](https://travis-ci.org/ankane/safely) +## Installation + +Add this line to your application’s Gemfile: + +```ruby +gem 'safely_block' +``` + ## Use It Everywhere “Oh no, analytics brought down search” ```ruby @@ -30,10 +40,18 @@ Also aliased as `yolo`. ## Features +Pass extra context to be reported with exceptions + +```ruby +safely context: {user_id: 123} do + # code +end +``` + Specify a default value to return on exceptions ```ruby show_banner = safely(default: true) { show_banner_logic } ``` @@ -79,11 +97,12 @@ Reports exceptions to a variety of services out of the box thanks to [Errbase](https://github.com/ankane/errbase). - [Airbrake](https://airbrake.io/) - [Appsignal](https://appsignal.com/) - [Bugsnag](https://bugsnag.com/) -- [Exceptional](http://www.exceptional.io/) +- [Exception Notification](https://github.com/smartinez87/exception_notification) +- [Google Stackdriver](https://cloud.google.com/stackdriver/) - [Honeybadger](https://www.honeybadger.io/) - [Opbeat](https://opbeat.com/) - [Raygun](https://raygun.io/) - [Rollbar](https://rollbar.com/) - [Sentry](https://getsentry.com/) @@ -104,18 +123,26 @@ ```ruby Safely.report_exception(e) ``` -## Installation +## Data Protection -Add this line to your application’s Gemfile: +To protect the privacy of your users, do not send [personal data](https://en.wikipedia.org/wiki/Personally_identifiable_information) to exception services. Filter sensitive form fields, use ids (not email addresses) to identify users, and mask IP addresses. +With Rollbar, you can do: + ```ruby -gem 'safely_block' +Rollbar.configure do |config| + config.person_id_method = "id" # default + config.scrub_fields |= [:birthday] + config.anonymize_user_ip = true +end ``` +While working on exceptions, be on the lookout for personal data and correct as needed. + ## History View the [changelog](https://github.com/ankane/safely/blob/master/CHANGELOG.md) ## Contributing @@ -124,5 +151,14 @@ - [Report bugs](https://github.com/ankane/safely/issues) - Fix bugs and [submit pull requests](https://github.com/ankane/safely/pulls) - Write, clarify, or fix documentation - Suggest or add new features + +To get started with development and testing: + +```sh +git clone https://github.com/ankane/safely.git +cd safely +bundle install +rake test +```