RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
October 24, 2014
Data validation is an important piece in software architecture. Delegating this responsibility to models increase the cost of maintenance. Lotus offers a different and powerful approach to the problem.

[read the announcement]
Previous weekend I've participated in annual Rails Rumble 2014. I've build app/product called Aloo. This is the story behind it, some details and some problems that I've discovered on my journey.
Serving static assets with Rack  abernardes.github.io
I think this is a pretty common scenario, and yet I struggled to find an example on how to do it. I was trying to build a single page application using AngularJS on the front-end and Cuba, a minimalistic web framework for Ruby running on top of Rack. Read it here
We published the part 2 and part 3 of the "Process Payment with Paypal in Rails" series!

Process Payments with Paypal in Rails, Part 2 - Charge Credit Cards
Process Payments with Paypal in Rails, Part 3 - Recurring Payments

Check them out!
October 23, 2014
Lita 4 released  docs.lita.io
Version 4 of Lita, the ChatOps framework for Ruby, has been released. Lita gives you a robot for your company's chat room which can serve as an interface for automated operations. Read the release announcement and upgrade guide for more details on what's new in the latest version and how to upgrade.
In Defense of Alias  erniemiller.org
I've been reading a lot of Ruby style recommendations lately, and I wanted to share a relatively unpopular opinion (with some justifications) in preference of "alias" over "alias_method".
The ROM project is being rebuilt using Sequel for RDBMS. Read more about it here.
How to score A+ in your ssllabs test: dev ops tips from a Ruby on Rails team.
I've just published follow up to our first Useful FactoryGirl methods post on the CookiesHQ blog. This one is about the building strategies in FactoryGirl.
October 22, 2014
Pronto performs quick automated code reviews with the help of various analysis tools (RuboCop, Brakeman, Flay, etc.) by checking only the introduced changes. And now it also lints your SCSS with the help of SCSS-Lint. Check it out: Pronto and pronto-scss.
Rails Crash Course  nostarch.com
Check out my new book, Rails Crash Course! It's based on the curriculum I've used to teach Ruby on Rails to both new programmers and experienced web developers. Head to http://www.nostarch.com/railscrashcourse for more info, and use the discount code GEMS for 30% off. I'd love to hear what you think of the book, and I hope you find it a useful resource.
I just launched a new release of Invisible Captcha with a bunch of changes: new options, better API, better tests (also Travis CI integration) and little code and docs refactor.

Invisible Captcha is a simple and flexible spam protection solution for Rails apps, based on the honeypot strategy. It's really simple under the hood, but effective. Take a look! GitHub repo.
I just published a post '5 Free eBooks for Learning Ruby on Rails Framework', do you have any other books that you could add to the list?
For anybody using Cloud 66 and/or Codeship: The two services now integrate and it only takes one line of code to set everything up.

You can read more here.
Maybe you’ve learned the “what” of Rails, but don’t understand the “why” and the “how.” Maybe you're about to give up on Rails because you just can’t put the pieces together. If you feel like running away when you stare at your newly-generated Rails app, I wrote a book for you.
I just released a utility for finding suboptimal Ruby class API usage. It uses runtime code analysis to find problems.
Just because your dependency doesn't contain Ruby or Objective-C doesn't mean you can't use Rubygems or Cocoapods to manage shared code.
There’s a lot confusion surrounding Ruby’s multithreading capabilities. Especially, with regards to all the changes between 1.8 and 1.9. So, let’s be absolutely clear: MRI Ruby does in fact support OS-level threads.
October 21, 2014
I released an open source Rails engine named Payola that you can drop into any application to have robust, reliable self-hosted Stripe payments up and running with just a little bit of fuss.
Taking a tag-based approach to content categorization gives your users much more flexibility in terms of quickly finding desired information, products, and blog entries. In this article I'll show you how to incorporate tagging and tag clouds into your Rails application using the powerful Acts As Taggable On gem. Read the article
So, you’re working on a new app, and Rails just generated a test for you. You uncomment it, come up with a name, and you’re ready to write your test, right? But then what? What do you write first? What should your test code look like? If you follow a simple pattern, you’ll turn those stubbed out lines of code into clear, well-structured test cases.
Rails Rumble is a 48-hour app-building competition. Requirements are easy: Rack framework, host on Heroku, nothing production-ready created prior to the start and no pushes after close. It occurred past weekend. Join discussion and sharing on reddit/r/rails.
October 20, 2014
I uploaded a new version of pumog 1.0.1. Pumog stands for **PuppetModuleGenerator** and can be used to generate a basic structure for new puppet module with or without documentation.
Polymorphic associations can be confusing to people who are new to Rails. We wrote a tutorial and used some examples to explain it.

Polymorphic Associations in Rails
When building a custom background processing system, at one point, you need to worry about how you spin up and manage multiple worker processes. This is where most people reinvent the the wheel, and write custom code. Don't reinvent the wheel, and use Einhorn instead.
Green Ruby News #89  greenruby.org
Green Ruby News #89 is out. Fresh links for your Monday.
October 19, 2014
Hello Rubyflow, we're the authors of Raptor, a new Ruby web server that's up to 4x faster than Unicorn, and up to 2x faster than Puma/Torquebox. It has taken us a lot of blood, sweat and tears to write, and we're wrapping up for a release in the near future. You can learn more at http://www.rubyraptor.org/
If you need to work with Cucumber or Turnip and read data from outside of your script, you can use this little metaprogramming trick.
I just relaunched my book Mastering Modern Payments. It's a concise, comprehensive guide that helps you go from blank Rails app to robust, reliable Stripe payments in as little time as possible. The second edition includes a large number of edits, updates, and revisions, including a brand new chapter about subscriptions.
October 18, 2014
It was a while ago, but when I read "Metaprogramming Ruby," I followed along by writing brief summaries of the explanations in the first half of the book along with example snippets. Annotations were produced with xmpfilter.
Mike Mazur talks about Page Objects over at the Neo blog.
October 17, 2014
Reverb.com CTO Yan Pritzker shows how to apply domain driven concepts to create "write once, don't modify" code in Ruby on Rails. The video of the talk is up and slides are here.
October 16, 2014
If you're upgrading to Mac OS X Yosemite, now's the time to update your Rails development environment as well. Here's my article on Installing Ruby on Rails on Mac OS X Yosemite.
The decent_exposure gem can go a long way towards cleaning up your RESTful Rails controllers, resulting in significantly less boilerplate code you'll have to write to implement conventional RESTful actions. This tutorial introduces you to this great gem, and offer several examples demonstrating just how much code decent_exposure can eliminate.
I released version v1.0.2 of search_cop as a bug fix release. search_cop adds search engine like query features as well as fulltext index capabilities to ActiveRecord. Go ahead and try it out.
8 steps to move Rails view to Marionette with a lot of code snippets + additional resources list.
October 14, 2014
We wrote a tutorial on how to integrate Facebook OAuth with Rails apps with the Omniauth-facebook and koala gems.
Rails & memory leaks  arubystory.blogspot.com
Rails & rescue from memory leak.
Check out our brand new app 'Reward Them' Reward Them is a recognition and reward system which primary role is to strengthen relationship between co-workers. Experience and time showed that it also perfectly works as a motivational tool.

Because sometimes it is much easier to tune in a radio than your own team.
How does Rails handle gems?  justinweiss.com
If you're not sure how Bundler works, the way gems get pulled into Rails might seem a little too magical. How does adding a line to a Gemfile get code into your app? How do Bundler, Rails, and RubyGems work together to make handling dependencies easy?
Here's a preview of a new feature for Intercity. We just launched easy one-click Rails integration for your Digital Ocean Droplets.
We created Metaslug, a gem to let you easily manage your metas informations (title, description, opengraph…)
pg_morph is a gem created by Hania Seweryn from Lunar Logic. It makes it possible to add foreign key constraints for each polymorphic relation type with ActiveRecord and postgreSQL. Hania wrote the "Polymorphic relations and DB consistency with ease? From now – yes!" post about it. Have a nice reading!
October 13, 2014
I just wrote a post on evaluating reverse polish notation using a stack in Ruby.
Hello, using the beer.db - open public domain brewery, brewpub and beer data - and - of course - Ruby let's you make your own beer map thanks to GeoJSON. See an example beer map for Austria (~200 breweries n brewpubs). The build script geo.rb - still early and rough - but working is just a couple of lines. Cheers. Prost. Kampai.
I have a new series I'm working on called RubyMotion for Rails Developers. The intro video and the first episode ("Hello RubyMotion") are up and free to watch to get an intro into using RubyMotion. There will be a new episode released each week. Subscribe for only $9/month to get access to the other 11 as their released.
Green Ruby News #88  greenruby.org
Green Ruby News #88 is out, fresh links from last week for fullstack ruby devs.
Route Globbing in Rails  railsmine.net
A blog post about route globbing in Ruby on Rails
October 12, 2014
A blog post about a patch on the Dalli Memcached adapter for Rails that is really a discussion about a gem called Watchdog that makes monkeypatching less dangerous.
I've released pastel to allow for non intrusive styling of terminal output. Please give it a go and provide feedback!