repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/facts/memory.rb | lib/puppet/indirector/facts/memory.rb | # frozen_string_literal: true
require_relative '../../../puppet/node/facts'
require_relative '../../../puppet/indirector/memory'
class Puppet::Node::Facts::Memory < Puppet::Indirector::Memory
desc "Keep track of facts in memory but nowhere else. This is used for
one-time compiles, such as what the stand-alone ... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/facts/rest.rb | lib/puppet/indirector/facts/rest.rb | # frozen_string_literal: true
require_relative '../../../puppet/node/facts'
require_relative '../../../puppet/indirector/rest'
class Puppet::Node::Facts::Rest < Puppet::Indirector::REST
desc "Find and save facts about nodes over HTTP via REST."
def find(request)
session = Puppet.lookup(:http_session)
api... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/facts/yaml.rb | lib/puppet/indirector/facts/yaml.rb | # frozen_string_literal: true
require_relative '../../../puppet/node/facts'
require_relative '../../../puppet/indirector/yaml'
require_relative '../../../puppet/indirector/fact_search'
class Puppet::Node::Facts::Yaml < Puppet::Indirector::Yaml
desc "Store client facts as flat files, serialized using YAML, or
re... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/facts/json.rb | lib/puppet/indirector/facts/json.rb | # frozen_string_literal: true
require_relative '../../../puppet/node/facts'
require_relative '../../../puppet/indirector/json'
require_relative '../../../puppet/indirector/fact_search'
class Puppet::Node::Facts::Json < Puppet::Indirector::JSON
desc "Store client facts as flat files, serialized using JSON, or
re... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/facts/network_device.rb | lib/puppet/indirector/facts/network_device.rb | # frozen_string_literal: true
require_relative '../../../puppet/node/facts'
require_relative '../../../puppet/indirector/code'
class Puppet::Node::Facts::NetworkDevice < Puppet::Indirector::Code
desc "Retrieve facts from a network device."
def allow_remote_requests?
false
end
# Look a device's facts up ... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/facts/facter.rb | lib/puppet/indirector/facts/facter.rb | # frozen_string_literal: true
require_relative '../../../puppet/node/facts'
require_relative '../../../puppet/indirector/code'
class Puppet::Node::Facts::Facter < Puppet::Indirector::Code
desc "Retrieve facts from Facter. This provides a somewhat abstract interface
between Puppet and Facter. It's only `somewh... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/file_bucket_file/selector.rb | lib/puppet/indirector/file_bucket_file/selector.rb | # frozen_string_literal: true
require_relative '../../../puppet/indirector/code'
module Puppet::FileBucketFile
class Selector < Puppet::Indirector::Code
desc "Select the terminus based on the request"
def select(request)
if request.protocol == 'https'
:rest
else
:file
end
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/file_bucket_file/rest.rb | lib/puppet/indirector/file_bucket_file/rest.rb | # frozen_string_literal: true
require_relative '../../../puppet/indirector/rest'
require_relative '../../../puppet/file_bucket/file'
module Puppet::FileBucketFile
class Rest < Puppet::Indirector::REST
desc "This is a REST based mechanism to send/retrieve file to/from the filebucket"
def head(request)
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector/file_bucket_file/file.rb | lib/puppet/indirector/file_bucket_file/file.rb | # frozen_string_literal: true
require_relative '../../../puppet/indirector/code'
require_relative '../../../puppet/file_bucket/file'
require_relative '../../../puppet/util/checksums'
require_relative '../../../puppet/util/diff'
require 'fileutils'
module Puppet::FileBucketFile
class File < Puppet::Indirector::Code
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/issues.rb | lib/puppet/pops/issues.rb | # frozen_string_literal: true
# Defines classes to deal with issues, and message formatting and defines constants with Issues.
# @api public
#
module Puppet::Pops
module Issues
# Describes an issue, and can produce a message for an occurrence of the issue.
#
class Issue
# The issue code
# @return [Symbol... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | true |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/visitable.rb | lib/puppet/pops/visitable.rb | # frozen_string_literal: true
# Visitable is a mix-in module that makes a class visitable by a Visitor
module Puppet::Pops::Visitable
def accept(visitor, *arguments)
visitor.visit(self, *arguments)
end
end
| ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/pcore.rb | lib/puppet/pops/pcore.rb | # frozen_string_literal: true
require 'uri'
module Puppet::Pops
module Pcore
include Types::PuppetObject
TYPE_URI_RX = Types::TypeFactory.regexp(URI::DEFAULT_PARSER.make_regexp)
TYPE_URI = Types::TypeFactory.pattern(TYPE_URI_RX)
TYPE_URI_ALIAS = Types::PTypeAliasType.new('Pcore::URI', nil, TYPE_URI)
TYPE_S... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/serialization.rb | lib/puppet/pops/serialization.rb | # frozen_string_literal: true
module Puppet::Pops
module Serialization
def self.not_implemented(impl, method_name)
raise NotImplementedError, "The class #{impl.class.name} should have implemented the method #{method_name}()"
end
class SerializationError < Puppet::Error
end
PCORE_TYPE_KEY = '__ptype'
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/adaptable.rb | lib/puppet/pops/adaptable.rb | # frozen_string_literal: true
# Adaptable is a mix-in module that adds adaptability to a class.
# This means that an adapter can
# associate itself with an instance of the class and store additional data/have behavior.
#
# This mechanism should be used when there is a desire to keep implementation concerns separate.
#... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/puppet_stack.rb | lib/puppet/pops/puppet_stack.rb | # frozen_string_literal: true
require_relative '../../puppet/thread_local'
module Puppet
module Pops
# Utility class for keeping track of the "Puppet stack", ie the file
# and line numbers of Puppet Code that created the current context.
#
# To use this make a call with:
#
# ```rb
# Pupp... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/patterns.rb | lib/puppet/pops/patterns.rb | # frozen_string_literal: true
# The Patterns module contains common regular expression patters for the Puppet DSL language
module Puppet::Pops::Patterns
# NUMERIC matches hex, octal, decimal, and floating point and captures several parts
# 0 = entire matched number, leading and trailing whitespace and sign include... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/label_provider.rb | lib/puppet/pops/label_provider.rb | # frozen_string_literal: true
# Provides a label for an object.
# This simple implementation calls #to_s on the given object, and handles articles 'a/an/the'.
#
module Puppet::Pops::LabelProvider
VOWELS = %w[a e i o u y]
SKIPPED_CHARACTERS = %w[" ']
A = "a"
AN = "an"
# Provides a label for the given object ... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/utils.rb | lib/puppet/pops/utils.rb | # frozen_string_literal: true
# Provides utility methods
module Puppet::Pops
module Utils
# Can the given o be converted to numeric? (or is numeric already)
# Accepts a leading '::'
# Returns a boolean if the value is numeric
# If testing if value can be converted it is more efficient to call {#to_n} or {#to_n... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loaders.rb | lib/puppet/pops/loaders.rb | # frozen_string_literal: true
module Puppet::Pops
# This is the container for all Loader instances. Each Loader instance has a `loader_name` by which it can be uniquely
# identified within this container.
# A Loader can be private or public. In general, code will have access to the private loader associated with the
#... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/merge_strategy.rb | lib/puppet/pops/merge_strategy.rb | # frozen_string_literal: true
require 'deep_merge/core'
module Puppet::Pops
# Merges to objects into one based on an implemented strategy.
#
class MergeStrategy
NOT_FOUND = Object.new.freeze
def self.strategies
@@strategies ||= {}
end
private_class_method :strategies
# Finds the merg... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/semantic_error.rb | lib/puppet/pops/semantic_error.rb | # frozen_string_literal: true
# Error that is used to raise an Issue. See {Puppet::Pops::Issues}.
#
class Puppet::Pops::SemanticError < RuntimeError
attr_accessor :issue
attr_accessor :semantic
attr_accessor :options
# @param issue [Puppet::Pops::Issues::Issue] the issue describing the severity and message
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/pn.rb | lib/puppet/pops/pn.rb | # frozen_string_literal: true
module Puppet::Pops
module PN
KEY_PATTERN = /^[A-Za-z_-][0-9A-Za-z_-]*$/
def pnError(message)
raise ArgumentError, message
end
def as_call(name)
Call.new(name, self)
end
def as_parameters
[self]
end
def ==(o)
eql?(o)
end
def to_s
s = ''.dup
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/visitor.rb | lib/puppet/pops/visitor.rb | # frozen_string_literal: true
module Puppet::Pops
# A Visitor performs delegation to a given receiver based on the configuration of the Visitor.
# A new visitor is created with a given receiver, a method prefix, min, and max argument counts.
# e.g.
# visitor = Visitor.new(self, "visit_from", 1, 1)
# will make the vi... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/validation.rb | lib/puppet/pops/validation.rb | # frozen_string_literal: true
module Puppet::Pops
# A module with base functionality for validation of a model.
#
# * **Factory** - an abstract factory implementation that makes it easier to create a new validation factory.
# * **SeverityProducer** - produces a severity (:error, :warning, :ignore) for a given Issue
# ... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/adapters.rb | lib/puppet/pops/adapters.rb | # frozen_string_literal: true
# The Adapters module contains adapters for Documentation, Origin, SourcePosition, and Loader.
#
module Puppet::Pops
module Adapters
class ObjectIdCacheAdapter < Puppet::Pops::Adaptable::Adapter
attr_accessor :cache
def initialize
@cache = {}
end
# Retrieves a mu... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup.rb | lib/puppet/pops/lookup.rb | # frozen_string_literal: true
# This class is the backing implementation of the Puppet function 'lookup'.
# See puppet/functions/lookup.rb for documentation.
#
module Puppet::Pops
module Lookup
LOOKUP_OPTIONS = 'lookup_options'
GLOBAL = '__global__'
# Performs a lookup in the configured scopes and optionally me... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/issue_reporter.rb | lib/puppet/pops/issue_reporter.rb | # frozen_string_literal: true
module Puppet::Pops
class IssueReporter
# @param acceptor [Validation::Acceptor] the acceptor containing reported issues
# @option options [String] :message (nil) A message text to use as prefix in
# a single Error message
# @option options [Boolean] :emit_warnings (false) wheth... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/validation/tasks_checker.rb | lib/puppet/pops/validation/tasks_checker.rb | # frozen_string_literal: true
module Puppet::Pops
module Validation
# Validator that limits the set of allowed expressions to not include catalog related operations
# @api private
class TasksChecker < Checker4_0
def in_ApplyExpression?
top = container(0)
step = -1
until container(step) == top
retur... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/validation/validator_factory_4_0.rb | lib/puppet/pops/validation/validator_factory_4_0.rb | # frozen_string_literal: true
module Puppet::Pops
module Validation
# Configures validation suitable for 4.0
#
class ValidatorFactory_4_0 < Factory
# Produces the checker to use
def checker diagnostic_producer
if Puppet[:tasks]
require_relative 'tasks_checker'
TasksChecker.new(diagnostic_producer)
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/validation/checker4_0.rb | lib/puppet/pops/validation/checker4_0.rb | # frozen_string_literal: true
require_relative '../../../puppet/pops/evaluator/external_syntax_support'
module Puppet::Pops
module Validation
# A Validator validates a model.
#
# Validation is performed on each model element in isolation. Each method should validate the model element's state
# but not validate its re... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | true |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/resource/param.rb | lib/puppet/pops/resource/param.rb | # frozen_string_literal: true
# An implementation of the interface Puppet::Resource
# that adapts the 3.x compiler and catalog expectations on
# a resource instance. This instance is backed by a
# pcore representation of the resource type an instance of this
# ruby class.
#
# This class must inherit from Puppet::Resou... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/resource/resource_type_impl.rb | lib/puppet/pops/resource/resource_type_impl.rb | # frozen_string_literal: true
require_relative 'param'
module Puppet::Pops
module Resource
def self.register_ptypes(loader, ir)
types = [Param, ResourceTypeImpl].map do |c|
c.register_ptype(loader, ir)
end
types.each { |t| t.resolve(loader) }
end
class ResourceTypeImpl
# Make instances of this class dire... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/puppet_plan_instantiator.rb | lib/puppet/pops/loader/puppet_plan_instantiator.rb | # frozen_string_literal: true
module Puppet::Pops
module Loader
# The PuppetPlanInstantiator instantiates a Puppet::Functions::PuppetFunction given a Puppet Programming language
# source that when called evaluates the Puppet logic it contains.
#
class PuppetPlanInstantiator
# Produces an instance of the Function cla... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/static_loader.rb | lib/puppet/pops/loader/static_loader.rb | # frozen_string_literal: true
# Static Loader contains constants, basic data types and other types required for the system
# to boot.
#
module Puppet::Pops
module Loader
class StaticLoader < Loader
BUILTIN_TYPE_NAMES = %w[
Component
Exec
File
Filebucket
Group
Node
Notify
Package
R... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/dependency_loader.rb | lib/puppet/pops/loader/dependency_loader.rb | # frozen_string_literal: true
# =DependencyLoader
# This loader provides visibility into a set of other loaders. It is used as a child of a ModuleLoader (or other
# loader) to make its direct dependencies visible for loading from contexts that have access to this dependency loader.
# Access is typically given to logic... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/puppet_function_instantiator.rb | lib/puppet/pops/loader/puppet_function_instantiator.rb | # frozen_string_literal: true
module Puppet::Pops
module Loader
# The PuppetFunctionInstantiator instantiates a Puppet::Functions::PuppetFunction given a Puppet Programming language
# source that when called evaluates the Puppet logic it contains.
#
class PuppetFunctionInstantiator
# Produces an instance of the Func... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/module_loaders.rb | lib/puppet/pops/loader/module_loaders.rb | # frozen_string_literal: true
module Puppet::Pops
module Loader
# =ModuleLoaders
# A ModuleLoader loads items from a single module.
# The ModuleLoaders (ruby) module contains various such loaders. There is currently one concrete
# implementation, ModuleLoaders::FileBased that loads content from the file system.
# Othe... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/generic_plan_instantiator.rb | lib/puppet/pops/loader/generic_plan_instantiator.rb | # frozen_string_literal: true
module Puppet::Pops
module Loader
# The GenericPlanInstantiator dispatches to either PuppetPlanInstantiator or a
# yaml_plan_instantiator injected through the Puppet context, depending on
# the type of the plan.
#
class GenericPlanInstantiator
def self.create(loader, typed_name, source_... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/ruby_data_type_instantiator.rb | lib/puppet/pops/loader/ruby_data_type_instantiator.rb | # frozen_string_literal: true
# The RubyTypeInstantiator instantiates a data type from the ruby source
# that calls Puppet::DataTypes.create_type.
#
class Puppet::Pops::Loader::RubyDataTypeInstantiator
# Produces an instance of class derived from PAnyType class with the given typed_name, or fails with an error if th... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb | lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb | # frozen_string_literal: true
module Puppet::Pops
module Loader
# The PuppetResourceTypeImplInstantiator instantiates a Puppet::Pops::ResourceTypeImpl object.
# given a Puppet Programming language source that when called evaluates the Puppet logic it contains.
#
class PuppetResourceTypeImplInstantiator
# Produces an... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/loader.rb | lib/puppet/pops/loader/loader.rb | # frozen_string_literal: true
# Loader
# ===
# A Loader is responsible for loading "entities" ("instantiable and executable objects in the puppet language" which
# are type, hostclass, definition, function, and bindings.
#
# The main method for users of a Loader is the `load` or `load_typed methods`, which returns a p... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/simple_environment_loader.rb | lib/puppet/pops/loader/simple_environment_loader.rb | # frozen_string_literal: true
# SimpleEnvironmentLoader
# ===
# This loader does not load anything and it is populated by the bootstrapping logic that loads
# the site.pp or equivalent for an environment. It does not restrict the names of what it may contain,
# and what is loaded here overrides any child loaders (modu... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/task_instantiator.rb | lib/puppet/pops/loader/task_instantiator.rb | # frozen_string_literal: true
# The TypeDefinitionInstantiator instantiates a type alias or a type definition
#
require_relative '../../../puppet/module/task'
module Puppet::Pops
module Loader
class TaskInstantiator
def self.create(loader, typed_name, source_refs)
name = typed_name.name
basename = typed_name... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/loader_paths.rb | lib/puppet/pops/loader/loader_paths.rb | # frozen_string_literal: true
# LoaderPaths
# ===
# The central loader knowledge about paths, what they represent and how to instantiate from them.
# Contains helpers (*smart paths*) to deal with lazy resolution of paths.
#
# TODO: Currently only supports loading of functions (2 kinds)
#
module Puppet::Pops
module Loa... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/gem_support.rb | lib/puppet/pops/loader/gem_support.rb | # frozen_string_literal: true
# GemSupport offers methods to find a gem's location by name or gem://gemname URI.
#
# TODO: The Puppet 3x, uses Puppet::Util::RubyGems to do this, and obtain paths, and avoids using ::Gems
# when ::Bundler is in effect. A quick check what happens on Ruby 1.8.7 and Ruby 1.9.3 with current... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/type_definition_instantiator.rb | lib/puppet/pops/loader/type_definition_instantiator.rb | # frozen_string_literal: true
# The TypeDefinitionInstantiator instantiates a type alias or a type definition
#
module Puppet::Pops
module Loader
class TypeDefinitionInstantiator
def self.create(loader, typed_name, source_ref, pp_code_string)
# parse and validate
parser = Parser::EvaluatingParser.new()
m... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/runtime3_type_loader.rb | lib/puppet/pops/loader/runtime3_type_loader.rb | # frozen_string_literal: true
module Puppet::Pops
module Loader
# Runtime3TypeLoader
# ===
# Loads a resource type using the 3.x type loader
#
# @api private
class Runtime3TypeLoader < BaseLoader
attr_reader :resource_3x_loader
def initialize(parent_loader, loaders, environment, resource_3x_loader)
super(pare... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/base_loader.rb | lib/puppet/pops/loader/base_loader.rb | # frozen_string_literal: true
module Puppet::Pops
module Loader
# BaseLoader
# ===
# An abstract implementation of Loader
#
# A derived class should implement `find(typed_name)` and set entries, and possible handle "miss caching".
#
# @api private
#
class BaseLoader < Loader
# The parent loader
attr_reader :parent... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/ruby_function_instantiator.rb | lib/puppet/pops/loader/ruby_function_instantiator.rb | # frozen_string_literal: true
# The RubyFunctionInstantiator instantiates a Puppet::Functions::Function given the ruby source
# that calls Puppet::Functions.create_function.
#
class Puppet::Pops::Loader::RubyFunctionInstantiator
# Produces an instance of the Function class with the given typed_name, or fails with an... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/predefined_loader.rb | lib/puppet/pops/loader/predefined_loader.rb | # frozen_string_literal: true
module Puppet::Pops::Loader
# A PredefinedLoader is a loader that is manually populated with loaded elements
# before being used. It never loads anything on its own.
#
class PredefinedLoader < BaseLoader
def find(typed_name)
nil
end
def to_s
"(PredefinedLoader '#{loader_nam... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/uri_helper.rb | lib/puppet/pops/loader/uri_helper.rb | # frozen_string_literal: true
module Puppet::Pops::Loader::UriHelper
# Raises an exception if specified gem can not be located
#
def path_for_uri(uri, subdir = 'lib')
case uri.scheme
when "gem"
begin
spec = Gem::Specification.find_by_name(uri.hostname)
# if path given append that, e... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/typed_name.rb | lib/puppet/pops/loader/typed_name.rb | # frozen_string_literal: true
module Puppet::Pops
module Loader
# A namespace/name/type combination that can be used as a compound hash key
#
# @api public
class TypedName
attr_reader :hash
attr_reader :type
attr_reader :name_authority
attr_reader :name
attr_reader :name_parts
attr_reader :compound_name
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb | lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb | # frozen_string_literal: true
# The RubyLegacyFunctionInstantiator instantiates a Puppet::Functions::Function given the ruby source
# that calls Puppet::Functions.create_function.
#
require 'ripper'
class Puppet::Pops::Loader::RubyLegacyFunctionInstantiator
UNKNOWN = '<unknown>'
# Produces an instance of the Func... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/model/model_tree_dumper.rb | lib/puppet/pops/model/model_tree_dumper.rb | # frozen_string_literal: true
# Dumps a Pops::Model in reverse polish notation; i.e. LISP style
# The intention is to use this for debugging output
# TODO: BAD NAME - A DUMP is a Ruby Serialization
#
class Puppet::Pops::Model::ModelTreeDumper < Puppet::Pops::Model::TreeDumper
def dump_Array o
o.collect { |e| do_... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/model/tree_dumper.rb | lib/puppet/pops/model/tree_dumper.rb | # frozen_string_literal: true
# Base class for formatted textual dump of a "model"
#
class Puppet::Pops::Model::TreeDumper
attr_accessor :indent_count
def initialize initial_indentation = 0
@@dump_visitor ||= Puppet::Pops::Visitor.new(nil, "dump", 0, 0)
@indent_count = initial_indentation
end
def dum... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/model/ast_transformer.rb | lib/puppet/pops/model/ast_transformer.rb | # frozen_string_literal: true
require_relative '../../../puppet/parser/ast'
# The receiver of `import(file)` calls; once per imported file, or nil if imports are ignored
#
# Transforms a Pops::Model to classic Puppet AST.
# TODO: Documentation is currently skipped completely (it is only used for Rdoc)
#
class Puppet:... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/model/pn_transformer.rb | lib/puppet/pops/model/pn_transformer.rb | # frozen_string_literal: true
require_relative '../../../puppet/concurrent/thread_local_singleton'
module Puppet::Pops
module Model
class PNTransformer
extend Puppet::Concurrent::ThreadLocalSingleton
def self.transform(ast)
singleton.transform(ast)
end
def initialize
@visitor = Visitor.new(nil, 'tra... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/model/factory.rb | lib/puppet/pops/model/factory.rb | # frozen_string_literal: true
# Factory is a helper class that makes construction of a Pops Model
# much more convenient. It can be viewed as a small internal DSL for model
# constructions.
# For usage see tests using the factory.
#
# @todo All those uppercase methods ... they look bad in one way, but stand out nicely... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | true |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/model/model_label_provider.rb | lib/puppet/pops/model/model_label_provider.rb | # frozen_string_literal: true
module Puppet::Pops
module Model
# A provider of labels for model object, producing a human name for the model object.
# As an example, if object is an ArithmeticExpression with operator +, `#a_an(o)` produces "a '+' Expression",
# #the(o) produces "the + Expression", and #label produces ... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/model/ast.rb | lib/puppet/pops/model/ast.rb | # frozen_string_literal: true
# # Generated by Puppet::Pops::Types::RubyGenerator from TypeSet Puppet::AST on -4712-01-01
module Puppet
module Pops
module Model
class PopsObject
def self._pcore_type
@_pcore_type ||= Types::PObjectType.new('Puppet::AST::PopsObject', {
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | true |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/data_provider.rb | lib/puppet/pops/lookup/data_provider.rb | # frozen_string_literal: true
module Puppet::Pops
module Lookup
# @api private
module DataProvider
def self.key_type
@key_type
end
def self.value_type
@value_type
end
def self.register_types(loader)
tp = Types::TypeParser.singleton
@key_type = tp.parse('RichDataKey', loader)
@value_type... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/function_provider.rb | lib/puppet/pops/lookup/function_provider.rb | # frozen_string_literal: true
require_relative 'data_adapter'
require_relative 'context'
require_relative 'data_provider'
module Puppet::Pops
module Lookup
# @api private
class FunctionProvider
include DataProvider
attr_reader :parent_data_provider, :function_name, :locations
# Returns the type that all the r... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/interpolation.rb | lib/puppet/pops/lookup/interpolation.rb | # frozen_string_literal: true
require 'hiera/scope'
require_relative 'sub_lookup'
module Puppet::Pops
module Lookup
# Adds support for interpolation expressions. The expressions may contain keys that uses dot-notation
# to further navigate into hashes and arrays
#
# @api public
module Interpolation
include SubLookup... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/global_data_provider.rb | lib/puppet/pops/lookup/global_data_provider.rb | # frozen_string_literal: true
require 'hiera/scope'
require_relative 'configured_data_provider'
module Puppet::Pops
module Lookup
# @api private
class GlobalDataProvider < ConfiguredDataProvider
def place
'Global'
end
def unchecked_key_lookup(key, lookup_invocation, merge)
config = config(lookup_invoca... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/data_dig_function_provider.rb | lib/puppet/pops/lookup/data_dig_function_provider.rb | # frozen_string_literal: true
require_relative 'function_provider'
module Puppet::Pops
module Lookup
# @api private
class DataDigFunctionProvider < FunctionProvider
TAG = 'data_dig'
# Performs a lookup with the assumption that a recursive check has been made.
#
# @param key [LookupKey] The key to lookup
# ... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/lookup_key_function_provider.rb | lib/puppet/pops/lookup/lookup_key_function_provider.rb | # frozen_string_literal: true
require_relative 'function_provider'
module Puppet::Pops
module Lookup
# @api private
class LookupKeyFunctionProvider < FunctionProvider
TAG = 'lookup_key'
# Performs a lookup with the assumption that a recursive check has been made.
#
# @param key [LookupKey] The key to lookup
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/lookup_adapter.rb | lib/puppet/pops/lookup/lookup_adapter.rb | # frozen_string_literal: true
require_relative 'data_adapter'
require_relative 'lookup_key'
module Puppet::Pops
module Lookup
# A LookupAdapter is a specialized DataAdapter that uses its hash to store data providers. It also remembers the compiler
# that it is attached to and maintains a cache of _lookup options_ ret... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/lookup_key.rb | lib/puppet/pops/lookup/lookup_key.rb | # frozen_string_literal: true
require_relative 'sub_lookup'
module Puppet::Pops
module Lookup
# @api private
class LookupKey
include SubLookup
attr_reader :module_name, :root_key, :segments
def initialize(key)
segments = split_key(key) { |problem| Puppet::DataBinding::LookupError.new(_("%{problem} in key:... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/environment_data_provider.rb | lib/puppet/pops/lookup/environment_data_provider.rb | # frozen_string_literal: true
require_relative 'configured_data_provider'
module Puppet::Pops
module Lookup
# @api private
class EnvironmentDataProvider < ConfiguredDataProvider
def place
'Environment'
end
protected
def assert_config_version(config)
if config.version > 3
config
else
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/hiera_config.rb | lib/puppet/pops/lookup/hiera_config.rb | # frozen_string_literal: true
require_relative 'data_dig_function_provider'
require_relative 'data_hash_function_provider'
require_relative 'lookup_key_function_provider'
require_relative 'location_resolver'
module Puppet::Pops
module Lookup
# @api private
class ScopeLookupCollectingInvocation < Invocation
def init... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/key_recorder.rb | lib/puppet/pops/lookup/key_recorder.rb | # frozen_string_literal: true
# This class defines the private API of the Lookup Key Recorder support.
# @api private
#
class Puppet::Pops::Lookup::KeyRecorder
def initialize
end
# rubocop:disable Naming/MemoizedInstanceVariableName
def self.singleton
@null_recorder ||= new
end
# rubocop:enable Naming... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/sub_lookup.rb | lib/puppet/pops/lookup/sub_lookup.rb | # frozen_string_literal: true
module Puppet::Pops
module Lookup
module SubLookup
SPECIAL = /['".]/
# Split key into segments. A segment may be a quoted string (both single and double quotes can
# be used) and the segment separator is the '.' character. Whitespace will be trimmed off on
# both sides of each se... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/explainer.rb | lib/puppet/pops/lookup/explainer.rb | # frozen_string_literal: true
module Puppet::Pops
module Lookup
# The ExplainNode contains information of a specific node in a tree traversed during
# lookup. The tree can be traversed using the `parent` and `branches` attributes of
# each node.
#
# Each leaf node contains information about what happened whe... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/data_hash_function_provider.rb | lib/puppet/pops/lookup/data_hash_function_provider.rb | # frozen_string_literal: true
require_relative 'function_provider'
require_relative 'interpolation'
module Puppet::Pops
module Lookup
# @api private
class DataHashFunctionProvider < FunctionProvider
include SubLookup
include Interpolation
TAG = 'data_hash'
def self.trusted_return_type
@trusted_return_ty... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/invocation.rb | lib/puppet/pops/lookup/invocation.rb | # frozen_string_literal: true
require_relative '../../../puppet/thread_local'
require_relative 'explainer'
module Puppet::Pops
module Lookup
# @api private
class Invocation
attr_reader :scope, :override_values, :default_values, :explainer, :module_name, :top_key, :adapter_class
def self.current
(@current ||... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/context.rb | lib/puppet/pops/lookup/context.rb | # frozen_string_literal: true
require_relative 'interpolation'
module Puppet::Pops
module Lookup
# The EnvironmentContext is adapted to the current environment
#
class EnvironmentContext < Adaptable::Adapter
class FileData
attr_reader :data
def initialize(path, inode, mtime, size, data)
@path = path
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/module_data_provider.rb | lib/puppet/pops/lookup/module_data_provider.rb | # frozen_string_literal: true
require_relative 'configured_data_provider'
module Puppet::Pops
module Lookup
# @api private
class ModuleDataProvider < ConfiguredDataProvider
attr_reader :module_name
def initialize(module_name, config = nil)
super(config)
@module_name = module_name
end
def place
'... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/data_adapter.rb | lib/puppet/pops/lookup/data_adapter.rb | # frozen_string_literal: true
module Puppet::Pops
module Lookup
# A class that adapts a Hash
# @api private
class DataAdapter < Adaptable::Adapter
def self.create_adapter(o)
new
end
def initialize
@data = {}
end
def [](name)
@data[name]
end
def include?(name)
@data.include? name
end
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/location_resolver.rb | lib/puppet/pops/lookup/location_resolver.rb | # frozen_string_literal: true
require 'pathname'
require_relative 'interpolation'
module Puppet::Pops
module Lookup
# Class that keeps track of the original location (as it appears in the declaration, before interpolation),
# and the fully resolved location, and whether or not the resolved location exists.
#
... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/lookup/configured_data_provider.rb | lib/puppet/pops/lookup/configured_data_provider.rb | # frozen_string_literal: true
require_relative 'hiera_config'
require_relative 'data_provider'
module Puppet::Pops
module Lookup
# @api private
class ConfiguredDataProvider
include DataProvider
# @param config [HieraConfig,nil] the configuration
def initialize(config = nil)
@config = config.nil? ? nil : as... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/puppet_proc.rb | lib/puppet/pops/evaluator/puppet_proc.rb | # frozen_string_literal: true
# Complies with Proc API by mapping a Puppet::Pops::Evaluator::Closure to a ruby Proc.
# Creating and passing an instance of this class instead of just a plain block makes
# it possible to inherit the parameter info and arity from the closure. Advanced users
# may also access the closure ... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/collector_transformer.rb | lib/puppet/pops/evaluator/collector_transformer.rb | # frozen_string_literal: true
module Puppet::Pops
module Evaluator
class CollectorTransformer
def initialize
@@query_visitor ||= Visitor.new(nil, "query", 1, 1)
@@match_visitor ||= Visitor.new(nil, "match", 1, 1)
@@evaluator ||= EvaluatorImpl.new
@@compare_operator ||= CompareOperator.ne... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/runtime3_converter.rb | lib/puppet/pops/evaluator/runtime3_converter.rb | # frozen_string_literal: true
module Puppet::Pops::Evaluator
# Converts nested 4x supported values to 3x values. This is required because
# resources and other objects do not know about the new type system, and does not support
# regular expressions. Unfortunately this has to be done for array and hash as well.
# A co... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/literal_evaluator.rb | lib/puppet/pops/evaluator/literal_evaluator.rb | # frozen_string_literal: true
module Puppet::Pops
module Evaluator
# Literal values for
# String (not containing interpolation)
# Numbers
# Booleans
# Undef (produces nil)
# Array
# Hash
# QualifiedName
# Default (produced :default)
# Regular Expression (produces ruby regular expression)
# QualifiedReference
# AccessE... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/external_syntax_support.rb | lib/puppet/pops/evaluator/external_syntax_support.rb | # frozen_string_literal: true
# This module is an integral part of the evaluator. It deals with the concern of validating
# external syntax in text produced by heredoc and templates.
#
require_relative '../../../puppet/plugins/syntax_checkers'
module Puppet::Pops::Evaluator::ExternalSyntaxSupport
def assert_external... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/access_operator.rb | lib/puppet/pops/evaluator/access_operator.rb | # frozen_string_literal: true
module Puppet::Pops
module Evaluator
# AccessOperator handles operator []
# This operator is part of evaluation.
#
class AccessOperator
# Provides access to the Puppet 3.x runtime (scope, etc.)
# This separation has been made to make it easier to later migrate the evaluator to an impr... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/evaluator_impl.rb | lib/puppet/pops/evaluator/evaluator_impl.rb | # frozen_string_literal: true
require_relative '../../../puppet/parser/scope'
require_relative '../../../puppet/pops/evaluator/compare_operator'
require_relative '../../../puppet/pops/evaluator/relationship_operator'
require_relative '../../../puppet/pops/evaluator/access_operator'
require_relative '../../../puppet/po... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | true |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/runtime3_support.rb | lib/puppet/pops/evaluator/runtime3_support.rb | # frozen_string_literal: true
module Puppet::Pops
module Evaluator
# A module with bindings between the new evaluator and the 3x runtime.
# The intention is to separate all calls into scope, compiler, resource, etc. in this module
# to make it easier to later refactor the evaluator for better implementations of the 3x... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/epp_evaluator.rb | lib/puppet/pops/evaluator/epp_evaluator.rb | # frozen_string_literal: true
# Handler of Epp call/evaluation from the epp and inline_epp functions
#
class Puppet::Pops::Evaluator::EppEvaluator
def self.inline_epp(scope, epp_source, template_args = nil)
unless epp_source.is_a?(String)
# TRANSLATORS 'inline_epp()' is a method name and 'epp' refers to 'E... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb | lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb | # frozen_string_literal: true
# Literal values for
#
# * String
# * Numbers
# * Booleans
# * Undef (produces nil)
# * Array
# * Hash where keys must be Strings
# * QualifiedName
#
# Not considered literal:
#
# * QualifiedReference # i.e. File, FooBar
# * Default is not accepted as being literal
# ... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/deferred_resolver.rb | lib/puppet/pops/evaluator/deferred_resolver.rb | # frozen_string_literal: true
require_relative '../../../puppet/parser/script_compiler'
module Puppet::Pops
module Evaluator
class DeferredValue
def initialize(proc)
@proc = proc
end
def resolve
val = @proc.call
# Deferred sensitive values will be marked as such in resolve_futures()
if val.is_a... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/closure.rb | lib/puppet/pops/evaluator/closure.rb | # frozen_string_literal: true
module Puppet::Pops
module Evaluator
class Jumper < Exception # rubocop:disable Lint/InheritException
attr_reader :value
attr_reader :file
attr_reader :line
def initialize(value, file, line)
@value = value
@file = file
@line = line
end
end
cla... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/compare_operator.rb | lib/puppet/pops/evaluator/compare_operator.rb | # frozen_string_literal: true
module Puppet::Pops
module Evaluator
# Compares the puppet DSL way
#
# ==Equality
# All string vs. numeric equalities check for numeric equality first, then string equality
# Arrays are equal to arrays if they have the same length, and each element #equals
# Hashes are equal to hashes if... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/runtime3_resource_support.rb | lib/puppet/pops/evaluator/runtime3_resource_support.rb | # frozen_string_literal: true
module Puppet::Pops
module Evaluator
# @api private
module Runtime3ResourceSupport
CLASS_STRING = 'class'
def self.create_resources(file, line, scope, virtual, exported, type_name, resource_titles, evaluated_parameters)
env = scope.environment
# loader = Adapters::LoaderAd... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/relationship_operator.rb | lib/puppet/pops/evaluator/relationship_operator.rb | # frozen_string_literal: true
module Puppet::Pops
module Evaluator
# The RelationshipOperator implements the semantics of the -> <- ~> <~ operators creating relationships or notification
# relationships between the left and right hand side's references to resources.
#
# This is separate class since a second level of e... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/callable_signature.rb | lib/puppet/pops/evaluator/callable_signature.rb | # frozen_string_literal: true
# CallableSignature
# ===
# A CallableSignature describes how something callable expects to be called.
# Different implementation of this class are used for different types of callables.
#
# @api public
#
class Puppet::Pops::Evaluator::CallableSignature
# Returns the names of the parame... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/collectors/catalog_collector.rb | lib/puppet/pops/evaluator/collectors/catalog_collector.rb | # frozen_string_literal: true
class Puppet::Pops::Evaluator::Collectors::CatalogCollector < Puppet::Pops::Evaluator::Collectors::AbstractCollector
# Creates a CatalogCollector using the AbstractCollector's
# constructor to set the scope and overrides
#
# param [Puppet::CompilableResourceType] type the resource... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/collectors/exported_collector.rb | lib/puppet/pops/evaluator/collectors/exported_collector.rb | # frozen_string_literal: true
class Puppet::Pops::Evaluator::Collectors::ExportedCollector < Puppet::Pops::Evaluator::Collectors::AbstractCollector
# Creates an ExportedCollector using the AbstractCollector's
# constructor to set the scope and overrides
#
# param [Puppet::CompilableResourceType] type the resou... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/collectors/abstract_collector.rb | lib/puppet/pops/evaluator/collectors/abstract_collector.rb | # frozen_string_literal: true
class Puppet::Pops::Evaluator::Collectors::AbstractCollector
attr_reader :scope
# The collector's hash of overrides {:parameters => params}
attr_reader :overrides
# The set of collected resources
attr_reader :collected
# An empty array which will be returned by the unresolv... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
OpenVoxProject/openvox | https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops/evaluator/collectors/fixed_set_collector.rb | lib/puppet/pops/evaluator/collectors/fixed_set_collector.rb | # frozen_string_literal: true
class Puppet::Pops::Evaluator::Collectors::FixedSetCollector < Puppet::Pops::Evaluator::Collectors::AbstractCollector
# Creates a FixedSetCollector using the AbstractCollector constructor
# to set the scope. It is not possible for a collection to have
# overrides in this case, since... | ruby | Apache-2.0 | 9336df16a11679d701a2bd9ebe1308d4fb669f57 | 2026-01-04T17:47:45.967003Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.