Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby library to prevent multiple instances of the same process from running
Ruby
branch: master

This branch is 1 commit ahead, 6 commits behind djberg96:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
CHANGES
MANIFEST
README
Rakefile
highlander.gemspec

README

= Description
  A gem that ensures only one instance of your main script is running.
  In short, there can be only one.

= Installation
  gem install highlander

= Synopsis
  require 'highlander'
  # Your code here

  # Meanwhile, back on the command line...

  # First attempt, works. Assume it's running in the background.
  ruby your_script.rb

  # Second attempt while the first instance is still running, fails.
  ruby your_script.rb # => RuntimeError 

= Notes
  Simply requiring the highlander gem ensures that only one instance
  of that script cannot be started again. If you try to start it again
  it will raise a RuntimeError.

= Known Issues
  If you start your program, modify it while its running, and run it again
  then this library will not work.

= Acknowledgements
  Ara Howard for ideas.

= License
  Artistic 2.0

= Copyright
  (C) 2010 Daniel J. Berger
  All Rights Reserved.

== Warranty
  This package is provided "as is" and without any express or
  implied warranties, including, without limitation, the implied
  warranties of merchantability and fitness for a particular purpose.

= Author
  Daniel Berger
Something went wrong with that request. Please try again.