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.
Tutorial: How to Build a CMS in Ruby on Rails
I’ll try to show you how to build a flexible, reusable CMS engine using various features offered by Ruby on Rails and Postgres. [more inside]
football.json - Free open public domain football data in JSON incl. Premier League...
Hello, I’ve put together a new repo, that is, /football.json that offers (auto-)generated match schedules (fixtures and results) and club listings for the major football leagues e.g. English Premier League, Deutsche Bundesliga, Italian Seria A, etc. See the 2015-16 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.
Ruby 2.2.2 Array Basics : Part 3
Ruby 2.2.2 array methods such as equal?, try_convert and []. Watch it here: here
Building a Ruby on Rails App Part 3: Importing book details from Amazon
The third instalment of our Building a Ruby on Rails series is now out. It was really interesting to fetch the book details from this vast API that is Amazon AWS using the amazon-ecs gem. We also used rmagick to fetch the book cover image from Amazon, resize it and store locally.
5 ways APIs drive business value
In the previous lesson of Build Less, But Better Software email course, we concluded that your software businesses should start with private APIs then pivot to partner and public APIs when you’re confident with your ability to keep supporting the API. In lesson 4, we’ll look at 5 ways APIs drive business value.
Deploy Your Rails to OpenShift
OpenShift is Red Hat’s Platform-as-a-Service (PaaS) that allows developers to quickly develop, host, and scale applications in a cloud environment, deploying your rails app to openshift is pretty easy.
Decontaminator - Oga-based HTML sanitizer
Altmetric open sourced a Ruby gem for sanitizing HTML inputs, which is based on the excellent Oga XML/HTML parser: https://github.com/altmetric/decontaminator
flexmock revival: flexmock 2.0 has been released !
Flexmock 2.0 has been released. Taking maintainership of a high-profile gem is a new thing for me …
EnumizeMongoid - The enum gem for Mongoid you've been waiting for
We felt that the existing enum gems for Mongoid were not good for us, so we’ve decided to implement our own. It does not do everything for you (no scopes, needs creation of enum type classes) but what it does is easy to use, very flexible, and consistent. Released to public as of today - EnumizeMongoid
Safe enums in Ruby
We’ve created a library which solves enum’s problem in Ruby for our project. The main idea of the library is to have safe enum values everywhere: in object attributes, direct values access and etc. I would appreciate to hear your feedback about it. Thanks!
fedux.org – A "proxy.pac" is your friend if you're a proxy-administrator
You can find quite a few IT infrastructures where an HTTP proxy is used to secure the access to the “World Wide Web” (WWW). In smaller company environments you can configure the proxy for each workstation manually. In larger environments you normally use a so called “proxy.pac” for this. This article gives you an introduction to “proxy.pac”-files.
Ruby Interview Questions : Include vs Extend
What is the difference between include and extend? How to implement extend with include? Watch the video here: Include and Extend
Commands, Services and Logic: An Action-Based Class Design for Non-Trivial Rails Apps
A great talk about class design for cleaner Rails [more inside]
awesome-rails-gem
A collection of awesome Ruby Gems for Rails development. [more inside]
3 steps to fix encoding problems in Ruby
You only really think about a string’s encoding when it breaks. When you check your exception tracker and see Encoding::InvalidByteSequenceError: "\xFE" on UTF-8
staring you in the face. When you have a bad encoding, how do you figure out what broke? And how can you fix it?
StackProf: The Holy Grail of Rails Application Profiling
Profiling Rails Applications in the past has been tricky, and running a profiler in Production has been a pipe dream - until StackProf. In StackProf: The Holy Grail of Rails Application Profiling, I walk thru the basic steps of setting up StackProf, interpreting the results and how to peer thru some of the noise StackProf generates.
What exactly are transactional emails?
In the first lesson of Sending Transactional Emails From Rails, we clarify the definition of transactional emails and why they are important to software/ecommerce businesses.
Cleaning up a feature spec
Writing fully integrated tests can be a point of contention testing, especially when it comes to writing Capybara test that need to wait JavaScript to load items. [more inside]
13 software design articles for 13 weeks of practice
A friend had asked me for recommendations for Practicing Ruby articles related to software design, so here is a big list of them. Enjoy!
5 Best Ruby on Rails Content Management Systems (CMS)
Content Management System or CMS is a tool to create, edit, and store content in a convenient way enabling even non-technical user to add new information, products and services with speed and ease. Read our article : 5 Best Ruby on Rails Content Management Systems
Rails Interactor Pattern - Part 1
The other day I was working on a Rails application that did some communication with the Mailgun API. I soon discovered that I wanted to have not only the hard work of calling the API done in my interactor pattern, but also make the decision if the call was successful or not. Read on here
date_period_parser
date_period_parser gem parses period string parameters like "2014-Q3", "ytd", "current-month" and returns start/end DateTime objects. Useful for filtering records in reports or search results.
Ruby 2.2.3 String Basics : Ruby Silent Cast Part 9
Ruby 2.2.3 string basics start_with?, strip and sub. Watch it here
N-gram Analysis for Fun and Profit
Break text into ngrams to find patterns & use with NLP algorithms http://www.blackbytes.info/2015/09/ngram-analysis-ruby/
All looking rather Dashing
We love metrics, especially metrics that let us know how our applications are doing, so we recently spent a day experimenting with various dashboard solutions, until we found that Dashing was exactly what we were looking for: https://www.madetech.com/blog/all-looking-rather-dashing