Sha256: d3fee5e545f9e4e3ebfba448b47bd4ca7490c4857887d5d4f0b66701e8f289e4

Contents?: true

Size: 467 Bytes

Versions: 627

Compression:

Stored size: 467 Bytes

Contents

require 'puppet/confine'

class Puppet::Confine::Exists < Puppet::Confine
  def self.summarize(confines)
    confines.inject([]) { |total, confine| total + confine.summary }
  end

  def pass?(value)
    value && (for_binary? ? which(value) : Puppet::FileSystem.exist?(value))
  end

  def message(value)
    "file #{value} does not exist"
  end

  def summary
    result.zip(values).inject([]) { |array, args| val, f = args; array << f unless val; array }
  end
end

Version data entries

627 entries across 627 versions & 3 rubygems

Version Path
puppet-6.29.0 lib/puppet/confine/exists.rb
puppet-6.29.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-6.29.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-6.29.0-universal-darwin lib/puppet/confine/exists.rb
puppet-6.28.0 lib/puppet/confine/exists.rb
puppet-6.28.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-6.28.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-6.28.0-universal-darwin lib/puppet/confine/exists.rb
puppet-6.27.0 lib/puppet/confine/exists.rb
puppet-6.27.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-6.27.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-6.27.0-universal-darwin lib/puppet/confine/exists.rb
puppet-6.26.0 lib/puppet/confine/exists.rb
puppet-6.26.0-x86-mingw32 lib/puppet/confine/exists.rb
puppet-6.26.0-x64-mingw32 lib/puppet/confine/exists.rb
puppet-6.26.0-universal-darwin lib/puppet/confine/exists.rb
puppet-6.25.1 lib/puppet/confine/exists.rb
puppet-6.25.1-x86-mingw32 lib/puppet/confine/exists.rb
puppet-6.25.1-x64-mingw32 lib/puppet/confine/exists.rb
puppet-6.25.1-universal-darwin lib/puppet/confine/exists.rb