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.
Weighted Random Sampling in Ruby
How would you simulate rolling a loaded die in Ruby?
Ruby performance optimization book beta is out
Learn how to make your Ruby and Rails app faster (like, 7x-10x faster), figure out how to optimize with the profiler, and understand why Ruby is slow and how to deal with that. http://www.alexdymo.com/blog/2015/04/ruby-performance-optimization-book-beta.html
WebSocket extensions as plugins
In December I released websocket-extensions and permessage-deflate for Ruby and Node. This post explains the architecture that enables pluggable WebSocket extensions.
Auto-Build football.dbs and Football Almanacs (Books) W/ Single Command
Hello, The new openfootball/auto repo lets you
(auto-)build football.dbs and Football Almanacs (books) with a single
command e.g. $ rake build SETUP=worldcup This will:
1) Download Datasets 2) Build Database 3) Download Book Template Pack 4) Build Book Pages 5) Generate Static Site (Books) Using Jekyll. Ready-to-use setups include:
worldcup, worldcup2014, top, top2014-15, cl2014-15, en2014-15, en, de2014-15, de, es2014-15, es, it2014-15, it, fr2014-15, fr, at2014-15, at. Cheers.
Ruby on Rails, App Design & Development in Miami
We offer We Design & Development of custom software, web, mobile app on Rails, Bootstrap, Angular, Java programming by our App Developers in Miami at Gistia Labs. Check it out
Queue Bus
We’ve refactored Resque Bus to work for Sidekiq as well. Check it out!
ParallelCI by Codeship for faster test suites: Free 14-Day Trial
Codeship have launched a free 14-day trial of their ParallelCI feature, which allows for up to 20 parallel test pipelines to speed up test suites. [more inside]
Ruby Metaprogramming - Creating methods dynamically
Ruby allows you to generate new methods dynamically. I explore how this works and present some different use cases for wanting to do this.
Gem for mswallet creating.
I think, do you know Passbook (pkpass) from Apple. Microsoft have simillar, that called Wallet. Both use some package format for pass store. For create pkpass exist gem: https://github.com/frozon/passbook. I want introduce gem for mswallet package creating, inspired by passbook.
Setting Up the BDD Stack on a New Rails 4 Application
I published a tutorial about setting up BDD stack with RSpec and Cucumber on a new Rails 4 application. Read tutorial.
TDD in Rails Beyond Basics
This is a 14 part intermediate level article series on how to do TDD in a Rails project.
Graph algorithms in Ruby
This is some of the code I wrote while studying some famous graph algorithms. If you are curious how Dijkstra, Breath/Depth first search, Kosaraju and others would look like in Ruby, check it out.
Just how fast is Heroku compared to Shelly Cloud
Nowadays, there are various different solutions for hosting Ruby applications. According to the Rails Hosting Survey 2014, one of the most common ways (47%) is to use Cloud-based hostings such as Heroku or Shelly Cloud. Doing this simplifies the entire deployment process to a minimum, and also does not require any additional people in your team to manage servers. The final choice will always depend on many factors, such as support quality, deployment simplicity, and performance to name just a few. Today, I will try to show you how fast Heroku and Shelly Cloud really are. [more inside]
Know Ruby: Enumerable grep
Most of us are familiar with the grep program. Are you familiar with its Ruby counterpart? Ruby plays a bit fast and loose with the name but the underlying concept is similar. Let’s see what grep can do.
Unit Tests for Chef Cookbooks With ChefSpec
Treating infrastructure as code naturally opens the possibility of having automated tests for it. This article explores how you can use RSpec based testing framework ChefSpec for rapid development of Chef cookbooks. Read more on Semaphore Community.
Finished the Russian translation of the Rails Style Guide
Today we’ve finished our work on translation for the Rails Style Guide into Russian. [more inside]
Number Verification and Two Factor Authentication in Ruby on Rails
More and more websites and apps rely on knowing your phone number and in many cases using that number for two factor authentication. [more inside]
Rails 4’s Awesome enums
How to best work with grouping kinds of (most) any attribute in your ActiveRecord records using enum. http://6ftdan.com/allyourdev/2015/03/31/rails-4s-awesome-enums/
Redmine Release Logs plugin
I just published my first redmine plugin for managing project releases. [more inside]
Functional Programming in Ruby with Contracts
I just blogged about using the Contracts gem to add typechecking and pattern matching to your Ruby code: http://viget.com/extend/functional-programming-in-ruby-with-contracts
working on large Rails codebases?
Component based architecture can help you, I wrote an introductory article with examples adapted from a real live applications http://teotti.com/component-based-rails-architecture-primer/
AgnosticSlugs
A simple gem that can generate slugs. [more inside]
How To Send Email From Your Rails 4 App
Rails 4 includes some handy new features in Action Mailer. In this 20-minute video tutorial we walk through how to create, preview, and send emails step-by-step using these new features.
Fun with keyword arguments, hashes, and splats
Can you use old-style => hash syntax with keyword arguments, so you don’t have to change all your old code? How do you mix hash arguments and keyword arguments together? And is there a way to convert keyword arguments to a hash, the same way *args converts regular arguments to an array?