Sha256: 9c1a322048d8982ab727392817cf059b16ad7a6b5b8732167ea02c4381e56b4f

Contents?: true

Size: 527 Bytes

Versions: 4

Compression:

Stored size: 527 Bytes

Contents

# Rules
# --------------------------------------------------
watch( '^spec/.+_spec.rb' ) { |m| rspec m[0] }
watch( '^lib/(.*)\.rb' ) { |m| rspec "spec/#{m[1]}_spec.rb" }

# Signal Handling
# --------------------------------------------------
Signal.trap('QUIT') { rspec 'spec' } # Ctrl-\
Signal.trap('INT' ) { abort("\n") } # Ctrl-C

def rspec (*paths)
	paths = paths.reject { |p| !File.exists?(p) }
	run "bundle exec rspec --tty -c #{ paths.empty? ? 'spec' : paths.join(' ') }"
end

def run (cmd)
  puts cmd
  system cmd
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
citeproc-js-0.0.2 auto.watchr
citeproc-js-0.0.1 auto.watchr
citeproc-0.0.2 auto.watchr
citeproc-js-0.0.1.pre.1 auto.watchr