Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/dirtyhenry/noicycle
- Owner: dirtyhenry
- License: mit
- Created: 2013-09-24T14:01:22.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2021-10-28T09:10:59.000Z (about 3 years ago)
- Last Synced: 2024-03-15T13:22:10.685Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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