https://github.com/jamis/derring-do
The over-eager progress monitor for Ruby.
https://github.com/jamis/derring-do
Last synced: 7 months ago
JSON representation
The over-eager progress monitor for Ruby.
- Host: GitHub
- URL: https://github.com/jamis/derring-do
- Owner: jamis
- Created: 2010-11-13T14:58:28.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-11-13T15:04:36.000Z (over 15 years ago)
- Last Synced: 2024-03-27T04:24:24.693Z (about 2 years ago)
- Language: Ruby
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
Derring-Do
==========
Derring-Do is a silly progress monitor that you can add to your console
Ruby applications.
It will emit "encouraging" words periodically, to indicate progress is being
made on a job. If the campaign (or job) is given a target, the progress
will also include updates saying specifically how far the campaign has gone
toward that target.
Usage
-----
require 'derring-do'
# untargetted campaigns (with no specifical goal in mind)
derring do |campaign|
1000.times do
campaign.tally_ho!
sleep 0.2
end
end
# targetted campaigns (aiming for a particular goal)
derring do |campaign|
campaign.target = 2000
1000.times do
campaign.tally_ho! 2
sleep 0.2
end
end
Installation
------------
gem install derring-do
Caveats
-------
I wrote this mostly to teach myself how to use rspec. The idea occurred to me
while mostly asleep, so while it may not be actually useful, it is certainly
whimsical.
License
-------
This library is placed in the public domain by the author, Jamis Buck. Do
with it what you will. Please prefer good over evil.