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.
First 10 minutes with Eventide-Autonomous Services and EventSourcing Toolkit for Ruby
Recently I find out about Eventide project and it looked really nice for me based on the initial documentation so I wanted have a small look inside. Here is what I found in a first few minutes without knowing anything about Eventide so far. [more inside]
... with __dir__ we can restore order in the Universe
This post about the method in Ruby Programming Language Kernel#__dir__ and restoring order in the Universe. https://bogdanvlviv.github.io/posts/ruby/with-__dir__-we-can-restore-order-in-the-universe.html
APIQ CMS Models extension 1.0 release
Not too much time passed since APIQ CMS 1.0 release - now announcing the most useful Models extension 1.0 release.
A Deep Dive into CSRF Protection in Rails
Recently I did a deep-dive into the Rails codebase to understand how the CSRF protection feature has been implemented. I look at how the CSRF tokens are initially generated for each response, and how they’re used on an incoming request to validate the authenticity of the request. [more inside]
Why it is just lazy to bad-mouth Ruby on Rails
I am getting too proficient in answering doomsday “Ruby on Rails is dead” articles. This is yet another one but with a different twist as I look back and with a bird’s eye view of the past decade and a half.
Tips on Treating Flakiness in your Rails Test Suite
Learn what are some common sources of flaky test behaviour in a Rails environment, as well as optimal ways to avoid them. http://semaphoreci.com/blog/2017/08/03/tips-on-treating-flakiness-in-your-test-suite.html
Ruby State Machine – AASM Tutorial with Sequel, SQLite, Rake and RSpec
Have you ever had a problem managing a record’s state change logic? Here comes AASM – a state machine for Ruby. [more inside]
The --profile hammer and RSpec
In this post I quickly highlight my new-favorite RSpec flag, --profile. Check it out if you haven’t used it before.
Elixir Envy ᐅ Ruby
There has been much envy in the Ruby community over Elixir having the pipe operator as can be witnessed by the many gems, code snippets, and blogs arising from it. This blog post lists and describes various implementations which have been made or written about it.
Elixir style pipe operator for Ruby
Rubyists can now enjoy a data pipeline operator similar to Elixir’s. Not really advised but certainly fun. https://github.com/hopsoft/pipe_envy
Event sourcing and autonomous (micro) services in Ruby
Microservices, Autonomous Services, Service-Oriented Architecture, and Event Sourcing Toolkit for Ruby with Support for Event Store and Postgres [more inside]
Unsupervised learning using k-means clustering in Ruby
The k-means clustering algorithm is a powerful unsupervised learning algorithm for clustering data. In this blog post I will show how to use the k-means algorithm in Ruby. I will walk through an example where I use the k-mean algorithm to divide California into a number of distribution territories, for my fictitious beer distribution business. You can read more here: http://www.practicalai.io/unsupervised-learning-using-k-means-clustering-in-ruby/
What if? Perpetual question cycles of responsible developers
We all love it when a plan comes together, yet let’s face it, 💩 happens… And we cannot decently just ignore it and turn a blind eye. Hopefully we thought about edge cases upfront… Read post on medium
Avoid exception for dup on Integer | BigBinary Blog
https://blog.bigbinary.com/2017/08/01/avoid-exceptions-for-dup-on-interger-and-similar-cases.html
The case study for The Last API Wrapper
This post shows why you probably should consider using “The Last API Wrapper” next time you need to get something from HTTP API. [more inside]
Orchparty lets you generate docker-compose files with a clean Ruby DSL
Write your own orchestration config with a Ruby DSL that allows you to have mixins, imports and variables. Find out more
Southeast Ruby Conference
Attend the inaugural year of Southeast Ruby in Nashville, TN October 5 & 6. Avdi Grimm, Kinsey Ann Durham, Ernie Miller, Ben Orenstein and more.
Sorting your Gemfile with ease using ordinare gem
Ordinare sorts gems in your Gemfile alphabetically, while taking care of gem groups and comments above gems. [more inside]
football.json - New 2017/18 Season - Free open public domain football data in JSON
Hello, I’ve updated the /football.json repo /service that offers (auto-)generated match schedules (fixtures and results) and club listings for the major football leagues e.g. English Premier League, Deutsche Bundesliga, Primera División, Italian Seria A, etc. See the 2017-18 season folder for (static) JSON examples. No API key required ;-) All data public domain. Enjoy the beautiful game. Cheers. PS: Ruby works great for generating JSON; see the json.rb script for the code.
[Screencast] Custom Error Pages with Slack Notification
Learn to use custom error pages to provide a similar look to your application. Get notified on Slack as errors occur to act on them before they’re reported. https://www.driftingruby.com/episodes/custom-error-pages-with-slack-notification
Tips to improve speed of your test suite
At Appaloosa, most of our tests are written with Rspec, but we still have a certain amount of legacy Test Unit tests. Our Rspec and Test-Unit suites take up to 10 minutes each, so a full test suite runs in around 20 minutes. That’s a lot. We recently decided to invest time on improving our tests to gain time when developing. https://medium.com/appaloosa-store-engineering/tips-to-improve-speed-of-your-test-suite-8418b485205c
Asynchronous Elasticsearch bulk reindexing with Rails, Searchkick and Sidekiq
This article describes how you can do asynchronous bulk reindexing for Elasticsearch with Searchkick and Sidekiq. https://medium.com/@vvangemert/asynchronous-elasticsearch-bulk-reindexing-with-rails-searchkick-and-sidekiq-26f2f9aa8513