Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.
/ controlled_quit Public archive

Gem allowing a controlled quit from a command-line application

License

Notifications You must be signed in to change notification settings

jfoy/controlled_quit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ControlledQuit Build Status Code Climate

Gem to allow a controlled quit from a command-line application.

Installation

Add this line to your application's Gemfile:

gem 'controlled_quit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install controlled_quit

Usage

ControlledQuit.protect do |quitter|
  units_of_work.each do |unit|
    unit.do_work_and_serialize
    quitter.quit_if_requested
  end
end

Contributing

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

About

Gem allowing a controlled quit from a command-line application

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages