RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 
May 22, 2014
Mocking and Ruby  solnic.eu
Here are some thoughts about mocking and ruby: Mocking and Ruby.
Nested layouts in Rails  railsguides.net
Check out this post about Nested layouts in Rails
In this episode we show you (13:24 minutes) how to integrate a mobile framework into a Rails application.
3 key takeaways from her talk that we saw: http://multifaceted.io/2014/3-simple-but-powerful-takeaways-from-sandi-metz/
May 21, 2014
In this episode we’ll learn about the new email preview functionality built into Rails 4.1 to preview emails during development.

http://www.metacasts.tv/casts/rails-4-1-email-previews

* Subscription required.
I have a special episode for you all today! This is a normal episode just like any other, where I'll walk you through the process of using motion-installr to get setup for ad-hoc deployment using the awesome Installr service. The twist is though that I also have a competition for you! Here is the episode and this is the competition details.
BabyErubis is an yet another eRuby implementation based on Erubis. Only 200 lines of code and easy to customize. Supports both Ruby and Rubinius.
(Rails conpatibility is planned at next major release.)
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.
May 20, 2014
I wrote a post on how to monitor a tricky refactor with New Relic's APM.
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.
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  codemy.net
In this episode we show you how to use the new Rails 4.1 feature Rails 4.1 Variant (3.28 minutes)
Crypto doesn't have to be intimidating.

Dig into Rails's MessageEncryptor and learn how Rails uses it to perform symmetric encryption. You may well be using it already, you might as well find out how it works.
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?
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.
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.
May 19, 2014
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.
I just released the first version of Lockistics gem.

Basically it's a statistics collecting shared mutex on Redis. Sounds complicated? It isn't.

You can use the locking to ensure for example that two instances of a rake task won't be running at the same time on multiple hosts. There's a configurable maximum wait time how long the next invocation will wait for the lock to be released before giving up. After your code has executed some statistics of it's execution will be collected, such as duration and memory growth.

You can then monitor these statistics to find out for example that a rake task hasn't been run every day or that it took so long that the next cronjob tried to start another one while one was still running or to simply find long running or memory hogging parts in your code.

The metrics part can also be used separately without using locks and you can even add new metrics with single call during the execution of your code to monitor for example how many items were processed during the task.
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  adamniedzielski.github.io
What is black-box testing and how it differs from white-box testing? Read about it on my blog
It is a simple library allows to sign and verify data with secret key. Maybe useful to someone. Details here
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.

Read more
Ninefold is happy to announce that you can now use Travis CI to automatically deploy your application after a successful build.

Setting up Travis and Ninefold is simple, just run:

travis setup ninefold from your project directory.

Learn more here: ninefold.com/news/travis-ci/
May 18, 2014
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.
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!

Therefore I wrote a condensed cheat cheat with some plain and ordinarily commands, don’t expect fancy tricks as it is more a mnemonic for me. Instead of re-writing git man-pages I organized it by thinking in workflows … have a look here!
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.
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.
May 17, 2014
New gem: Text Interpolator  shvets.github.io
It is a simple library for interpolation of variables inside the text. See details here.
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  solnic.eu
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.
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.

http://blog.motioninmotion.tv/how-to-test-rubymotion-with-any-ruby-test-framework
May 16, 2014
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.
I just updated admin_view to work with Rails 4. It's a small code generator that can create a nice Bootstrap-friendly admin interface for existing Rails models. I find this useful because admin interfaces I work with almost always need to be customized, and this gets me to that point quickly. More background here.
The first of our two regular ticket sales takes place today, Friday 16 May from 2pm CEST. (that's 8am EST, 12noon UTC). Tickets are available at tickets.eurucamp.org and expected to go fast!
a simple introduction to using the elasticsearch fulltext search engine inside a rails application... enjoy!
But here's more about what that means.
Check out my blog post on how we improved our deployment process at Localytics: On the Road to Continuous Delivery at Localytics
Take a look at the blog post Cool stuff you can do with rails has_one and learn some cool stuff you can do with the rails has_one association.
May 15, 2014
I just posted a short screencast showing how to use ActiveRecord#merge to join named scopes in other models.
Just launched cloudconvert 0.0.5 , now you can use different callback parameter for each conversion.
Callbacks and Ruby  janjiss.github.io
Just wrote a new blog post about callbacks and ruby. Please enjoy
May 14, 2014
I have released supervision with ability to create system of safe calls directly on Supervision module. Please provided feedback to help make it production ready.
I just wrote a post about reentrancy for background workers. Want to know, why it's worth having reentrant workers (or what does it mean)? You can check out my blog post: Ruby (Rails, Sinatra) background processing – Reentrancy for your workers is a must be!
We have been granted special access to use one of the oldest buildings in the country
It's live! The RubyConf Portugal website is now online and we're announcing our first 2 international speakers and the date for the first batch of tickets: RubyConf Portugal
Noder brings the architecture of Node.js to Ruby. It was built to support Expressr and runs on EventMachine.
Simple Calendar is a gem for building calendars in your Rails apps. It now provides month, week, and custom-length calendars for you as well as a plethora of customization options. Simple Calendar gem on Github.
I wrote a new post on the New Rails 4.1 "travel_to" Test Helper. Hope you enjoy!
Now you can have your Rails app deployment and redeployment notifications automatically delivered to the Slack channel of your choice. Setup is super easy! Just choose Ninefold from the Slack integrations page and follow the simple instructions. Learn more: https://ninefold.com/news/slack/
May 13, 2014
Expressr brings the architecture of Express.js to Ruby. It supports a great deal of Express.js's API and runs on top of Noder (Node.js for Ruby).