RubyGems Navigation menu

mischacks 0.2.1

Miscellaneous methods that may or may not be useful. sh:: Safely pass untrusted parameters to sh scripts. Raise an exception if the script returns a non-zero value. fork_and_check:: Run a block in a forked process and raise an exception if the process returns a non-zero value. do_and_exit, do_and_exit!:: Run a block. If the block does not run exit!, a successful exec or equivalent, run exit(1) or exit!(1) ourselves. Useful to make sure a forked block either runs a successful exec or dies. Any exceptions from the block are printed to standard error. overwrite:: Safely replace a file. Writes to a temporary file and then moves it over the old file. tempname_for:: Generates an unique temporary path based on a filename. The generated filename resides in the same directory as the original one. try_n_times:: Retries a block of code until it succeeds or a maximum number of attempts (default 10) is exceeded. Exception#to_formatted_string:: Return a string that looks like how Ruby would dump an uncaught exception. IO#best_datasync:: Try fdatasync, falling back to fsync, falling back to flush. Random#exp:: Return a random integer 0 ≤ n < 2^argument (using SecureRandom). Random#float:: Return a random float 0.0 ≤ n < argument (using SecureRandom). Random#int:: Return a random integer 0 ≤ n < argument (using SecureRandom). Password:: A small wrapper for String#crypt that does secure salt generation and easy password verification.

Versions:

  1. 0.2.1 - August 29, 2010 (12.5 KB)
  2. 0.2.0 - August 29, 2010 (12 KB)
  3. 0.1.1 - August 25, 2010 (9 KB)
  4. 0.1.0 - February 14, 2010 (9 KB)
  5. 0.0.6 - February 14, 2010 (9 KB)

Authors:

  • Johan Kiviniemi

Owners:

SHA 256 checksum:

ae58faa75ef7745d8bdd770fdb0e0cac3158bd8f70ff5b3576d83cad026f255e

Total downloads 11,818

For this version 2,835

Gemfile:
= Copy to clipboard Copied!

install:
=

Licenses:

N/A

Required Ruby Version: None

Links: