Hashrocket.com / blog

Large roundup

Ruby5 Roundup - Episode 376

posted on and written by Paul Elliott in

Image 100x100 paul elliott

This week I had the privilege to host the Ruby5 podcast with fellow Rocketeer, Taylor Mock. If you haven't listened to Ruby5 before, you really should start. It is a five minute podcast twice a week that highlights new gems, new blog posts, and current events in our community. Here is a quick roundup of this episode.

http://ruby5.envylabs.com/episodes/412-episode-376-june-7th-2013

Octokit

https://github.com/blog/1517-introducing-octokit

GitHub's API has become an important part of our ecosystem as of late. Many apps are using it for sign in and others are pulling information from it for a variety of reasons. They recently released client libraries to facilitate interacting with those APIs both for Ruby and Objective-C.

The Ruby version has actually been around for a while. It was a community maintained effort but is now officially part of GitHub's offering. If you connected in the past, you likely have already used this codebase. The Objective-C version is another story though. Their Mac team extracted it from the GitHub for Mac app and open sourced it. You can now easily integrate it into your iOS or OSX apps. They have a really nice doc site for it that is worth taking a look at whether you are using it now or not.

Developer-Friendly European Payment Gateways

http://cookieshq.co.uk/posts/developer-friendly-or-not-european-payment-gateways

The folks over at Cookies HQ wrote a quick roundup of the various payment gateway options available in Europe. This is definitely something to consider if your app is going to take payments there. Some of the US processors also have a presence there and some are exclusively in that region. It is high level but gives you a good place to start looking if you need to choose a provider.

DbSync

https://github.com/scottschulthess/db_sync

This is a new gem that allows you to import and export database tables. It only does data but is a handy utility to have around. If you are running your own servers, you can easily export the data on the server, scp it to your local machine, then load it into your dev database. You could also use it to share data between developers or even just make a backup of your existing dev database. Lots of potential use cases and it looks very easy to work with.

ActiveRecord::Calculations.pluck

http://blog.hashrocket.com/posts/rails-quick-tips-activerecord-calculations-pluck

This is a blog post by fellow Rocketeer, Matt Polito, from a few days ago. He discusses how to pull a single column from a database query with Rails using the pluck method. It is a really handy method in the console, where you'll often need to get at a column while investigating issues.

Using ember-auth with Rails 3 and Authlogic

http://blog.centresource.com/2013/06/04/using-ember-auth-with-rails-3-and-authlogic/

This article was very interesting to me. It fuses new technology, Ember.js, with a real blast from my past, Authlogic. If you haven't been doing Rails for that long you may not have heard of Authlogic. It was the go-to for many of us a few years back, long before Devise and OmniAuth came on the scene. There is still a community of people using Authlogic and this blog post goes into detail on how to integrate it with ember-auth. Lots of code examples and explanation of how to do it. Definitely worth checking out.

The Protector!

http://staal.io/blog/2013/06/04/the-protector/

Last but not least we have protector, a gem that allows you to control resource authorization in your models. It provides a nice DSL for specifying who can read and write to resources, even down to the field level. You can define default scopes based on roles and conditionally provide read-only access to certain users. You define a block in your model that receives the current user instance and configure away from there. It looks like a really interesting alternative to cancan if you need that level of authorization.

So that's it for this episode of Ruby5. If you haven't already, subscribe to the podcast and keep yourself up to date. Thanks for listening!

Posted in Ruby5 Roundup and tagged with Ruby