Sha256: 4cff827dfa0d0be1b4d9ae0619263dd5fcea514c9659403cee85ea3968c57053

Contents?: true

Size: 486 Bytes

Versions: 93

Compression:

Stored size: 486 Bytes

Contents

require 'puppet/provider/confine'

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

  def pass?(value)
    value && (for_binary? ? which(value) : FileTest.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

93 entries across 93 versions & 4 rubygems

Version Path
puppet-2.7.17 lib/puppet/provider/confine/exists.rb
puppet-2.7.16 lib/puppet/provider/confine/exists.rb
puppet-2.7.14 lib/puppet/provider/confine/exists.rb
puppet-2.6.16 lib/puppet/provider/confine/exists.rb
puppet-2.7.13 lib/puppet/provider/confine/exists.rb
puppet-2.6.15 lib/puppet/provider/confine/exists.rb
supply_drop-0.9.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/confine/exists.rb
supply_drop-0.8.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/confine/exists.rb
supply_drop-0.8.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/confine/exists.rb
puppet-2.7.12 lib/puppet/provider/confine/exists.rb
puppet-2.7.11 lib/puppet/provider/confine/exists.rb
puppet-2.6.14 lib/puppet/provider/confine/exists.rb
supply_drop-0.7.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/confine/exists.rb
supply_drop-0.6.1 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/confine/exists.rb
supply_drop-0.6.0 examples/vendored-puppet/vendor/puppet-2.7.8/lib/puppet/provider/confine/exists.rb
puppet-2.6.13 lib/puppet/provider/confine/exists.rb
puppet-2.7.9 lib/puppet/provider/confine/exists.rb
puppet-2.7.8 lib/puppet/provider/confine/exists.rb
puppet-2.7.6 lib/puppet/provider/confine/exists.rb
puppet-2.6.12 lib/puppet/provider/confine/exists.rb