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.
Ruby Push Notifications
Hey there guys. Anyone using Ruby to send iOS and/or Android Push notifications? Having any issues. Try this gem and let me know your thoughts please!
Customize Devise to support Multitenancy authentication
I created a blog to talk about how to customise Devise to support Multi-tenancy authentication. Enjoy!
Interrobang
Interrobang: convert your predicate_methods? into bang_methods! without abusing method_missing. There’s also a nifty aside in the README about testing rescue handlers. Also, did you know that method? and method! were lifted from Scheme?
Verse 0.4.0 release
In this version of verse you can truncate, wrap, pad and align content with ANSI codes. Enjoy!
Code examples of Ruby Patterns
Here https://github.com/TheBlasfem/ruby-patterns i’m sharing examples about ruby patterns, learned following the course https://code.tutsplus.com/courses/design-patterns-in-ruby
Composable validations
TL;DR: In this post I will try to show why understanding multiple programming paradigms is useful and important (and also fun!). This post tackles the common problem of aggregating validation results in a comprehensible return value. The problem we solve here is almost the same as the one solved by ActiveRecord’s errors. Read more
Learn about the Caesar cipher
Want to learn how to write your very own Caesar cipher encoder? Have a read :)
How to display the source of a Ruby method
You might know this feature from pry, but know it is also available outside pry via the code gem.
Work Flow and Making Progress
Points I’ve learned about getting things done with programming.
Making Big Changes Safely
I’d like to take you back 12 months ago. My story starts with my team beginning a 3-month project to add a new feature. My team is Task Force 1. We have 4 developers. The feature is called “Custom Inventory Statuses.” Read more
Gem of Week #13 - props gem - yet another config (INI) reader in Ruby
Hello, over at the Planet Ruby the Gem of the Week series continues with #13 - props - yet another config (INI) reader - that lets you read in configuration settings in the Windows-inspired INI format and lets you link up settings in hashes in a lookup hierarchy and so on. Full article. Cheers.
gem install abstract_class
The abstract class pattern implemented in Ruby: https://github.com/shuber/abstract_class Read more
SOLID Review: Interface Segregation Principle
My take on the Interface Segregation Principle in Ruby. Using Ruby modules, we can see the important role cohesive “interfaces” play, even in duck-typed languages. This leads to less coupling and more readable code.
Exceptions should not be expected – stop using them for control flow
If your exceptions aren’t exceptions but expectations, you’re doing it wrong. Raising (failing) and rescuing errors might look as a good idea but it isn’t. Read the article to find out why.
2 more ways to monetize open source software
I’ve already written about how to monetize open source software using educational materials and hosting. Today’s article is about monetizing open source software using paid support services and providing value-added enhancements. Read the article to find out how others are successfully doing it.
5 ways of forwarding your work to some other object in Ruby
How often do you need to delegate methods in Ruby? Do you remember the API to do that? How many ways are out there to do it? Find the answers:
Event Store's pagination
Stream pagination in Greg’s Event Store
Pi 4 ways with Ruby
I recorded this a couple of weeks ago, based on examples I showed my high school class on how to calculate the value of pi. This shows 4 different algorithms for calculating pi in Ruby. There is an accompanying github project so you can run all the code yourself. Read more
Different Collection Types in Ruby
A basic overview of collection types available to you in Ruby.
Display information about a method's parameters
The debugging gem has reached 1.1.0 and now includes a howtocall method: def function(a, b=1, c: 2, d:,&e) end Read more
gem install sub_diff
Inspect the changes of your String#sub and String#gsub replacements: https://github.com/shuber/sub_diff
Rubyists - are you doing ETL unknowingly?
I just launched a new blog where I’ll share recipes and patterns to process data with Ruby. Read more
Work on exercism.io together with Katrina Owen at ROSS Conf
ROSS Conf Vienna is a one day mini-conference bringing Open Source Software maintainers and developers together in one room. The projects participating in its first edition include exercism.io from Katrina Owen and RVM from Michal Papis. In the morning bit the project owners will introduce their projects and share what would need work in the afternoon hackathon-y part. Access is free, we ask for a deposit that you’ll get back upon attendance. Read more