[genar@localhost ~]$ bundle install∎
Ruby
RubyGems
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a “gem”), a tool designed to easily manage the installation of gems, and a server for distributing them. It was created by Chad Fowler and Richard Kilmer during RubyConf 2004.
Tools
Arquitecture
Ruby Conf 12 - Boundaries by Gary Bernhardt
October CincyRb - Jim Weirich on Decoupling from Rails
Incoming
- active_delivery - Ruby framework for keeping all types of notifications (mailers, push notifications, whatever) in one place
Documentation
Check ruby documentation from terminal:
1 | ri -i |
- yard - Yay! A Ruby Documentation Tool
- swagger-blocks - Define and serve live-updating Swagger JSON for Ruby apps.
Language
- The Safe Navigation Operator (&.) in Ruby
- Struct inheritance is overused
- Ruby’s Powerful Method Arguments & How To Use Them Correctly
Functional programming
CLI
- whatisthor - Thor is a toolkit for building powerful command-line interfaces. It is used in Bundler, Vagrant, Rails and others.
- guard - Guard is a command line tool to easily handle events on file system modifications. https://guardgem.org
Console
- irbtools
- pry - A runtime developer console and IRB alternative with powerful introspection capabilities. http://pryrepl.org
Code analyser
- rubocop - A Ruby static code analyzer and formatter, based on the community Ruby style guide. https://docs.rubocop.org
- ruby-style-guide - A community-driven Ruby coding style guide
Code formatter
- rufo - The Ruby Formatter - created by @asterite
Task runner
- sidekiq - Simple, efficient background processing for Ruby http://sidekiq.org
- sidekiq-unique-jobs - Ensure uniqueness of your Sidekiq jobs
- sidekiq-throttled - Concurrency and threshold throttling for Sidekiq.
Arrays
Making XOR between two arrays
1 | array1 - array2 | array2 - array1 |
Rescue keywords
Method arguments
Parsers
- nokogiri - Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri’s many features is the ability to search documents via XPath or CSS3 selectors.
Dependency management
bundler
Initialize project
bundle init
Create new gem
bundle gem my_amazing_gem
Add package to Gemfile
bundle add somegem
Update Gemfile packages
bundle update
Executing ruby script in bundle context
bundle exec ruby script_name
Debugging
- byebug - Debugging in Ruby 2
Build utilities
- rake - A make-like build utility for Ruby. https://ruby.github.io/rake
Databases
- Sequel - Sequel: The Database Toolkit for Ruby http://sequel.jeremyevans.net
Mysql
- mysql2 - A modern, simple and very fast Mysql library for Ruby - binding to libmysql http://github.com/brianmario/mysql2
Object Mappers
- Ruby Object Mapper - Ruby Object Mapper is an open-source persistence and mapping toolkit for Ruby built for speed and simplicity.
editorconfig
1 |
|
Version managers
- rbenv - Groom your app’s Ruby environment
- rbenv-installer#rbenv-installer - Installer and doctor scripts for rbenv
- Always run install with
-v
:rbenv install -v 2.5
. If not specified it won’t show any progess of the running build.
rvm - RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.
Web frameworks
- Ruby on Rails
- sinatra - Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort
- http://docs.eventide-project.org/examples/quickstart.html
- grape - An opinionated framework for creating REST-like APIs in Ruby. http://www.ruby-grape.org
Frontend frameworks
- middlemanapp - Middleman is a static site generator using all the shortcuts and tools in modern web development.
Templating
ERB
HAML
Structs
Testing
- rspec
- TestProf: a good doctor for slow Ruby tests
- TestProf II: Factory therapy for your Ruby tests
- mocha - Mocha is a mocking and stubbing library for Ruby http://gofreerange.com/mocha/docs
- knapsack - Knapsack splits tests across CI nodes and makes sure that tests will run comparable time on each node. https://knapsackpro.com
- factory_bot - A library for setting up Ruby objects as test data. https://thoughtbot.com/open-source
- guard-minitest - Guard::Minitest automatically run your tests (much like autotest) https://rubygems.org/gems/guard-minitest
Debugging
- byebug - Debugging in Ruby 2
- I am a puts debuggerer
Resources
- awesome-ruby - 💎 A collection of awesome Ruby libraries, tools, frameworks and software https://awesome-ruby.com
Books
Concepts
Performance
- fast-ruby - 💨 Writing Fast Ruby 😍 – Collect Common Ruby idioms.