DEV Community

Lee Wynne
Lee Wynne

Posted on

Can anyone recommend a little toolbox of Ruby goodies?

More specifically a secret stash of:

  • Scripts
  • Tools
  • Utilities
  • Re-usable classes and methods (for repeatable stuff like web scraping, file read and writing)

Top comments (8)

Collapse
 
andyobtiva profile image
Andy Maleh
  • glimmer-dsl-libui: this project won a Fukuoka Ruby 2022 Special Award after getting judged by Matz, the creator of Ruby. It is a native GUI desktop application framework for MRI CRuby.
  • glimmer-dsl-swt: a JRuby desktop development GUI framwork with support for scaffolding and native executable packaging (yes you can build a Ruby Mac native app or native Windows exe and package as PKG/DMG or MSI)
  • glimmer: build any advanced hierarchical Ruby DSL you can imagine with the tersest syntax possible
  • puts_debuggerer: improved puts debugging by automatically displaying file names and line numbers in addition to other useful information when printing debugging info
  • array_include_methods: missing methods from the Ruby Array API like include_any? and include_all?
  • rake-tui: a text-based user interface for your rake tasks in any application. Makes it quicker to filter and launch rake tasks with a few key strokes when you have many rake tasks in your app.
  • rvm-tui: a text-based user interface for enabling quick switching between RVM rubies and gemsets when you have many on your system and you want to test a project in multiple of them
  • abstract_feature_branch: feature toggling to branch by abstraction instead of literally
  • strategic: painless strategy pattern support for Ruby and Rails apps. Honors the open/closed principle in allowing you to add strategies to any objects.
  • perfect-shape: geometric algorithms for all common geometric shapes
  • easily_typable: adds "some_downcase_subclass?" methods to subclasses in a class hierarchy (e.g. vehicle.car? or vehicle.truck?) to enable quick testing of belonging to a subclass via a method instead of via is_a?
  • to_collection: enables treating a single object or an array of objects in a unified fashion as simply a collection of one or more elements
  • nested_inherited_jruby_include_pac...: makes calls to include_package in jruby include a package into the class or module hierarchy and subclasses/submodules automatically so that you do not have to repeat yourself.
Collapse
 
leewynne profile image
Lee Wynne

Amazing! Thanks ๐Ÿ˜Ž

Collapse
 
fuzzygroup profile image
fuzzygroup

A few years ago, I took all my common functions and released them as gems:

url_common is probably the most developed and is the basis for all of the scrapers / crawlers I use.

Collapse
 
leewynne profile image
Lee Wynne

Nice one! thanks for this ๐Ÿ˜Ž

Collapse
 
leewynne profile image
Lee Wynne
Collapse
 
leewynne profile image
Lee Wynne

Yeth - gimme more ๐Ÿ™ƒ i also like rb files with a Gemfile for useful methods and classes here and there

Collapse
 
sevenc_nanashi profile image
Nanashi.

github.com/nodai2hITC/ricecream
ricecream is nice

require "ricecream"
foo = 123
ic foo # => ic| foo: 123

def foo
  ic
  return if cond1
  ic
  if cond2
    method1
    ic
  else
    method2
    ic
  end
end
# =>
# ic| script.rb:2 in foo at 17:33:40.227
# ic| script.rb:4 in foo at 17:33:40.227
# ic| script.rb:10 in foo at 17:33:40.228
Enter fullscreen mode Exit fullscreen mode
Collapse
 
gdledsan profile image
Edmundo Sanchez

Last time I tried doing something with ruby I realized it is all Rails.
Everything you find outthere that makes your life easier is part of Rails, and I hated it.

I now understand why people say ruby is dead, and why web devs using ruby say it isn't, they use Rails.

I like using Sinatra, but it means I have to do it all myself, everything is old and abandoned, except Rails.

I still did my thing with Sinatra and have it running, but it left me a bad feeling about ruby.