0.0
No commit activity in last 3 years
No release in over 3 years
My Ruby Utility Belt -- Not really intended for general use, but you're welcome to it.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 5.4.3, ~> 5.4

Runtime

 Project Readme

Utility Belt

My Ruby Utilities

Install

gem install utilitybelt

Usage

UtilityBelt.mkdir(*path)

Wrapper for FileUtils.mkdir, which accepts path as argements to be joined and noops if directory exists.

UtilityBelt.touch(*path)

Wrapper for FileUtils.touch, which accepts path as argements to be joined and set's file perms to 0644.

UtilityBelt.save(path, body, bin=false)

Save body in path, optionally as binary data via bin=true.

UtilityBelt.exec(*command)

Run command as joined argements. Returns a Struct;

#<struct stdout="STDOUT", stderr="STDERR", status=0>

UtilityBelt.encrypt!(source, destination, recipient)

GPG encrypts a source to a destination. Returns destination

UtilityBelt.decrypt(source, recipient)

GPG decrypts a source. Returns decrypted string.

UtilityBelt.decrypt!(source, destination, recipient)

GPG decrypts a source to a destination. Returns destination.

UtilityBelt::NullLogger

A noop logger.

E.g.:

Something.new(:logger => UtilityBelt::NullLogger.new)

Stay tuned, more to come.

Development

Fork, clone and...

cd ruby-utilitybelt
bundle install --path .bundle
bundle exec rake test

# Or to test GPG stuff
# GPG_ID=<gpg email> bundle exec rake test