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.
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!
Pronto v0.7.0 released
Pronto keeps getting better at providing a quick automated code review of your changes. The biggest features of this release: [more inside]
RJGit gem 4.4.1.0 released
Version 4.4.1.0 of RJGit was just released on RubyGems. RJGit is a JRuby wrapper around the Java JGit library for manipulating Git repositories. RJGit wraps much of JGit’s core functionality; it has classes for all important Git objects, i.e., Repo, Blob, Tree, Commit, and Tag. It allows parsing and manipulation of these objects in an intuitive manner, and supports both bare en non-bare repositories. For example code, please refer to the project’s README.
Rake gem explained
Let’s see how we can better automate our tasks. Rake gem explained
A case for decorators in Rails
I didn’t believe in decorators (or really know what they were) until I needed them. Here’s the story
Beginners Video: Rails Project Directory
Each week I’m creating a new video for beginners with help from Daniel Kehoe, the author of Learn Ruby on Rails. This week the free video from Fullstack Videos is an introduction to the Rails Project Directory.
Using RSpec Nested Transactions to speed up tests touching the database
This article explains how to speed up some tests touching the database by using nested transactions. Specially useful for those running Sequel and PostgreSQL (or other server supporting savepoints) and testing with RSpec as the rspec_nested_transactions gem I released a few hours ago would help a lot.
Cleaner preprocessing of data when parsing CSV files
Wrote a post about how to use converters to pre-process CSV data while importing: http://kgrz.io/ruby/2016/08/05/better-csv-preprocessing-in-ruby.html
Different ways how to do Rails validations contexts
In This Article we will have a look on how to enable different Rails validatorn on different scenarios. [more inside]
Meet larry, the pry plugin that keeps track of wall clock time.
Larry is a plugin for Pry. He keeps track of elapsed wall-clock time and tells you how long code or a Pry command you ran took to complete.
RubyMine 2016.2: Enhanced Support for Ruby, YAML, RSpec, and More
RubyMine 2016.2, the second update in the 2016 series of releases, is now ready to use. RubyMine team has focused on better code intelligence for Ruby, YAML, and RSpec. The 2016.2 also inherited all the new features and improvements from IntelliJ Platform, bringing better support for JavaScript and TypeScript, an enhanced UI, and improved VCS and database tools. Read more…
Advanced SQL in Rails - Part 1
Turbocharge your Rails workflow by taking advantage of advanced SQL, right from within Rails. In Part 1 I cover window functions and views; in Part 2 I’ll discuss how to nicely integrate those into your Rails app. Enjoy! [more inside]
The Minitest Dilemma
If you were to start a new open-source Ruby project today, what testing library would you choose: rspec or minitest? Perhaps you have a strong opinion on this topic and the answer is obvious. For me, it presents a dilemma. Read the post →