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.
New Truemail 📨 web API client library for Ruby
New version of Truemail web API client has been released :rocket:: https://github.com/truemail-rb/truemail-ruby-client
tty-prompt v0.22.0 release with many new features
The latest tty-prompt release packs many new features that further enhance prompting users for input. Conversion of input into Array or Hash objects, :quiet option to silence output and allow for dynamic menus, :show_help option to control help display (on_start/always/never), shortcuts for selecting of all/reverse choices in multi-select prompt and much more. Enjoy!
Installing Omnivore API in Ruby on Rails Application
Integrate Omnivore API in Ruby on Rails development to access every action and detail in PoS transactions. Here’s how to install Omnivore API in your Ruby on Rails project. https://www.botreetechnologies.com/blog/omnivore-api-ruby-rails
Integration Testing Best Practices (aka how to sleep at night)
In this video, I reflect back on 10-years of integration testing my Ruby on Rails app using rack-test and Selenium and distill what’s important in reducing brittleness, improving test speed, and getting the most bang for your testing buck: https://www.semicolonandsons.com/episode/integration-testing-best-practices
Introduce renderer module
Just published the fifth chapter of the API-only ruby on rails course: Introduce renderer module [more inside]
Anonfiles.rb
https://github.com/peterlamber/anonfiles.rb up & download images to anonfiles - the free anonymous (duh) filehoster
Blocks in ActiveRecord's where, a small post
https://dev.to/brunvez/a-take-on-empowering-activerecord-4iog ActiveRecord has limited power when it comes to complex queries, this is a proposal to improve the way we query for data
Defining gem dependencies in single file Ruby scripts
Bundler has an inline gemfile definition feature that lets you define gem dependencies in a single-file Ruby script. Read on to see how: [more inside]
Building a Toy Lexer in Ruby
Lexers are magical. They take your messy, hand-typed, human text, and convert it into a clean data structure that the computer can process. Every time you run a ruby program, use structured search or type in a date by hand, you’ll find a lexer hard at work. In this article, Alex Braha Stoll pulls back the curtain to show us how lexers work and how to implement one for a simple programming language. https://www.honeybadger.io/blog/building-lexer-ruby/
Modifying Ruby's StdLib with Gems
How to safely patch Ruby’s StdLib in Gems, how to avoid issues of combined Module#prepend & method aliasing, from other patches.
Traffic problems: Software vs. Daily life
Interesting similarities in impacts and solutions https://medium.com/p/709d75229b86?source=friends_link&sk=882126397b35b32895295b3e88c170f7
Custom directory for Webpacker in Rails apps
It is possible to use custom directory for #Webpacker code instead of the default app/javascript
🤟🏻 [more inside]
Sharing Code with Ruby and Rails
Ruby and Rails provide many ways to share code between objects. If you’re new to Ruby or Rails, or don’t work in them often, it can be hard to remember what each one does. Despite this, each of these tools serves a different purpose in a Ruby system’s architecture; understanding when to choose one over another can make your code more readable and maintainable. [more inside]
System of a test: Proper browser testing in Ruby on Rails
An ultimate Ruby on Rails browser testing setup for 2020. Vladimir Dementyev from Evil Martians, author of AnyCable, TestProf, and Action Policy, distills years of testing experience into this easy-to-adopt practical guide.
Rails 6.1 adds support for where with a comparison operator
https://blog.bigbinary.com/2020/07/14/rails-6-1-adds-support-for-where-with-comparison-operator.html
How to control the enqueuing speed of Sidekiq jobs and their concurrency
How to control the enqueuing speed of Sidekiq jobs and their concurrency using Redis and BLPOP https://minhajuddin.com/2020/07/13/how-to-control-enqueuing-speed-of-sidekiq-jobs-and-their-execution-concurrency/
EBNF 2.1.0 now supports ABNF and ISO/IEC 14977
Release 2.1.0 of the EBNF gem now parses W3C EBNF, ISO/IEC 14977 EBNF, and IETF ABNF grammars. This can be used to validate and format grammars expressed in these notations, perform limited transliterations between formats, and generate PEG/Packrat and LL(1) parsers. [more inside]
Using Action Mailbox in Rails 6 to Receive Mail
A “mostly real-life” tutorial on using ActionMailbox to receive and parse incoming mail. [more inside]
Two Factor Authentication using Devise gem in Rails 6 Application
Ruby on Rails application can allow users to login using a mobile number through the devise RubyGem. - https://www.botreetechnologies.com/blog/devise-gem-authentication-login-using-mobile-number-in-ruby-on-rails-app
Class instantiation behind the scene
In the Object-Oriented Programming (OOP) paradigm, a class is a blueprint when an object is the in-memory representation of this blueprint. https://www.rubycademy.com/screencasts/18
Pragmatic Rails Testing
I’ve been writing tests for Rails apps for over 5 years. I’ve come to a conclusion that well-written test suite makes developer more productive in the long term. The idea is to strike an optimal balance between not testing at all and writing zillions of tests. But where is this sweet spot? [more inside]