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.
Going HTTPS-only with Let's Encrypt
I wrote a brief call to action about using Let’s Encrypt to take Rails apps HTTPS-only, along with a couple of things to watch for along the way. Be ready for security changes coming in Chrome!
perform backups on remote servers
Backup-remote gem extends Backup gem to perform backups on remote servers. https://github.com/maxivak/backup-remote
[Screencast] Security and Static Code Analyzers
Whether you’re preparing for a third-party security scan or already doing peer code reviews, you should always run brakeman scanner on your application to identify potential security vulnerabilities. https://www.driftingruby.com/episodes/security-and-static-code-analyzers
Terjira, very interactive and easy to use cli tool for Jira
Terjira is an interactive and easy to use command line interface (or Application) for Jira. You do not need to remember the resource key or id. Terjira suggests it with an interactive prompt. [more inside]
Save The Dates: 11 Top International Ruby on Rails Conferences and Events 2017
http://www.bacancytechnology.com/blog/11-top-ruby-on-rails-conferences-2017
tty-cursor v0.4.0
tty-cursor fixes clearing terminal lines and adds new api calls such as clear_char, column(n), row(n), clear_line_before, clear_line_after. Enjoy!
Has many through polymorphic associations with ActiveRecord
I ran into a situation recently where I wanted to use a has_many through polymorphic relation
(think has_many :commenters, through: :comments, where a ‘commenter’ could be a User or a Robot) That, surprisingly, isn’t currently possible with ActiveRecord, so I made the polymorph gem to support it!
Using Daru (Data Analysis in RUby)
At my job, I started work on a client project that was rather number intensive. We were going to have to perform repetitive calculations over a dataset. A colleague introduced me to the concept of data frames and the Ruby gem Daru. Here’s a look at some cool stuff you can do with Daru.
An alternative to eval
Eval is evil due to many reasons. But sometimes we can avoid it by using procs and changing their environment context!
A mock server in Ruby
After the initial release of the mock server many months ago, I have now a stable version available for open use, with improved documentation and some test coverage. The server makes it easy to set up mock data for ReST endpoints to aid the testing of client applications (API consumers). Set up mock once and use across multiple clients that may have been implemented in different codebases and technologies. Can be used for both manual and automation testing. The server is based on Sinatra and backed by sqlite. https://github.com/mvemjsun/mock_server
Adding custom types to your ActiveRecord models with the Attributes API
A brief look at the Attributes API and how to define custom types that can be used in your ActiveRecord models: https://christoph.luppri.ch/articles/2017/01/07/adding-custom-types-to-your-activerecord-models-with-the-attributes-api/
Rails5 and CarrierWave
Step by step guide to implement file uploading with the CarrierWave gem https://medium.com/@mauddev/rails-5-and-carrierwave-53960ec20c4b#.a5cdc4l6r
rails_or gem released!
rails_or is a gem that Support && Add syntax sugar to #or query method in Rails 3, 4, 5. Usage: [more inside]
RealCodez: Gems Missing in Bundle Outdated, Part 3
In the latest screencast, we wrap up a PR that refactors and adds tests to contributor’s PR to fix a bug in Bundler 1.13. See all our screencasts and clips here.
Prototyping tabletop games with Squib
Squib is a Ruby DSL for prototyping tabletop games, used by hobbyist and professional game designers. We’ve just released v0.13, and we have a bunch of new tutorials walking you through it, as well as several of our own big-box and card games. Cheers!
Ruby Exception Handling - Primer for Dealing with Errors in Ruby
Whether you’ve been programming in Ruby for years or you’re a complete beginner, tracking down errors in your Ruby app is easier than you think. We walk through some basic ruby and rails error handling, and various ways you can automatically log and report your exceptions.
Optimal way of processing large files in Ruby
Few ways of processing large files in Ruby: [more inside]
Rails Security Checklist
Rails security checklist is working to become a community-driven resource to help security-minded developers. If you’re interested in this kind of thing please join in: https://github.com/eliotsykes/rails-security-checklist
Language (flash) Card game 'language_cards' released! via @6ftdan
Command line game for learning languages in flash card style is here! Full internationalization and auto-import YAML card sets for adding your own flash cards. Currently implemented is Romaji to Hiragana & Katakana for learning Japanese. See the project at danielpclark/language_cards or simply “gem install language_cards”. You can contribute to the language files without any Ruby knowledge, but Ruby devs are most welcome!
Coverband 1.5 release, adds code usage density
This feature request has been 3 years in the making… Coverband originally supported production code LOC usage, but with various performance improvements it can finally support production LOC hit count. Find dead code and little used code on production.
Safe monkeypatching
Ruby is the language of monkey patching. It’s almost impossible to avoid it in a huge Rails app. And still, there are good and bad ways to add a monkey patch. [more inside]
Common Rails Idioms that Kill Database Performance
Many of the most common ActiveRecord idioms produce SQL which doesn’t scale well as your dataset gets larger. In this article I discuss three of the worst offenders and offer work-arounds. http://blog.honeybadger.io/common-rails-idioms-that-kill-database-performance/
Invisible Captcha - New release with Rails 5 support
New patch release - Invisible Captcha v0.9.2: a simple and flexible spam protection solution for Rails applications, based on honeypots. Link: https://github.com/markets/invisible_captcha [more inside]
Ruby: Stream processing of shell command results
Executing a shell command and then processing results can be an overkill for both performance and memory. Here’s one of the alternative solutions for executing and processing shell command results in a stream.