Sha256: 2ab642774035ec02e3a6385cec41515c67f1de74125e1046ba50ac9d3f05ac7f

Contents?: true

Size: 264 Bytes

Versions: 12

Compression:

Stored size: 264 Bytes

Contents

module Reporting
  def silence_stream(stream)
    old_stream = stream.dup
    stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
    stream.sync = true
    yield
  ensure
    stream.reopen(old_stream)
    old_stream.close
  end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
kt-paperclip-5.4.0 spec/support/reporting.rb
paperclip-6.1.0 spec/support/reporting.rb
paperclip-6.0.0 spec/support/reporting.rb
paperclip-5.3.0 spec/support/reporting.rb
paperclip-5.2.1 spec/support/reporting.rb
paperclip-5.2.0 spec/support/reporting.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paperclip-5.1.0/spec/support/reporting.rb
paperclip-5.1.0 spec/support/reporting.rb
paperclip-5.0.0 spec/support/reporting.rb
paperclip_jk-5.0.0.beta2 spec/support/reporting.rb
paperclip-5.0.0.beta2 spec/support/reporting.rb
paperclip-5.0.0.beta1 spec/support/reporting.rb