Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dirtyhenry/noicycle

Utility gem to calculate dates involved in a Tower of Hanoi backup rotation method.
https://github.com/dirtyhenry/noicycle

Last synced: 6 days ago
JSON representation

Utility gem to calculate dates involved in a Tower of Hanoi backup rotation method.

Awesome Lists containing this project

README

        

# Noicycle

Utility gem to calculate dates involved in a Tower of Hanoi backup rotation method.

## Installation

Add this line to your application's Gemfile:

gem 'noicycle'

And then execute:

$ bundle

Or install it yourself as:

$ gem install noicycle

## Usage

To get the dates of a 7-tape backup from a give reference date:

ref_date = Date.parse("5th May 2013")
noicycle.tapes(ref_date, 7)

The result is a Hash that contains tape-keys and date values. For instance, on 24th september 2013, the upper code returned the following hash:

{
2=>#,
1=>#,
3=>#,
4=>#,
7=>#,
5=>#,
6=>#
}

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request