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.
How to take over a Ruby gem and what to do with it
Using Ruby gems is safe, right? We’re a nice community of friendly beings that act towards the same goal: making Ruby better. But is that true? Can we just blindly use libraries, without making sure, that they are what they are supposed to be? During this talk, I’ve wanted to present how you can take over a gem, what you can do with it once you have it and what you can do to protect yourself against several types of attacks you’re exposed to on a daily basis. Let’s exploit the Ruby gems world, and its data together.
Lefthook, Crystalball, and git magic for smooth development experience
A new take on enhancing everyday development experience with git hooks. Learn how to not only prevent pushing bad code to the repo, but to also install new gems automatically and manage database migrations on every branch switch. [more inside]
Easy way to generate random strings following patterns
Generate strings supplying a simple pattern. Perfect to be used in test data factories. Validate if a text fulfills a specific pattern. Also you can use regular expressions (Regexp) to generate strings: /[a-z0-9]{2,5}\w+/.gen. Generate words in English or Spanish.
3 Awesome Ways To Use Ruby’s Gsub Method
Did you know that you can use regular expressions with gsub? Ok, maybe you know that, but how about using a regular expression AND a block? That’s when it starts to get interesting. Read this article for examples:
How to TDD when TDD is hard
Sometimes, test-driven development gets in the way, does more to confuse than guide, or generally just slows development to a monotonous crawl. Here’s a set of five go-to strategies I use to get out of test-fueled frustration, and back to productivity.
My experience upgrading Ruby on Rails from 3.2 to 4.2
I collected the experience and the lessons I learned during the process of upgrading Rails from 3.2 to 4.2 along with some undocumented changes and solutions for them. [more inside]
How to Store Secure Encrypted Data in Rails without using Gems
Storing sensitive data in plaintext can seriously harm your internet business if an attacker gets hold of the database. Encrypting data is also a GDPR friendly best practice. In this tutorial I will describe a simple way to securely encrypt, store, and decrypt data using built in Ruby on Rails helpers instead of external dependencies. [more inside]
strong_password gem hijacked
strong_password v0.0.7 contained an exploit: how it worked, and what you can do about it.
[Screencast] Introduction to Dragon Ruby
Dragon Ruby is toolchain that allows developers the ability to build apps and games in Ruby. Giveaway - Follow @driftingruby and retweet this to enter to win. Event will end by August 1st, 2019. https://www.driftingruby.com/episodes/introduction-to-dragon-ruby
ib_ruby_proxy
Invoke Interactive Brokers API from Ruby. Github repo
Save typing in rails/console with this 3 packs
User rails_console_toolkit to add super-fast shortcuts to fetch records, benchmark your code, reload!, and exit.
Read more in the README... [more inside]
12 Factor Rails Settings
This blogpost provides some clarifications on what it means to apply the 12-Factor App methodology for managing settings and how to properly use it in your Ruby on Rails application.
Data sync from DB to Gsheet
This article explains step by step procedure to sync your data between DB and Google Sheet [more inside]
GIS on Rails
This article explains the basics of GIS for a web developer and how we can import GIS data and query using PostGIS [more inside]
Deploy AnyCable with Capistrano and systemd
First of all, if you still don’t know what is AnyCable than probably you never tried websockets in Rails. “WTF???” you probably will say, and you are right. Yes, we have ActionCable since Rails 5.x, but you really believe Ruby is suitable for real time web? I have bad news for you. [more inside]
Active Admin vs Forest Admin comparison
A comprehensive guide for RoR devs looking for a ready-to-use admin panel solution to manage their data
nice_http make Http connections nice and powerful
NiceHttp – simplest library for accessing and testing HTTP and REST resources. Get http logs and statistics automatically. Use hashes on your requests. Access JSON even easier.
Automatically annotate your code with Sorbet type signatures
For example, run your test suite and magically get type signatures!
Deploying a Jekyll-based blog to Google Cloud Run
I recently migrated my Jekyll-based blog to Cloud Run, the new serverless platform from Google. I posted an article on why you might use serverless for a Jekyll site, and how to do the deployment. https://daniel-azuma.com/blog/2019/07/01/deploying-my-blog-to-google-cloud-run
In-App Payments Backend with Roda
This tutorial shows how to use Roda as the backend to take mobile payments with Square: