RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
November 14, 2014
Action Access is an access control system for Rails that provides a modular and easy way to secure applications and handle permissions. It works at controller level focusing on what actions are accessible for the current user instead of messing with models and their attributes. Read more »
Using spring with pow!  dev.mikamai.com
The other day I was a bit sad for I was aware that pow (the web server) wasn’t leveraging spring (the Rails preloader) with its fast load times. Read more »
I just launched a new gem named Scribble.

Scribble is a client facing template language similar to Liquid. Scribble was written in Ruby and can be used in any Ruby or Ruby on Rails project. It takes a template file, consisting of text and Scribble tags and transforms it into text. Scribble can be used to transform any plain text format like HTML, Markdown, JSON, XML or plain text. Client facing means that it is safe to use Scribble to run/evaluate user provided templates.
Check out Hemant Kumar's post about preventing MySQL deadlocks in Rails...
Sometimes you need to save a SQL query or query parameters for the future use. Here's a flexible solution allowing you to save & use it every week.
Sometimes you need to save a SQL query or query parameters for the future use. Here's a flexible solution that allows you to save it and reuse every week
Maxitext
- Ctrl+c stops tests and prints failures
- pastable rerun snippet for failures
- multiple before & after blocks
- around blocks around { |t| Dir.chdir(...) { t.call } }
- red-green output
- mtest executable to run by line number and by folder
and more goodies :)
November 13, 2014
Checkout the v0.3.0 changelog of themes_on_rails .
Look over our shoulder as we refactor and optimize a set of queries.
Starting to dive a bit deeper about improvements in the Rubinius instruction set.
Interesting thoughts and some welcome improvements planned for Rubinius 3.0.
One of my first tasks as NY Tech Meetup’s newly minted hacker-in-residence was migrating our application from Heroku to Ninefold. Scary! Or at least it sounded like it would be. But it turned out to be a pretty straightforward and painless process. Here’s what you do...
November 12, 2014
I just launched Services - A nifty service layer for your Rails app and blogged about it. Let me know what you think!
Over last couple of months, our team has helped further develop a unique video distribution platform. Finally, the big launch day has come and we’d love to introduce you to Uscreen: here's a little cast study about the platform.
Ru brings Ruby's expressiveness, cleanliness, and readability to the command line. It lets you avoid looking up pesky options in man pages and Googling how to write a transformation in bash that would take you approximately 1s to write in Ruby.

For example, to center a file's lines, use: ru 'map(:center, 80)' myfile.
Hone Your Craft with RubyMine 7  blog.jetbrains.com
RubyMine 7 is out with support for Chef, Puppet, EditorConfig, and much more
Step by step guide for deploying your first sinatra application to VPS running nginx/passenger [Ubuntu 14.04 LTS].
A blogpost showing a Faster Way to Source Map DOM Elements for Rails apps.
Hello, I've put together a small Sinatra sample web app that shows all the world's country codes (so far alpha 2, alpha 3, internet top level domains and motor vehicle license plates codes are included.) All code and datasets are public domain. See a live country code page on Heroku or check the world.db.codes source on GitHub. Cheers.
November 11, 2014
There are plenty of reasons users will want to sort and reorder lists, but implementing such a feature when using the has_many :through association isn't so obvious. In this post I'll show you how this is possible using the ActsAsList gem, and along the way show you how to load seed data, create a has_many :through relation, and use the great table_print gem. Read the post.
Almost every SaaS product has a free trial period. Why? At first, I thought it's to get as many people to try the product, but that doesn't make sense. The real reason is to create an "endowment effect."
Have you ever wanted to pass a method to a function that only takes a block? Or figure out which of your object's superclasses broke the method you're trying to call? Those things are easy to do with the method method. Use it well, and you can learn about your dependencies, save yourself hours of debugging, and get your code to the places it needs to be.
rb_import adds an import method to the Ruby VM so one can do foo_class = import './foo.rb'.
Eventually name-clashing class/module definitions can now be prevented with this gem.
November 10, 2014
Say hi to the Rubinius Team! News on Rubinius 3.0 coming soon too.
Raptor is a new Ruby web server that's up to 4x faster than Unicorn, and up to 2x faster than Puma and Torquebox. The most recent blog post describes in high detail how it has been made so fast. It's the first post from a series that will elaborate on Raptor's implementation.
Tail call optimization is an optimization where tail recursive functions are transformed into loops by the compiler. A tail recursive function is one where the final statement is a call to the same method. In this post, we will look at what tail recursive functions look like, how tail call optimization helps them, and how to enable TCO in Ruby. [Continue reading]
Let Austen Ito show you how he builds a basic infrastructure with Docker, Chef, and Rails!
Location-based web applications calculate distance between objects using the latitudinal and longitudinal coordinates and the Haversine formula. But how does one determine an object's coordinates given a street address or IP address, let alone calculate the distance between two sets of coordinates? Fortunately the Geocoder gem turns these otherwise complex tasks into a fairly trivial matter. In this post I'll show you to to integrate Geocoder into your Rails application.
Get a smaller Rails app footprint with two commands. A 36% boot time memory savings for free. Also learn how to benchmark and optimize your own application's boot size.
Pakyow v0.9 Release  pakyow.com
Pakyow, the view-first app framework for Ruby, dropped over the weekend. Release notes + upgrade guide.
liquid-rails allows you to render .liquid templates with layout and partial support. It also provides filters, tags, drops class to be used inside your liquid template.
assets-rails allows you to require javascript and stylesheet libraries with the exact version so that your frontend stuffs will continue to work as times passed by. You can use different versions for different templates in a single Rails application.
November 09, 2014
tty-progressbar now includes estimated time token, a frequency option to throttle repainting and ability to log during display. Please check it out and let me know your thoughts.
Some ideas about how to create configurations for ruby programs.
November 08, 2014
Reform 1.2 Is Out!  nicksda.apotomo.de
The popular form object for Ruby and Rails, Reform, got some new amazing features. It now allows dynamic syncing and saving, got a 85% speedup, a dirty tracker and more.
Pastel v0.3.0 released  rubygems.org
pastel got even stabler and faster. Fixed bugs concerned with nested styles, improved speed and added ability to alias colors at runtime through environment variable and library interface. This is a component that will be part of tty toolkit
I've just released v0.19 of image_optim with improved gif optimization and new optional lossy worker for jpeg files which uses jpeg-recompress.
I just launched activerecord-after-transaction which provide a function to execute a proc after the transaction.
I wrote a blog post about considerations on Daylight Saving Time when using time zones.
November 07, 2014
Check out your app's stats. The tool is here. The blog post here has example output.
This blog post teaches you that depending on the way you serialize your Date and DateTime values to JSON, you could lose information.

Learn how to avoid that problem.
November 06, 2014
A short walkthrough of how to configure Pronto to do static analysis on every pull request with the help of Travis. Can also be applied to other CI servers.
Sometimes you want to see what's happening in your production log files right now. You can use log management tools like Loggly or Papertrail for this, but there is also an easy way to stream your log files with Capistrano.

Read on
November 05, 2014
A step by step walkthrough of how to make browser to phone calls in Rails using Twilio
I would like to introduce to you a small gem that I released last weekend. It's called scriptster and its aim is to help you make your Ruby scripts a bit nicer (especially those that depend on many external tools).
Hello, As an example of using the beer.db - open public domain beer n brewery data - I've put together a page-a-day "eternal" calendar serving a different beer w/ every request. See a live demo with an all-Austrian taproom or build your own. All code and data is public domain. Cheers. Prost. Kampai.
November 04, 2014
I just finished the 2014 Rails Rumble Gem Teardown, which is a detailed analysis of the gemfiles used by the rail rumble teams. A ton of fascinating stuff this year, including the rise of Bootstrap, Rails Assets usage, Autoprefixer domination, etc.
For anybody using Ninefold and/or Codeship: The two services now integrate.

You can read more here.
When you generate a scaffold in Rails, you'll see the usual respond_to blocks. But some of your actions, like index, don't have them. And those actions, when hit with a bad format, will raise the wrong kind of error. You want to handle bad formats correctly, but littering all your controllers with big respond_to blocks is crazy. It feels un-Rails-ish. So what do you do?
An example of dependency inversion  abernardes.github.io
I recently stumbled on such a good example of the Dependency Inversion principle being applied that I had to blog about it.