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.
[Screencast] How to Get started with React and Rails using the react-rails gem
A little video guidance to compliment the react-rails gem.
Artichoke Ruby made with rust - Try ruby in your browser running a WebAssembly build
Hello, I’ve added Artichoke Ruby to the Awesome Rubies (collection) page. What’s Artichoke Ruby? It’s a new upcoming ruby made in rust by Ryan Lopopolo et al. You can try Artichoke in your browser. Yes, the Artichoke playground runs a WebAssembly build of Artichoke. Congrats to Ryan Lopopolo for the inspiring code. What’s your take? Cheers. Prost.
What if I called FLUSHALL on your Redis instance? 😱
A story about safeguarding Redis clients and servers. https://www.honeybadger.io/blog/safeguarding-redis/
[Screencast] Working with Large Data
When database tables get large, things can slow down significantly. In this episode, we look at a few things which helps keep databases performant and the client side responsive. https://www.driftingruby.com/episodes/working-with-large-data
Don’t change the signature of Sidekiq jobs running in production
You should not change the signature of a Sidekiq job which is running in production. By signature I mean: the arguments and the class name of the job. [more inside]
[Video] Using Ruby's Reduce method to create a Hash of "Banana Bunch" Arrays
Watch how to sort banana bunches into fruit Baskets (Boxes) and take advantage of Ruby’s reduce method to create a hash of sorted data.
Football Data Wrangling w/ Ruby - Match 1500+ Football Club Names from 100+ Leagues
Hello, I’ve put together a short football data wrangling w/ ruby sample that lets you match 1500+ football club names from around the world using the sportdb gem / library and open football.db (public domain) datasets. Enjoy the beautiful game. Cheers. Prost.
Context Binding in Ruby (2mn)
In this article we’re going to explore the following topics:
7 Ways to Selectively Run RSpec Tests
By explicitly picking out tests at will to run, we can develop faster! https://emmanuelhayford.com/7-ways-to-selectively-run-rspec-tests/
New validation added: aspect ratio for your ActiveStorage files + support for Rails 6
If you need to add aspect ratio validation like validates :photo, aspect_ratio: :landspace (or :is_16_9, :square, etc) for your ActiveStorage files: [more inside]
Slack Smart Bot. Run Ruby on Slack, create bots on demand and much more
https://github.com/MarioRuiz/slack-smart-bot Create a Slack bot that is smart and so easy to expand, create new bots on demand, run ruby code on chat, create shortcuts… The main scope of this gem is to be used internally in the company so teams can create team channels with their own bot to help them on their daily work, almost everything is suitable to be automated!! slack-smart-bot can create bots on demand, create shortcuts, run ruby code… just on a chat channel. You can access it just from your mobile phone if you want and run those tests you forgot to run, get the results, restart a server… no limits.
easy change user in your RoR App
https://github.com/igorkasyanchuk/any_login just got support for Rails 6 apps. Thanks for @saiqulhaq
Keep It Simple: How to deal with Code Complexity
How to deal with code complexity and the KISS principle, with a real world Ruby example https://withatwist.dev/keep-it-simple-kiss.html
Removing conditionals with Array() and Array.wrap
Ruby and ActiveSupport have two handy options for casting objects into arrays which helps guarantee your code is working with arrays and helps remove conditionals and simplify code. Learn how to use the Array() and Array.wrap methods in Ruby and ActiveSupport
How to build a Null Object library like Mimic
I saw the recent release of Mimic and decided to dive into the code to see how it was built. Learn how to build a tool to help with your projects
Lefthook: Fast, flexible, polyglot Git hooks manager
Read more about Lefthook, just out of Evil Martians’ foundries. The tool to manage all the Git hooks for your team in an environment-agnostic manner allows you to half your local and CI times linting/testing times, also comes as a Ruby gem, and works naturally with Bundler.
Sidekiq Batches: Tips & Tricks
In this Article Thaynã presents some tips and tricks when working with Sidekiq Batches: [more inside]
Introducing Affect - a new gem implementing algebraic effects in Ruby
Affect is a tiny Ruby gem providing a way to isolate and handle side-effects in your Ruby programs. It can make it easier to test your code, and provide a cleaner separation between your program logic and external entities such as I/O, databases, files etc. Affect is also useful for implementing dependency injection. Go read the docs.
Using logs to power up your Rails development workflow
A handy checklist to keep in mind when looking through your logs while developing a web application https://withatwist.dev/using-logs-to-power-up-your-rails-development-workflow.html
nice_hash creates hashes following patterns
NiceHash creates hashes following certain patterns so your testing will be much easier. Parse and filter JSON. You can easily generate all the hashes you want following the criteria you specify. Many other features coming to Hash class like the methods ‘bury’ or select_key, access the keys like methods: my_hash.my_key.other_key. You will be able to generate thousands of different hashes just declaring one and test easily APIs based on JSON for example. Perfect to be used in test data factories https://github.com/MarioRuiz/nice_hash