Sha256: 6eaeef2800c984f1a370360b516633f9fa7f7339517742ce36ee8feb32b89bb4

Contents?: true

Size: 643 Bytes

Versions: 4

Compression:

Stored size: 643 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib") unless $LOAD_PATH.include?(File.dirname(__FILE__) + "/../lib")

require "devloop"
require "listen"

begin
  system("bundle exec spring > /dev/null 2>&1")
  is_bundled = `bundle list`.include?("devloop")
  run_command = is_bundled ? "bundle exec devloop_run" : "devloop_run"
  system(run_command)
  puts "Devloop: watching for changes in spec directory..."
  listener = Listen.to(".", only: %r{.rb$}) do
    system(run_command)
  end
  listener.start
  sleep
rescue Interrupt # user pressed CTRL+C
  STDERR.puts "\nDevloop: exiting due to user request"
  exit 130
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
devloop-0.1.3 bin/devloop
devloop-0.1.2 bin/devloop
devloop-0.1.1 bin/devloop
devloop-0.1.0 bin/devloop