README.md in safely_block-0.3.0 vs README.md in safely_block-0.4.0

- old
+ new

@@ -10,18 +10,18 @@ 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) +[![Build Status](https://github.com/ankane/safely/workflows/build/badge.svg?branch=master)](https://github.com/ankane/safely/actions) ## Installation Add this line to your application’s Gemfile: ```ruby -gem 'safely_block' +gem "safely_block" ``` ## Use It Everywhere “Oh no, analytics brought down search” @@ -32,15 +32,15 @@ “Recommendations stopped updating because of one bad user” ```ruby users.each do |user| - safely { update_recommendations(user) } + safely(context: {user_id: user.id}) { update_recommendations(user) } end ``` -Also aliased as `yolo`. +Also aliased as `yolo` ## Features Pass extra context to be reported with exceptions @@ -92,29 +92,34 @@ **Note:** The throttle limit is approximate and per process. ## Reporting -Reports exceptions to a variety of services out of the box thanks to [Errbase](https://github.com/ankane/errbase). +Reports exceptions to a variety of services out of the box. - [Airbrake](https://airbrake.io/) - [Appsignal](https://appsignal.com/) - [Bugsnag](https://bugsnag.com/) - [Exception Notification](https://github.com/smartinez87/exception_notification) - [Google Stackdriver](https://cloud.google.com/stackdriver/) - [Honeybadger](https://www.honeybadger.io/) -- [Opbeat](https://opbeat.com/) +- [New Relic](https://newrelic.com/) - [Raygun](https://raygun.io/) - [Rollbar](https://rollbar.com/) +- [Scout APM](https://scoutapm.com/) - [Sentry](https://getsentry.com/) +**Note:** Context is not supported with Google Stackdriver and Scout APM + Customize reporting with: ```ruby Safely.report_exception_method = ->(e) { Rollbar.error(e) } ``` +With Rails, you can add this in an initializer. + By default, exception messages are prefixed with `[safely]`. This makes it easier to spot rescued exceptions. Turn this off with: ```ruby Safely.tag = false ``` @@ -158,7 +163,7 @@ ```sh git clone https://github.com/ankane/safely.git cd safely bundle install -rake test +bundle exec rake test ```