Sha256: f3e20652fa6226b72529638762361ae35e1d9fcf21465ba98b1859b1bd805c17

Contents?: true

Size: 430 Bytes

Versions: 32

Compression:

Stored size: 430 Bytes

Contents

#!/usr/bin/env ruby
require 'rb-fsevent'

if ARGV.length < 2
  STDERR.puts "watchr dir ruby-parameter(s)..."
  abort
end

paths = ARGV.shift.split(",")
$args = ARGV.dup


def do_ruby
  STDERR.puts $args.join(" ")
  STDERR.puts "=" * 80
  
  system(*$args)
end

puts "Initial run"
do_ruby

fsevent = FSEvent.new
fsevent.watch paths do |directories|
  puts "Detected change inside: #{directories.inspect}"
  do_ruby
end
fsevent.run

Version data entries

32 entries across 32 versions & 3 rubygems

Version Path
radiospiel-app-0.2.9 script/watchr
radiospiel-app-0.2.7 script/watchr
radiospiel-app-0.2.6 script/watchr
radiospiel-app-0.2.5 script/watchr
radiospiel-app-0.2.3 script/watchr
radiospiel-app-0.2.2 script/watchr
radiospiel-app-0.2.1 script/watchr
micro_sql-0.3.1 script/watchr
radiospiel-app-0.2.0 script/watchr
radiospiel-app-0.1.1 script/watchr
radiospiel-app-0.1.0 script/watchr
micro_sql-0.3.0 script/watchr