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.
Put your tests to good use, Refactor with confidence
Testing your code well is hard, and it can be easy to neglect. You’ll be glad you didn’t though when you have to change the implementation of a feature without your users noticing anything, except maybe a performance bump. Let’s go through how we can use and modify existing tests to allow a change in code that you can be confident will work when you get to production. https://chrisherring.co/posts/put-your-tests-to-good-use-refactor-with-confidence
DotenvSekrets gem
I’ve just released a new gem named DotenvSekrets that joins the power of dotenv and sekrets in order to allow encrypted env files. [more inside]
Find Unused DB columns with paper_trail
I have been looking for methods to detect inactive fields in our DB, this is the first quick method I came up with.
Exploring Handlebars JS features !
Lets explore some Handlebars JS features ! [more inside]
Measuring rails routes test coverage
In a big project 100% code coverage is too expensive (if even possible). But there’re times you want to make sure that at least all your important routes are hit by the test suite. routes_coverage gem generates nice html simplecov-style reports on that.
Everything you should know about Ruby Splats
https://alexcastano.com/everything-about-ruby-splats/ Even though splats in Ruby are common, there are some complex edge cases that can be misleading. Let’s see them together.
How we build JSON APIs with Rails
A couple of months ago, we started a new project and decided to use Ember on the front and Rails as an API backend. Early in development, we found ourselves repeating similar code in multiple places in our controllers, so we decided to roll our own solution to the problem. Check out our blog post for more details.
Semaphore Boosters - automatic parallel testing for Ruby projects
Semaphore Boosters automatically parallelizes tests in large Ruby projects and cuts test suite runtime down to a few minutes.
Practical Graph Theory in Ruby
Learn how to use the power of graphs to solve interesting problems! http://www.blackbytes.info/2017/05/graph-theory-in-ruby/
How I teach web development with Rails
I’ve been teaching Ruby, Rails and Web Development for 3 years now. Today I want to share what I have learned.
Squasher is Rails 5.1 ready now
From now squasher is now longer a blocker which stops you from upgrade to the latest version of Rails
Ruby gem for managing proxies
proxy_fetcher gem can help your Ruby application to fetch free proxy lists from the HideMyAss service, validate them, and use for making some HTTP(S) requests.
Updates for liblinear-ruby
liblinear-ruby has recently been updated! [more inside]
[Screencast] Bootstrap Framework and Ruby on Rails
Using Bootstrap in your application has become much more simple. Also learn to create some helper methods to make working with Bootstrap much easier. https://www.driftingruby.com/episodes/bootstrap-framework-and-ruby-on-rails
Why you shouldn't use the System Ruby
Your *nix computer will ship with a version of Ruby, and this seems great, you can get up and going right away and writing code. Things though are not all as they seem, you shouldn’t use that Ruby. https://chrisherring.co/posts/why-you-shouldn-t-use-the-system-ruby
5 Pry Features Every Ruby Developer Should Know
Pry is a great resource for debugging and exploring code: https://blog.cognitohq.com/five-pry-features-every-ruby-developer-should-know/ [more inside]
[S]OLID - Single Responsibility Principle by example
Example of refactoring by following Single Responsibility Principle: http://rubyblog.pro/2017/05/solid-single-responsibility-principle-by-example
Added new JSON Feed (@jsonfeed) format to the (universal) feedparser gem
Hello, I’ve added support for reading feeds in the new JSON Feed format in - surprise, surprise - JSON to the universal feedparser gem. Nothing changes if you read in feeds in xml or json ;-) Use it like: [more inside]
The Ruby Module Builder Pattern
Did you know that Ruby has configurable modules? Just subclass the Module class, dynamically define some methods in an initializer, and include an instance of the resulting module in another class. I call this thing a “Module Builder” and I just wrote a long blog post explaining what it’s all about. Ruby’s had this secret up its sleeve for all these years, and most of us never knew about it.
Tip: Add JSON Feed (@jsonfeed) to your Jekyll (static) website / blog
Hello, A Quick Jekyll (Static) Website Tip: Add JSON Feed to your site. Step 1: Copy the feed.json template file. That’s it ;-) Source: vienna-rb/new-blog/feed.json Live: feed.json – Learn more about JSON Feed in Parker Moore’s posting titled “Add JSON Feed to your Jekyll site”. Happy publishing with Jekyll n friends. Cheers.
Red Arrow: Apache Arrow for Ruby
Ruby gets soon the data interoperability based on Apache Arrow. [more inside]
What if we organized code by features?
Digging through lots of code to figure out how a feature worked frustrated me on a large Rails project. I wrote about how I asked myself this question and what I did about it at https://www.saturnflyer.com/blog/2017/5/17/what-if-we-organized-code-by-features