theScore Tech Blog

Things We Learn While Building the Ultimate, Personalized Mobile Sports Experience

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.

5 min read

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.

4 min read

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.

2 min read

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.

7 min read

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.

1 min read