The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Run tests in parallel with a single database
Tinkering around, trying to get tests to run in parallel, even with a database. Wrote about it in a blog post and came up with a gem.
Monitoring a Refactor with Care
I wrote a post on how to monitor a tricky refactor with New Relic’s APM.
Script-injected "async scripts" considered harmful
Script-injected scripts block on CSS and delay script execution. Their era has passed, and we now have a much better, cleaner, and faster solution: add an async attribute to your script tags.
Asset Manager - Manage your assets in style!
We just released Asset Manager, a Rails Engine that helps you to: *) Manage all your assets (images, pdf, zip, ecc.) in a central repository *) Quickly connect instances of your models with this repository, through a nice graphical interface *) Generate markup for your assets in your views with a series of helper methods Hopefully it will prove to be useful for others as well. Enjoy!
Rails 4.1 Variants
In this episode we show you how to use the new Rails 4.1 feature Rails 4.1 Variant (3.28 minutes)
Learn how Rails' MessageEncryptor Works
Crypto doesn’t have to be intimidating. [more inside]
When is an ActiveRecord model too fat?
When you read Rails blogs and books, or watch conference talks, you’ll learn a lot about making your models skinnier. These techniques are awesome, because your models will get too big or complex to handle. But do you really want to go as far as having your models only responsible for persistence, associations, and validations? How do you decide which logic should stay in your ActiveRecord models, anyway?
Sharing Code Between RubyMotion and Web projects, and Testing It Better
This is the source code and slides from a talk I gave at the SydInMotion meetup today where I showed everyone how to keep your use cases and business logic in clean, easy (and fast) to test, plain old ruby objects, and then plug in your delivery mechanisms, database, etc. Give it a look if you’re interested.
Using Vagrant for Rails Development
Here’s a quick guide to Using Vagrant for Rails Development to setup a virtual machine to run your application inside. You get to have a consistent development environment on any OS which mirrors your production environment.
sport.db.api.starter Sample - Build your own HTTP JSON API using the football.db w/ Sinatra
Hello, To get started building your own HTTP JSON API / web service using the football.db, worldcup.db, bundesliga.db, etc. try the new sport.db.api.starter kit.
Step 1: Install all gems using bundler.
Step 2: Copy a football.db into your app folder.
Step 3: Startup the web service (HTTP JSON API) using rackup.
That’s it. Open your browser and try some services running on localhost on port 9292. Example: List all World Cup 2014 teams (event/world.2014/teams); list all World Cup 2014 rounds (event/world.2014/rounds) and so on. You’re welcome to change the server script to fit your needs. Enjoy. Cheers.
Lockistics : Statistics collecting shared mutex on Redis
I just released the first version of Lockistics gem. [more inside]
New gem: sucker_punch-backgroundable
I just released sucker_punch-backgroundable, which allows you to easily background any method call with SuckerPunch without having to write a special job class. Heavily inspired by the Backgroundable module in TorqueBox.
Black-box testing
What is black-box testing and how it differs from white-box testing? Read about it on my blog
Signed parameters with secret key
It is a simple library allows to sign and verify data with secret key. Maybe useful to someone. Details here</s>
Rails Is Not Dead
Rails is not dead. Debating about things such as the hexagonal architecture isn’t an assault to the framework, but a way to evolve as a programmers. If the leaders of this community feel under attack, we have a problem. Please speak up. [more inside]
Automatic deployments with Travis CI on Ninefold
Ninefold is happy to announce that you can now use Travis CI to automatically deploy your application after a successful build. [more inside]
Integrate PostGIS and google maps into Rails Part 1
I’m creating a series blogs on how to integrate PostGIS and google maps into Rails, and I just finished Part 1. It talks about how to import the shape files into PostGIS in migrations and generate GeoJSON and then render it in google maps. I would like to hear some comments and suggestions, thanks.
My 2 cents - git basic workflow by @netzfisch
I’m not coding that often, but when the exception happens I often end up with a ‘task’ and the knowledge that there is a better way to handle the source code - but I can’t remember! [more inside]
worldcup.db - Pre-Built SQLite Database (Incl. All World Cups: Uruguay 1930 to Brazil 2014)
Hello, I’ve pre-built w/ the sportdb Ruby gem worldcup.db - an SQLite database - using the open public domain data sets including all twenty world cups, that is, from Urugay 1930 to the upcoming Brazil 2014 tournament. You’ll find the release on GitHub (~ 1 Meg). Note: As always you can build yourself an up-to-date version using rake e.g. issue $ rake build DATA=history Enjoy. Cheers. PS: Upcoming Events => Int’l Open Sports Data Hackdays (Fr+Sa May/23+24) - Join Us.
Napybara == Nested Capybara
I’m happy to introduce the Nested Capybara gem, or Napybara for short. Napybara is a lightweight DSL for defining Capybara helpers. Its goal is to make helpers that are easy to abstract, compose, and introspect. Do check out https://github.com/gsmendoza/napybara for more information.
New gem: Text Interpolator
It is a simple library for interpolation of variables inside the text. See details here.
SSH Tunnel - Local and Remote Port Forwarding Explained With Examples
There are two ways to create an SSH tunnel, local and remote port forwarding (there’s also dynamic forwarding, but we won’t cover that here). The best way to understand these is by an example, let’s start with local port forwarding. Continue reading →
Help Us Build ROM
In case you’ve been wondering how you could help us build Ruby Object Mapper or maybe you’re just looking for some OSS project you could help with…here’s how you can help us build ROM.
How to Test RubyMotion with any Ruby Test Framework
Waiting for your RubyMotion app to compile before your tests run can be a hinderance to a good TDD cycle, so I decided to come up with a way to test my code using any Ruby test framework without having to compile first. [more inside]
Free for developers beta of new Social Media Monitoring tool
We just launched a public beta of nikoma. It’s a social media monitoring platform & marketing tool for developers with lead generation tools etc. . The backend is based on the Apphera system, written in Ruby. Developers and webdesigners can signup for free right now (no credit card etc.) and we will process data results starting next week in the order of signups as we ramp up the system. Right now it’s monitoring about 9 million businesses and almost 700 million Tweets and other social media data in real time (yeah! All in Ruby!). At “login” you can signup with Google login or create a regular user account. We will also update the open source version of the backend soon. You can find it at my Github repo.