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.
Maintaining a consistent coding style across projects with house_style
When using RuboCop, maintaining a consistent style across multiple projects can be a chore if you manage the configuration yourself. house_style is our solution. Read about the thinking behind it, and how we set it up within each application, on our blog post: [more inside]
The journey to Rails and TDD
TDD is a great technique, but may leave you uncertain what exactly to do with the Refactor phase [more inside]
Doorkeeper Sequel ORM extension
doorkeeper-sequel gem provides Doorkeeper 4.0 (Ruby on Rails OAuth2 provider) support to Sequel database toolkit.
Procs and Lambdas: Closures in Ruby
Check out the latest post at the “Zen Ruby” blog: Procs and Lambdas: Closures in Ruby.
BrainRuby - Maximally Obfuscated Ruby
This totally useless, but fun, hack to allow you to write any Ruby code using just 10 non-alphanumeric characters. Check out the repo and/or watch the explanatory video.
Reading Rails - HTTP DELETEs With a Link
Links are normally always performed as HTTP GETs, but with a little magic Rails lets you do DELETEs, POSTs, PUTs, etc. We’re going read some source code and see how Rails, Rail-UJS, and Rack all work in concert to provide this functionality. Even if you don’t give a damn, I’ll bet you’ll learn something neat.
Ruby meets Creativity at TRIC
Have you taken a look at the winning submissions of the last two Transcendental Ruby Imbroglio Contests? It is astonishing: 1st edition, 2nd edition!
Ruby Tricks
Ruby Tricks, Idiomatic Ruby, Refactorings and Best Practices. [more inside]
Docker: Running a Rails App Container with PostgreSQL Service
In this 13 minute episode we show you how to run a rails app using docker and connect it to a postgresql service. We cover how to work with environment variables and how to configure your database to work when running your app with docker.
New Framework built on Sinatra
Check out http://padrinorb.com/ for an this new awesome framework I found a couple of days ago!
How to Test Rails Models with RSpec
A tutorial that teaches you how to test your Rails models using RSpec and the Behaviour-driven Development approach. https://semaphoreci.com/community/tutorials/how-to-test-rails-models-with-rspec
New validation syntax for Hanami
Hanami will introduce a new syntax for validations based on predicates. It features builtin and custom predicates, type safety, specific coercions for HTTP params, whitelisting, custom error messages with optional i18n support. This release will start a new alliance between Hanami and dry-rb. http://hanamirb.org/blog/2016/05/16/validations-predicates.html
Sending Web Push notifications from Rails
Web Push is a new JavaScript API that allows you to engage with your users even when they’re not on your site. Here’s a look at how to set up a Rails application to deliver Web Push notifications https://rossta.net/blog/web-push-notifications-from-rails.html
[Screencast] Infinite Scrolling
Infinite scrolling is now a common feature and there are several cases where it is really useful. For instance there are some websites where we simply can’t imagine a good pagination system, like Twitter or even Facebook. https://www.driftingruby.com/episodes/infinite-scrolling
A Sinatra Mock Server
A lightweight Sinatra application that can be set up as a mock server to respond to API end points which respond to HTTP verbs. No need to program mocks using a language specific implementation for testing. Easy to use user interface to maintain mocks. Just supply a URL along with the HTTP headers and return codes along with the response body to set up a mock response. Can be used for manual testing and automation testing of client applications. Further details can be found at. https://github.com/mvemjsun/mock_server .
Sample telegram bot on rails
With sessions and support for contextual messages. Built with telegram-bot gem. https://github.com/telegram-bot-rb/telegram_bot_app
How to conservatively update a single gem with bundler
A quick exploration on how bump a single gem, excluding its dependencies and not relying on bundle update –source, which isn’t reliable: https://christoph.luppri.ch/articles/2016/05/14/how-to-conservatively-update-a-single-gem-with-bundler/
Writing Ruby gem in Rust
How to pass complex data structures and build native library on gem install. Plus an example gem. http://undefined-reference.org/2016/05/14/writing-rubygem-in-rust.html