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.
Ruby Conference - Erie Day of Code
Erie Day of Code is a one-day event taking for Ruby on Rails web developers, computer scientists, creatives, and overall tech enthusiasts! Through a series of talks, workshops, open discussions, and a catered lunch, we intend to teach and learn about the progression of web development and open source not only in Erie, Pennsylvania, but globally. [more inside]
At least do Regression driven tests
You want to test your code and don’t know where to start? Regression driven tests might be a good place to start.
Applying UI and UX to the command line
In this design/development mashup, I review some common UI and UX principles and explain how I applied them to Capistrano, a decidedly geeky command-line tool. The result is my recently released Airbrussh gem for beautifying Capistrano output. Take a closer look.
menu_txt - manage your site's menus in plain text
menu_txt provides a simple plain text syntax for menu trees, allowing your non-tech folks to edit your website’s menus without knowing how to write code.
Terminal Emojify
Nowadays many projects use emojis as part of their contribution workflow. Commit messages are, therefore, full of these wonderful icons which, unfortunately, are not accessible in our terminal. Terminal Emojify is here to change that.
Bootstrapper: gem for Ruby on Rails apps that generates file templates for you
We’ve just shared a post about CSS/Sass rules and architecture. If you like the pattern described there, check out Bootstrapper, our open source gem for Ruby on Rails apps that will generate file templates for you.
Reading Rails - Time Travel
Did you know that Rails comes with its own time machine? What about its own tiny stubbing library? [more inside]
Understanding State Machines
Ever wondered what a state machine does? Or how to know if your Rails application needs one? Check out this post which unpacks the theory behind the mysterious CS state machine.
RubyGems Plugin Generator
Last week I published a post explaining how to create a plugin for RubyGems. Now I created a gem that automates those steps and generates a plugin for you.
Gem of Week #12 - logutils gem - yet another (lightweight, simple) logging library
Hello, over at the Planet Ruby the Gem of the Week series continues with #12 - logutils - yet another logging library - that lets print all “standard” log messages such as debug, info, warn, etc. and lets you add event handler to auto-save logs in a database and so on. Full article. Cheers.
No Date.today? It's DateTime!
Time is hard. Jay Hayes walks you through time zones in Ruby on Rails using datetime.
How to migrate Rails application from Ninefold
Ninefold decided to close their App Deployment functionality and the US region. This means that you have to migrate your Rails application before 24 May 2015. [more inside]
Dead_simple_authorization - A very simple authorization gem
Dead_simple_authorization is a simple gem for authorization. The main concepts around dead_simple_authorization are: users, resources and permissions. Using a couple of simple naming conventions, it organizes the way in which access to a resource (an activerecord model for example) by a user (e.g. a web application’s user) is checked.
Authoraise - tiny authorization gem that prevents false negatives
Authoraise is not like other authorization gems because it doesn’t enforce any kind of structure or vocabulary on your app. Its only job is to wrap and audit your boolean expressions that you use for authorization, in order to prevent false negatives.
Tracing global variables using trace_var
Let’s explore the Kernel#trace_var method, which lets you trace global variables in your program. http://nithinbekal.com/posts/ruby-trace-var/
Module#added
The added gem is a small library that unifies Ruby’s extended, included and prepended module hooks into a single added one, which will be run for all instances that include the module.
More UJS fun with Accordion Content
I’ll show you how to use UJS to dynamically load content directly from the server and use Bootstrap’s accordion to expand your page with the new content. http://6ftdan.com/allyourdev/2015/03/15/more-ujs-fun-with-accordion-content/
Conditionals: Style and Design -- Design is Refactoring
Last week’s post on Refactoring Away Conditionals got a lot of feedback, both positive and negative. This is fantastic! This week I want to continue the conversation by discussing the criticisms and alternatives that people provided. Along the way, maybe I’ll say something interesting about the difference between Design and Style.
Release simple_paginate gem
We saw some websites using will_paginate or kaminari for pagination, but they just need previous and next page navigation, will_paginate or kaminari is overqualified. [more inside]
Introducing the tco_method gem
Earlier this week I published the tco_method gem to help simplify the process of compiling select Ruby code with tail call optimization enabled in MRI Ruby. Take the gem for a test drive, view the project on GitHub, or check out an introduction to the gem in my latest blog post including background, example usage, interesting problems encountered during development, and future opportunities.
Debugging with PaperTrail
PaperTrail came to my rescue today, enabling me to quickly debug an issue that made no sense whatsoever! You can read about it here in case it might help someone else along the way.
Generating randomness in Ruby
Randomness can make things more interesting in games or it can help make your sites more secure. In Ruby, there are multiple ways to generate random numbers with various properties. Continue reading: http://www.blackbytes.info/2015/03/ruby-random/
Gem of the Week #11 - worldlite gem - lightweight public domain country data
Hello, over at the Planet Ruby the Gem of the Week series continues with #11 - worldlite that includes lightweight public domain country data - that is, all data gets included as good ol’ ruby code - no database, no dependencies, no copyright. Full article. Cheers.
DSLs in Ruby
This article is all about DSLs in Ruby, their concepts, blocks, and a full example of a simple HTML generator.
Generating Complex PDF Documents in Rails
I spent several months working on generating very large PDF documents using Prawn, and I learned a lot about keeping PDF code organized and maintainable. Learn about the recipe approach for structuring Prawn DSL using classes and modules.