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
2
3
4
5
ri -i

# or

ri Hash.reject
  • yard - Yay! A Ruby Documentation Tool
  • swagger-blocks - Define and serve live-updating Swagger JSON for Ruby apps.

Language

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

Code analyser

Code formatter

  • rufo - The Ruby Formatter - created by @asterite

Task runner

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

Databases

Mysql

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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

root = true

[*]
end_of_line = lf
charset = utf-8

[Rakefile]
indent_style=space
indent_size=2
trim_trailing_whitespace = true

[*.rb]
indent_style=space
indent_size=2
trim_trailing_whitespace = true

Version managers

Web frameworks

Frontend frameworks

  • middlemanapp - Middleman is a static site generator using all the shortcuts and tools in modern web development.

Templating

ERB

HAML

Structs

Testing

Debugging

Resources

Books

Concepts

Performance

  • fast-ruby - 💨 Writing Fast Ruby 😍 – Collect Common Ruby idioms.

Comments

⬆︎TOP