0.0
No commit activity in last 3 years
No release in over 3 years
Run commands only if build output is not up to date.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 2.5
>= 0
 Project Readme

Guard::Depend

Gem Version Build Status Dependency Status Code Climate Coverage Status

guard-depend is useful for projects that produce build output like binaries. guard-depend will only run the command you specify if the build output does not exist or is not up to date with regard to the watched files.

  • Tested against Ruby 1.9.3, 2.0.0 and 2.1.0

Installation

Please be sure to have Guard installed before continue.

Add this line to your application's Gemfile:

group :development do
  gem 'guard-depend'
end

And then execute:

$ bundle install guard-depend

Or install manually:

$ gem install guard-depend

Add guard definition to your Guardfile by running this command:

$ guard init depend

Usage

Please read Guard usage doc

Guardfile

guard-depend can be adapted to all kind of projects.

.NET project

guard :depend,
  # The path to the output generated by cmd. This can be a single value, an array or a callable returning any of both.
  output_paths: Proc.new { Dir['build/bin/*.dll'] },
  # The command to run if the output is outdated or does not exist.
  cmd: %w(bundle exec rake compile),
  # Whether to run at startup.
  run_on_start: false do
    watch(%r{^source/.*\.cs$}i)
end

Please read Guard doc for more information about the Guardfile DSL.

Development

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Contributing

  1. Fork it (http://github.com/agross/guard-depend/fork)
  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