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 scrap website metadata using LinkThumbnailer
Today I expose in this blog post how the description scoring works on LinkThumbnailer’s gem. The gem helps you scrap website metadata informations such as its title, description, images and even embedded videos. But the value of LinkThumbnailer’s gem is its ability to return the best possible description about the website.
tty-pager v0.2.0 release
New tty-pager comes with rewritten system pager to correctly callout to other processes. Give it a try.
Example of Interpreter Pattern
I’ve added an example for the Interpreter Pattern. Also, this repo englobes many more examples from Ruby Patterns. Hope you find it useful!
Disposable – The Missing API of ActiveRecord
Disposable gives you Twins. Twins are non-persistent domain objects that allow you to model object graphs that reflect your domain, not your database schema.
How I resolved confusing tests and production code
Pair Ranking is very well defined problem solving technique. When my code become convoluted I had to switch my perspective to that of the user to improve the code and the tests. Read more about it here: TDD Beyond Basics : Outside In Perspective . This also shows you an example of how you could use this gem.
Rails Assets Makes Using Fronted Libraries Easy
Rails Assets will save you a bunch of time managing assets for frontend libraries in Rails. It automatically generates Rubygems for libraries like Bootstrap from the original git repositories using Bower.
How do you track down an obtuse error in your Rails app?
Last week I had to track down an obtuse error, I wrote about what helped me do it here.
Ruby on Rails Continuous Integration with Jenkins and Docker Compose
Ruby on Rails Continuous Integration with Jenkins and Docker Compose This is a step by step guide to setting up Jenkins to run builds with Docker Compose and report status to GitHub Pull Requests. We will show a Docker configuration for Ruby on Rails but it can be modified to run with whatever framework you prefer.
Aggregating data for OHLC stock charts
Aggregate data for OHLC (candle) stock charts with PostgreSQL using window functions for fun and profit.
awesome-webframeworks - A collection of Ruby webframeworks, libs etc. @ Planet Ruby
Hello, I’ve started (yet) another awesome list on Planet Ruby. The new awesome-webframeworks page collects Ruby web frameworks, libraries, tools, etc. Categories include: Rack, Rack Alternatives, Rails, Sinatra, Volt, JSON HTTP API Builder, Micro Framework Alternatives, Macro Framework Alternatives and so on. Anything missing? Contributions welcome. Cheers.
Opalist Newsletter - Issue #6
Opalist is an e-mail newsletter showcasing the latest news and tutorials in the Opal (Ruby-to-JS source compiler) ecosystem and front-end development. In our sixth issue, we cover Opal’s new Code of Conduct (CoC), how to use the opal-jquery gem, two screencasts on Opal and Volt (the latter being all about creating REST APIs), and WebAssembly.
Generate PDF Invoices from your Rails app in ~5mins using the Invoiced API
A post showing you how to build a “Minimum Viable API Client” using HTTParty and the free Invoice Generator API from Invoiced to create really nice invoices from your Rails app in record time. Read more
Decouple ActiveRecord callbacks with some Pub/Sub
I put together a blog post on how clean up your ActiveRecord callbacks using wisper a ruby gem that provides publish-subscribe capabilities to ruby objects.
Telegrammer released
I’ve just released telegrammer, a gem to interact with the new Telegram’s Bot API. All contributions and suggestions are welcome.
Ruby data processing: how to explode rows with multivalued attributes?
Here is a new Ruby ETL article in which you’ll see how to write then refactor ETL components that transform data like this: Read more
whatson gem - Use $ kickoff to list upcoming football tournaments on command line
Hello, For fun I’ve added yet another dataset to the whatson gem that lets you list upcoming football tournaments from around the world. Ever wonder how many days to the next World Cup? Just type in your shell: $ kickoff The command will fetch the football event calendar page (from the intertubes) and print out: NOW ON 18d Women's World Cup 2015, Sat-Sun Jun/6-Jul/5 (30d) @ Canada › World (FIFA); NOW ON 13d Copa América 2015, Thu-Sat Jun/11-Jul/4 (24d) @ Chile › South America (CONMEBOL); in 14d Gold Cup / Copa de Oro 2015, Tue-Sun Jul/7-26 (20d) @ United States+Canada › North America (CONCACAF); in 1087d World Cup 2018, Thu-Sun Jun/14-Jul/15 (32d) @ Russia › World (FIFA) ... and so on. Cheers.
Restore BUNDLED WITH section in Gemfile.lock from git repository
We should use latest Bundler, but sometimes we are afraid we have to use older/newer Bundler. RestoreBundledWith solves these conflicts. restore_bundled_with
Webinar Recording: Refactoring Rails Applications with RubyMine
Last week, together with JetBrains, we presented a webinar on using RubyMine with Rails apps in the context of refactoring. The recording is now available. Read more
HOWTO use form objects with Rails
HOWTO use form objects with Rails–a new guide I wrote showing you how to use form objects in your Rails application, useful for decoupling validation logic from models and reducing complexity.
mruby-r: Use (m)Ruby for returning data to R
I have just released a mruby gem called mruby-r. It provides a way to call a Ruby script from R, making it convenient for generating sets of data on-the-fly. Check it out!
Pair Ranking Gem Released
Select a single winner using votes that express preferences. This can also be used to create a sorted list of winners. rasam gem
Optimizing Full Text Search with Postgres tsvector Columns and Triggers
Improve the speed of Postgres full-text search by introducing a tsvector column to cache lexemes and using a trigger to keep the lexemes up-to-date.
Say no to chained ActiveRecord scopes!
Chaining ActiveRecord scopes outside their models resist change and testability. Fortunately, there’s an easy solution!