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.
Office.TXT - The Free Writer’s Command Line Tool Suite - $ gem install officetxt
Hello, I’ve put together the world’s 1st office suite in ruby ;-) Let’s welcome Office.TXT - The Free Writer’s Command Line Tool Suite. Use $ gem install officetxt to install the all-in-one office bundle. What’s included? For now journaltxt, jekyll, drjekyll, mrhyde, octopod, m2w, rougify, kramdown, quik, and more. Anything missing? Let us know. Cheers.
[Screencast] Benchmarking and Refactoring the content_for View Helper
In a recent blog post, we looked into the content_for view helper to render breadcrumbs. Once we got the feature working, it’s time to refactor the feature to lower technical debt. https://www.driftingruby.com/episodes/benchmarking-and-refactoring-the-content_for-view-helper
[Traim] Simplify and speed up your legacy Rails API
I designed a resource-oriented RESTful API micro framework. Here it is: https://github.com/travisliu/traim It is compatible with your legacy ActiveRecord models for easily turning them into JSON API. Designed for resource-oriented RESTful service without others per-request overhead makes it significantly faster than Rails-API
Scope the Monkey
Safer “monkey patching” with Ruby’s Refinements. https://blog.alex-miller.co/ruby/2017/07/22/scope-the-monkey.html
FileManipulator
FileManipulator can split a text formatted file into multiple files, and recover the original file by merging the splitted files. https://github.com/gipcompany/file_manipulator
tty-command v0.6.0 release
The newest tty-command provides new ways to redirect command input and output. You can easily redirect stdout to stderr in child process whilst preserving any output logging like so cmd.run('script...', :out => :err). Let me know what you think!
Statistics and Data Science for Rubyists
Resources for Data Science: https://github.com/arbox/data-science-with-ruby [more inside]
Hacking content_for to create a simple display helper
I was playing around on a side project and needed to dynamically generate breadcrumbs. However, I wanted a simple and unobtrusive way to build them within the views. https://blog.driftingruby.com/hacking-content_for-to-create-a-simple-display-helper/
journaltxt (jo) gem & tool - reads single-file Journal.TXT & auto-builds blog
Hello, the new journaltxt (jo) library (gem) and command line tool - reads single-file Journal.TXT - the new human multi-document format for writers - and writes out (auto-builds) a blog (w/ Jekyll posts etc.). Reinventing blogging on the internets! Single-file publishing is the new single push-button publishing ;-) See the samples/Vienna.txt source and live Vienna.TXT Blog w/ Jekyll Minima as examples. Happy writing and publishing.
Vagrant VM for Rails development (Ubuntu 16.04)
A new version of the Zen Rails Development Environment is available. It’s a Ubuntu 16.04 Vagrant VM (for Virtualbox), built for Ruby on Rails development. It comes with tools such as PostgreSQL, Selenium & ChromeDriver (to run Chrome headless with Capybara JavaScript-enabled tests), installed and configured. Useful if you are stuck in a Windows PC or want to isolate your development environment from your Mac or Linux PC.
Command Line Report 4.0.0 Released
Tired of writing command line applications full of puts statements to create a user experience or present data in the terminal window? Have you ever wanted to easily create a tabular report after your application has collected the data? Then make sure to download and get started with the latest version of the Command Line Reporter project. It provides a simple DSL to accomplish many of the tasks you want in your scripts from Progress Bars to easily formatted tables. The wiki has plenty of information to get your started and the gem is available on rubygems.org with source on github.
nil?, empty?, blank? - what's the difference actually?
In nil?, empty?, blank? in Ruby on Rails - what’s the difference actually? we dive into 3 commonly used methods to discover their similarities and differences. Many examples, some digressions and code from Rails included.
Open Source AngularJS Rails Apps
A few open source Rails apps using AngularJS, that developers can learn from or contribute to: https://gist.github.com/eliotsykes/a3a4322eff49a314f8c848c5300803c6
Versioning APIs in Rails 5 (and why you want to do it)
In this part of my ongoing series of articles on Rails 5 API apps, I’m discussing API versioning, how to do it in Rails, and why it’s a good idea.
Spreadsheet Architect v2.0.2 Released!
Spreadsheet Architect is a library that allows you to create XLSX, ODS, or CSV spreadsheets easily from ActiveRecord relations, Plain Ruby classes, or predefined data. https://github.com/westonganger/spreadsheet_architect
Realtime with React and Rails
To showcase using ActionCable in a Rails app with React, let’s explore how to use Rails, React, MobX, and websockets in a realtime location app.
The battle for auditing and versioning in Rails — Audited vs Paper Trail
This blog post is about the comparison of two popular gems of auditing and versioning in Rails. I have identified three fundamental questions that allow me to analyze the capacities of Audited and Paper Trail solving them.
Introducing JS-Try - A try method for safe navigation in JS inspired by Rails
JS-Try is a Javascript implementation of the try method from Rails for safe navigation. https://github.com/westonganger/js-try
How I made first API Documentation gem
Hi, guys! This is my post, about “How I made first API Documentation gem for Hanami”. Here is.
4 ways to store API keys in your Rails apps
Check out how to safely store API keys in your Rails apps and what are their pros and cons.
RubyMine 2017.2 Released
RubyMine 2017.2 is released! This major update features support for Docker Compose, in-editor RuboCop quick-fixes, new features in Git log, and improved JS support. Learn more and download RubyMine 2017.2 from the What’s new page.
RenderReact
I have node based JavaScript tooling, but wanted a way to render my React components from Ruby, with the option to pre-render React components on the server. This led to https://github.com/janlelis/render_react