Sha256: aae569b725af6e410acc964f0f514d1d02723ba18540935e37d02ef83f57aebb

Contents?: true

Size: 1.34 KB

Versions: 21

Compression:

Stored size: 1.34 KB

Contents

# A sample Guardfile
# More info at https://github.com/guard/guard#readme

dot_rspec_path = File.expand_path('../.rspec', __FILE__)

rspec_options = File.open('.rspec', &:readlines).map(&:chomp).reject{|n| n =~ /\A(#|\Z)/}

guard 'bundler' do
  watch 'Gemfile'
  watch /\A.+\.gemspec\Z/
end

guard 'rspec', :version => 2 do
  watch(%r{^spec/.+_spec\.rb$})

  # run all specs when the support files change
  watch(%r{^spec/support/.+\.rb$}) { 'spec' }

  watch('spec/shared/client_examples.rb') { 'spec/zk/client_spec.rb' }

  watch(%r%^spec/support/client_forker.rb$%) { 'spec/zk/00_forked_client_integration_spec.rb' }

  watch(%r{^lib/(.+)\.rb$}) do |m| 
    case m[1]
    when 'zk/event_handler'
      "spec/zk/watch_spec.rb"

    when 'zk/client/threaded'
      ["spec/zk/client_spec.rb", "spec/zk/zookeeper_spec.rb"]

    when 'zk/locker'
      'spec/zk/locker_spec.rb'

    when %r{^(?:zk/locker/locker_base|spec/shared/locker)}
      Dir["spec/zk/locker/*_spec.rb"]

    when %r{^zk/client/(?:base|state_mixin|unixisms)}
      Dir['spec/zk/{client,client/*,zookeeper}_spec.rb']

    when 'zk' # .rb
      'spec'  # run all tests

    else
      generic = "spec/#{m[1]}_spec.rb"
      if test(?f, generic)
        generic
      else
        $stderr.puts "RUNNING ALL TESTS"
        'spec'
      end
    end
  end

  watch('spec/spec_helper.rb')  { "spec" }
end


Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
zk-1.10.0 Guardfile
zk-1.9.6 Guardfile
zk-1.9.5 Guardfile
zk-1.9.4 Guardfile
zk-1.9.3 Guardfile
zk-1.9.2 Guardfile
zk-1.9.1 Guardfile
zk-1.9.0 Guardfile
zk-1.8.0 Guardfile
zk-1.7.5 Guardfile
zk-1.7.4 Guardfile
zk-1.7.3 Guardfile
zk-1.7.2 Guardfile
zk-1.7.1 Guardfile
zk-1.7.0 Guardfile
zk-1.6.5 Guardfile
zk-1.6.4 Guardfile
zk-1.6.3 Guardfile
zk-1.6.2 Guardfile
zk-1.6.1 Guardfile