Sha256: dc126664c97518cf3af7e37f6da8c77ef8664479c83babd782a8887e947df947

Contents?: true

Size: 730 Bytes

Versions: 689

Compression:

Stored size: 730 Bytes

Contents

require 'puppet/file_serving/content'
require 'puppet/indirector/file_content'
require 'puppet/indirector/code'
require 'puppet/file_serving/terminus_selector'

class Puppet::Indirector::FileContent::Selector < Puppet::Indirector::Code
  desc "Select the terminus based on the request"
  include Puppet::FileServing::TerminusSelector

  def get_terminus(request)
    indirection.terminus(select(request))
  end

  def find(request)
    get_terminus(request).find(request)
  end

  def search(request)
    get_terminus(request).search(request)
  end

  def authorized?(request)
    terminus = get_terminus(request)
    if terminus.respond_to?(:authorized?)
      terminus.authorized?(request)
    else
      true
    end
  end
end

Version data entries

689 entries across 689 versions & 5 rubygems

Version Path
puppet-6.29.0 lib/puppet/indirector/file_content/selector.rb
puppet-6.29.0-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.29.0-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.29.0-universal-darwin lib/puppet/indirector/file_content/selector.rb
puppet-6.28.0 lib/puppet/indirector/file_content/selector.rb
puppet-6.28.0-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.28.0-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.28.0-universal-darwin lib/puppet/indirector/file_content/selector.rb
puppet-6.27.0 lib/puppet/indirector/file_content/selector.rb
puppet-6.27.0-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.27.0-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.27.0-universal-darwin lib/puppet/indirector/file_content/selector.rb
puppet-6.26.0 lib/puppet/indirector/file_content/selector.rb
puppet-6.26.0-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.26.0-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.26.0-universal-darwin lib/puppet/indirector/file_content/selector.rb
puppet-6.25.1 lib/puppet/indirector/file_content/selector.rb
puppet-6.25.1-x86-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.25.1-x64-mingw32 lib/puppet/indirector/file_content/selector.rb
puppet-6.25.1-universal-darwin lib/puppet/indirector/file_content/selector.rb