A few days ago we got an email from Chris Warren letting us know about a new Ruby gem he's created that allows you to automatically send any API call you make through Runscope.
Similar to our requests-runscope Python library (in fact, the inspiration for it), runscope-rb automatically creates Runscope URLs for any Ruby HTTP library that uses Net::HTTP under the covers (like HTTParty, rest-client and faraday)
Start by running
gem install runscope-rb or adding
gem 'runscope-rb' to your Gemfile. Once installed, configure it like so:
Runscope.configure do |config| config.bucket = "bucket_key" config.domains = ["api.stackexchange.com", "api.github.com", /\S+\.desk\.com/] end
If you're using Rails, you'll want to put this in
config/initializers/runscope.rb. Be sure to replace
bucket_key with one from your account. There are a few more options too, check out the list of configuration options.
If you'd like to add support for other backends in addition to Net::HTTP, Chris is taking contributions with instructions over on the GitHub project page.
Our thanks to Chris for putting this excellent library together. If you run into any issues with it, feel free to get in touch and we'll be happy to help.