Code Monkey home page Code Monkey logo

guard-process's Introduction

Guard::Process Build Status

Guard to run continues processes.

This gem requires Ruby 1.9.2, 1.9.3 or JRuby in 1.9 mode.

Usage

Please read the Guard documentation to learn how to use Guard.

There is also an exellent screencast available on Railscasts

Additionally there is a great introductory article on Intridea Blog mentioning Guard::Process.

Guardfile

You can add as many process Guards as you want, an example Guardfile:

  guard 'process', :name => 'EndlessRunner', :command => 'rails runner Something::ThatGoesOnAndOn' do
    watch('Gemfile.lock')
  end

  guard 'process', :name => 'AnotherRunner', :command => 'rails runner AnotherRunner' do
    watch('Gemfile.lock')
  end

Options

The following options are available:

  • name The display name of your process in Guard, this is shown when Guard::Process is starting and stopping your process
  • command The command to run as you would run it from the command line
  • dir The directory in which you want to run the command, if none is given then Ruby's current working directory is used
  • stop_signal The signal that Guard::Process sends to terminate the process when it needs to stop/restart it. This defaults to 'TERM' (in some cases you may need KILL).
  • dont_stop When a reload is triggered this will not stop the process, instead it will wait for the current process run to finish before starting a new one. This is useful for having guard-process execute commands that don't run constantly that you don't want to interrupt as they run.
  • env A Hash with environmental variables to set for the context where your command runs, like so:
  {"SSL_CERTS_DIR" => "/etc/ssl/certs", "JAVA_HOME" => "/usr/local/java"}

TODO

Clean up the test cases

Changes

1.0.5

  • Adds the dont_stop option

1.0.4

  • Adds the dir option

Development

Pull requests are welcome, please make sure your patches are well tested before contributing. When sending a pull request:

  • Use a topic branch for your change
  • Add tests for your changes using MiniTest::Unit
  • Do not change the version number in the gemspec

License

Guard::Process is released under the MIT license.

Author

Mark Kremer

guard-process's People

Contributors

jacortinas avatar mrkcor avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.