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.
Looking for a Ruby Medium API client?
I was looking for a Ruby Medium API client but wasn’t convinced by the existing options so I wrote my own.
Ruby Returns Incorrect Integer Or Decimal Places When Dividing Two Numbers
An article on the quirks of Integer, Float, and Decimal math in Ruby and why Decimals are important. https://solidfoundationwebdev.com/blog/posts/ruby-returns-incorrect-integer-or-decimal-places-when-dividing-two-numbers
How to Test Rails Models with Minitest
Learn how to test the main aspects of Ruby on Rails models with the Minitest testing suite. https://semaphoreci.com/community/tutorials/how-to-test-rails-models-with-minitest
Read Along With Ruby Book Club
Ruby Book Club is a weekly podcast for people who like to read Ruby and OOP books. In April, May and July they read “Confident Ruby” by Avdi Grimm (find it in the archives), now they’ve started the brand new http://99bottlesbook.com/ by Sandi Metz and Katrina Owen. I’ve read along from the beginning and enjoyed the regular reading schedule, the discussions and the fun - and I’ve got much more out of the books than on my own. Want to join in? Find it at http://rubybookclub.com
Build Your Own Web Server
Have your ever built your own web server? It’s not that hard, you can learn how to do it (using Ruby) in this post! http://www.blackbytes.info/2016/08/build-your-own-web-server/
Bundling dependencies inside Ruby gems
Here is a new article about how (and why) I now include all of Brakeman’s dependencies inside of the main “brakeman” gem.
Why is URI.join so counterintuitive?
I recently found myself using URI.join to construct certain some redirect URLs. But I quickly ran into a problem. URI.join wasn’t behaving like I expected. In this post we trace the unexpected behavior through the source of URI.join and back to the original RFC. - http://blog.honeybadger.io/why-is-uri-join-so-counterintuitive/
Testing Your Rails Admin Authentication
You’ll write 2 very simple tests to ensure only admins can access your admin area.
Care About What You Build
I wrote a new article on Caring About What You Build. Hope you enjoy!
Stay Static Showcase Update #3 - New Static Site Samples Incl. Nanoc
Inspired by the TodoMVC showcase I’ve started to put together a static (web)site builder / generator showcase named Stay Static. The idea is helping you find your static (web)site builder / generator that works best for you (e.g. Jekyll, Middleman or Webgen?) The latest new static site sample (in Ruby) includes Nanoc plus (source). ++ The standard sample showcases 1) pages 2) post and 3) custom content types (e.g. bookmarks ‘n’ links). Is your static (web)site builder / generator missing? New sample static sites welcome. Cheers. ++ PS: Interested in Static Site News? Follow along the Static Times on twitter @statictimes.
IT Recruitment Code of Conduct
Hi everyone, I’ve created new Github organisation and project it-recruitment-code-of-conduct\/it-recruitment-code-of-conduct that I’m hoping will evolve into community driven guide for recruiters to follow (even if only 1 recruiter ever read it ! :) ) and resource to reference to unprofessional IT recruiters. Can you please contribute with some of your own points ? https://github.com/it-recruitment-code-of-conduct/it-recruitment-code-of-conduct Thank you.
Is Rails Secure?
Here’s an article I wrote exploring some different security aspects of web development and how Rails has your back. Covering CSRF, XSS, SQL injection, param injection.
Of an ancient Rails plugin
This story dates back to a time when Rails extensions were called “plugins”, and they were installed using subversion. Read the full post.
Run Rails migrations automatically on Heroku
Heroku has a beta feature called release phase that allows you to run commands automatically when you deploy your app. The most use case for Rails developers to is automatically run database migrations on deploy. Here’s a walkthrough
Rspec: Writing Custom Matchers (for newbies)
Learn how to create a custom matcher for your specs, avoiding duplicated code and adding more meaning to your specs. Check it here
Multi-Device native notifications using service workers and Ruby on Rails
Our latest blog post talks about the development of our demo app sending multiple native notifications using service workers in Ruby on Rails. You can read the writings on the blog, and will also find the links to a full anonymous demo and Github source code.
[Screencast] DRY up your Javascript
Learn how avoid duplicate code to reuse existing javascript. https://www.driftingruby.com/episodes/dry-up-your-javascript
RSpec::Expectations Cheat Sheet
Continuing the from the previous post, here is a cheat sheet for RSpec’s assertion library: RSpec::Expectations.
Trip: a real time concurrent tracer for Ruby.
Trip is a real time concurrent tracer for Ruby. It yields control between two threads, usually the main thread and a thread that Trip creates.
Datamuse Rhyming Dictionary Client 0.1.0 Released
I’ve released my first pass a Ruby client for Datamuse’s API. See the gem on github and rubygems. [more inside]
Referrer v1.0.0 released
Referrer tracks sources with which users visit your site, converts them into utm markup, computes priority of these sources and provides linking for sources with tracked model’s records (orders/requests/etc).
tty-spinner v0.4.0 release
tty-spinner introduces small api changes to allow for automatic spinning with auto_spin and restarting spinner instance with start. Enjoy!