All Posts Tagged “ruby”
Defined Methods in Rake Tasks; You're Gonna Have a Bad Time
Do you define methods within your Rake Tasks? You might want to reconsider that, or you're gonna have a bad time down the road. Walkthrough an example which illustrates a tricky gotcha and solutions to avoiding it.
Simple Ways to Protect an API: HTTP Basic Authentication and HTTP Token Authentication
Having a limited number of consumers for an API lets you keep the authentication really simple for that API. Let's explore HTTP Basic Authentication and HTTP Token Authentication as the simple solutions in this scenario.
How You Nest Modules Matters in Ruby
Ruby provides two different syntaxes to nest modules (and classes). Most Rubyists think that the syntaxes are interchangeable. But, the the code may behave differently depending on the choice of syntax.
Benchmarking JSON Generation in Ruby
Find out how RABL, ActiveModel Serializers, and plain Ruby presenters perform relative to each other when they are used to generate JSON.
Using Airbrake with Rake and not Rails
You can configure Airbrake to notify you of errors that happen in your rake tasks. However, there is a gotcha if you want to do this outside of Rails.