Sha256: 24aebcfd73f2ce62947c3d0ae64ec1cf5271277f781116754aec70683a982146

Contents?: true

Size: 633 Bytes

Versions: 12

Compression:

Stored size: 633 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

puts 'Watch Agent Workflow DSLs'

require 'pry'
require 'listen'

$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))

require 'ad/agent_architecture'

directory_to_watch = File.expand_path('../spec/usecases', __dir__)

callback = proc do |modified, added, _removed|
  (modified + added).each do |file|
    if file.match(%r{spec/usecases/.+\.rbx$})
      # puts "Detected change in #{file}, running command..."
      load file
    end
  end
end

listener = Listen.to(directory_to_watch, &callback)
listener.start

puts "Listening for changes in #{directory_to_watch}..."

sleep

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ad-agent_architecture-0.0.24 bin/watch.rb
ad-agent_architecture-0.0.23 bin/watch.rb
ad-agent_architecture-0.0.22 bin/watch.rb
ad-agent_architecture-0.0.21 bin/watch.rb
ad-agent_architecture-0.0.20 bin/watch.rb
ad-agent_architecture-0.0.19 bin/watch.rb
ad-agent_architecture-0.0.18 bin/watch.rb
ad-agent_architecture-0.0.17 bin/watch.rb
ad-agent_architecture-0.0.16 bin/watch.rb
ad-agent_architecture-0.0.15 bin/watch.rb
ad-agent_architecture-0.0.14 bin/watch.rb
ad-agent_architecture-0.0.13 bin/watch.rb