RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
June 04, 2013
I just launched github.com/scottschulthess/db_sync

It's a gem that provides a couple rake tasks for exporting certain tables from development into yaml and then importing those tables into development.

This is very useful for apps that have operational/configuration tables stored in production that you want to run locally.
This recent addition to the Phusion Passenger manual explains what environment variables are, how they work, and how to set them for different services (bash, Apache, Nginx, cron, Ruby apps)
Probably caching in Rails is old phenomenon, but this article on Rails cache with Example app & some benchmark data is pretty good for someone looking to understand Rails cache from scratch & see it in action too.
June 03, 2013
After a discussion with a coworker, I decided to see if it was possible to extend Symbol#to_proc to invoke local methods (only for fun!). I discovered frame_binding from Ruby 2.0's RubyVM::DebugInspector while hacking something together.
I just launched the second part Build Your Own Real Estate Listing Service with Ruby on Rails and Sphinx Part 2. Please take a look if you like.
We recently had to test most of the European developer friendly gateway, so here are some names and what we think about them on our blog.
Shortly after launching my site using Sinatra and hosted on Heroku I was looking for ways to improve the performance. I looked through the add-on services Heroku offered and found Redis-to-go had a nice looking free tier. So I went ahead and implemented caching with Redis. Here's the results:

Cut average response time by three quarters using Redis
A malicious gem could do pretty much everything on the environment that runs its code, from stealing critical data to taking control over the entire operating system. It may only take minutes for the malicious software to access poorly protected files or to exploit its way up, from running as restricted user to escalating to a privileged user.
Read More
Wiselinks, a widely used alternative to PJAX and Turbolinks, got 0.6 release on last weekend.

Read more about fixes and new features in my blog:
http://igor-alexandrov.github.io/blog/2013/06/02/wiselinks-0-dot-6-release/
and follow project on GitHub:
https://github.com/igor-alexandrov/wiselinks

P.S.
Live demo application:
http://wiselinks.herokuapp.com/
I just updated Pearl. You can now rename droplets, transfer images to other regions and add ssh keys.
June 02, 2013
I've just released Mousetrap-rails v0.0.10 (gem for handling keyboard shortcuts in web apps) which is now compatible with Rails 4 and works with Turbolinks gem.
June 01, 2013
I've just released major upgrade to the GitHub CLI which provides refined interface, more commands and better configuration.
I just launched the first part of my new tutorial Build Your Own Real Estate Listing Service with Ruby on Rails and Sphinx. Take a look if you like.
How should the Authority gem support Rails 4's new view caching approach? I've just opened a Github issue on the project and would love to get some input from the community, especially those already using the two together.
I just announced RubyAudit. RubyAudit will alert you when a vulnerability is found in Gems your app uses.
May 31, 2013
Continuous Deployment can be incorporated into every company. We held a meetup and talked to Etsy, GrabCAD and insightsquared how they did it.

Bringing Continuous Deployment to everyone
I just released gem bundler-unload an extension for Bundler allowing to unload bundler back to bundlerless state. The code was extracted from rubygems-bundler and is used now as dependency.
I just launched kent - gem for asynchronous content loading.
Learn about some model matchers you might not already know about when using shoulda_matchers with RSpec.
reInteractive Developer Leonard Garvey has put together a set of step-by-step articles to help newbies get introduced to Ruby on Rails. reInteractive have used these articles as part of their InstallFest initiative, with 35 participants already set-up and started, and a goal to reach 200 people by the end of the year.
May 30, 2013
If you use Pow to manage your Rails apps and you have a lot of apps, you might find this useful. It's a default app that lists/links to your other apps so you don't have to remember their names.
The very first feature that you learn about Pry is undoubtedly “binding.pry”. You put it here, there and everywhere; you’re happier than you’ve ever been before. In simple words: “binding.pry” makes your life a lot easier. But, have you ever wondered what “binding.pry” is?
writing mountable rails gem with rspec

This blog shares good practices that we followed while writing a rails mountable gem, and and helps in setting up a framework where one can do testing using rspec.
MonoLogger is a "lock-free logger for Ruby 2.0". It's actually the exact same as Ruby's Logger, minus the lock. I wasn't sure if this was safe, so I did some research. Turns out MonoLogger does the right things to ensure that log messages aren't interleaved even in the face of multiple threads. Warning: you might learn a thing or two about working with Unix file descriptors!
The ability to add behavior to an object for a short time can make for some very flexible structures. Casting is a new gem that allows you to run methods from a module at runtime without altering the object's superclass structure (for example, no need for #extend).
The countdown on ruby-lang.github.io has almost reached zero. Once the clock hits zero, the "big announcement" will be made at Ruby Kaigi and posted on the website. Only seven more hours to go!
It can be useful to host static sites on heroku sometimes. Everything I found on the internet, including heroku's own guide wasn't ideal, so I created a tiny gem to do this and wrote a blog post about it.
I just released heroku-buildpack-ruby-bower. See Wiki page for usage.
Part 2 of much loved Profiling Ruby 2.0 apps using DTrace
May 29, 2013
Troubleshooting Konacha Timeout Errors  blog.smartlogicsolutions.com
If you're having Konacha timeout errors, you're not alone. Read how we fixed this problem at SmartLogic.
Errbit 0.1.0  blog-en.shingara.fr
Errbit is not dead and the errbit team release the 0.1.0 version.
I just released a blog post detailing some Capybara tricks.
For those of you who don't already know, Datamappify is a library for separating domain logic from data persistence. It utilises existing ORMs so you don't lose the powerfulness of say, ActiveRecord.

Hot off the oven, we have just added nested entity composition to Datamappify! We think it's a really good way to DRY your code. We use Datamappify as a form mapper, so you may use it to compose and deal with your form data! Cool hey?

Please check out the code here: https://github.com/fredwu/datamappify
Phusion Passenger 3.0.21 and 4.0.5 have been released. Both versions contain, among other changes, a fix for security vulnerability CVE-2013-2119.
I just released a gem called Naught for implementing the Null Object pattern. While Null Objects aren't exactly difficult to create by hand, Naught has some features you may find helpful.

Frontline
allows to manage Espresso applications directly from browser.
You'll need a terminal only to start the application.

From there on Frontline will CRUDify controllers, routes, models etc. as well as run migrations, specs, execute bundler and git commands, manage assets etc.


When writing software tests, you usually need to get your application into a certain state by creating test data. This test data is the basis to run your tests on. In this screencast you will learn about the test data generation tool factory_girl.

Managing test data with factory girl
May 28, 2013
This blog post covers a broad overview of Hypermedia API technologies for Ruby, and why we went with HAL, Grape, and Roar at reverb.com:
Pluck is an ActiveRecord calculation method introduced in Nov 2011 and is designed to return a collection of values by performing a single column SELECT query as direct SQL. Now what problem could this help solve and how does it affect us?
Did you know that women make up only 2% of of the open source community? That's right. Only 2%.

Rails Girls Summer of Code wants to help Rails Girls students get into Open Source.

Just like in Google and Ruby Summer of Code, students will be paid so they're free to work on Open Source projects fulltime for 3 months, while being supported by coaches and mentors.

Unlike those programs, the Rails Girls Summer of Code is about helping students to further expand their knowledge and skills by contributing to a Open Source projects (rather than producing sophisticated code).

In order to make this happen we are looking for your help!

Please head over to the crowdfunding campaign and consider a donation. Please share this with collegues and friends, convince your company to put in a sponsorship and help make this happen :)
Say you're using Jasmine, and you're writing CoffeeScript in a Rails app. Here are some tips for running those tests in CI environment.
Continuing a discussion about how to achieve better isolation in your tests.
ruby-install 0.1.0 has been released! Supports MRI, JRuby, Rubinius, installing into /opt/rubies or ~/.rubies, installing arbitrary versions right after they are released, installing build dependencies via the package manager, applying arbitrary patches and passing in arbitrary ./configure options.
I just released RuboCop 0.8.0! The big news is that RuboCop now runs on JRuby and Rubinius :-)
Quit polluting your routes file with version namespaces or complicating your logic with separate controllers. Version Cake 1.2 is the unobtrusive way to version APIs in your Rails app. Works great with Jbuilder and RABL. Now with Rails 4 support.

app/views/posts/
- index.v1.json.jbuilder
- index.v2.json.jbuilder
RSpec 2.14.0.rc1  teaisaweso.me
RSpec 2.14.0.rc1 has been released. RSpec 2.14 introduces a new syntax for message expectations, bringing them in line with the new expect syntax for state based expectations.

Please try it out and let us know what you think.
May 27, 2013
Phusion Passenger 4.0.4 has been released with many bug fixes.
See usage and source code on GitHub.
Now it fully supports ActiveRecord, DataMapper and Sequel models.

Source Code on GitHub

DEMO

Active Admin 0.6 has been released, and contains lots of changes. Here is a sum-up of these changes, to help you choosing to upgrade or not: https://discuss.gemnasium.com/t/activeadmin-0-6-0-is-out/8.
We'd like to hear if anyone had troubles while upgrading to this version.