Sha256: 52c747218ad5086e04c170df38348fdcca96ea3d040a7f8031eaaace1fc9ce8c

Contents?: true

Size: 573 Bytes

Versions: 32

Compression:

Stored size: 573 Bytes

Contents

# frozen_string_literal: true

require 'puppet/file_serving/mount'

class Puppet::FileServing::Mount::Scripts < Puppet::FileServing::Mount
  # Return an instance of the appropriate class.
  def find(path, request)
    raise _("No module specified") if path.to_s.empty?

    module_name, relative_path = path.split("/", 2)
    mod = request.environment.module(module_name)
    return nil unless mod

    mod.script(relative_path)
  end

  def search(path, request)
    result = find(path, request)
    if result
      [result]
    end
  end

  def valid?
    true
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
puppet-8.10.0 lib/puppet/file_serving/mount/scripts.rb
puppet-8.10.0-x86-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.10.0-x64-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.10.0-universal-darwin lib/puppet/file_serving/mount/scripts.rb
puppet-8.9.0 lib/puppet/file_serving/mount/scripts.rb
puppet-8.9.0-x86-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.9.0-x64-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.9.0-universal-darwin lib/puppet/file_serving/mount/scripts.rb
puppet-8.8.1 lib/puppet/file_serving/mount/scripts.rb
puppet-8.8.1-x86-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.8.1-x64-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.8.1-universal-darwin lib/puppet/file_serving/mount/scripts.rb
puppet-8.7.0 lib/puppet/file_serving/mount/scripts.rb
puppet-8.7.0-x86-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.7.0-x64-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.7.0-universal-darwin lib/puppet/file_serving/mount/scripts.rb
puppet-8.6.0 lib/puppet/file_serving/mount/scripts.rb
puppet-8.6.0-x86-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.6.0-x64-mingw32 lib/puppet/file_serving/mount/scripts.rb
puppet-8.6.0-universal-darwin lib/puppet/file_serving/mount/scripts.rb