A collection of Ruby utility libraries, extensions, and scripts—many dating back to Ruby 1.8.7, some modern and backed by unit tests.
This repository bundles a diverse set of Ruby-based helpers:
- Legacy code (Ruby 1.8/1.9) that may require updating.
- Modern utilities, many backed by unit tests.
- Experimental and demo scripts, educational rather than production-ready.
Use Bundler or clone and load files directly:
git clone https://github.com/yourorg/lib-ruby.git
cd lib-ruby
bundle install
Require modules individually:
require 'data_structures_101/priority_queue'
require 'coordinates/utm_coordinate'
require 'password_validator'
Or load all utilities:
Dir['lib/**/*.rb'].each { |f| require_relative f }
active_record_better_native_database_types.rb
— Enhanced DB type mapping.active_record_extensions/
— Autowire, add comments, and other AR extensions.
data_structures_101/
— Queues, locks, and sorting algorithms.priority_queue.rb
,linked_list.rb
,hash_recursive_merge.rb
.- Educational demos:
pancake_sort.rb
,bogosort.rb
,random_forest_classifier.rb
.
coordinates/
— Convert between UTM, MGRS, web Mercator, British National Grid, and more.
bash_system.rb
,shell_command_executor.rb
— Secure shell execution.- Rake helpers:
tasks/
,rake_tasks/
.
simple_feature_flags.rb
,feature_toggle.rb
— Runtime toggles.simple_flow.rb
— Build chained workflows.
- Date helpers:
date_helpers.rb
,easter_sunday.rb
,previous_dow.rb
. - String and Hash refinements:
mods/
,refinements_*.rb
. password_validator.rb
,uuidv7.rb
,cache.rb
,diff.rb
.
See the examples/
directory for sample scripts demonstrating usage patterns.
Run unit tests under tests/
:
bundle exec rake test
Pull requests welcome! Please follow the Improvement Plan, run RuboCop and tests, and submit PRs.
This project does not include a license file. Please add LICENSE
to clarify usage rights.