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/property.rb
lib/puppet/property.rb
# frozen_string_literal: true # The virtual base class for properties, which are the self-contained building # blocks for actually doing work on the system. require_relative '../puppet' require_relative '../puppet/parameter' # The Property class is the implementation of a resource's attributes of _property_ kind. # ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/runtime.rb
lib/puppet/runtime.rb
# frozen_string_literal: true require_relative '../puppet/http' require_relative '../puppet/facter_impl' require 'singleton' # Provides access to runtime implementations. # # @api private class Puppet::Runtime include Singleton def initialize @runtime_services = { http: proc do klass = Puppet::...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/facter_impl.rb
lib/puppet/facter_impl.rb
# frozen_string_literal: true # # @api private # Default Facter implementation that delegates to Facter API # module Puppet class FacterImpl def initialize require 'facter' setup_logging end def value(fact_name) ::Facter.value(fact_name) end def add(name, &block) ::Fac...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/file_system.rb
lib/puppet/file_system.rb
# frozen_string_literal: true module Puppet::FileSystem require_relative '../puppet/util' require_relative 'file_system/path_pattern' require_relative 'file_system/file_impl' require_relative 'file_system/memory_file' require_relative 'file_system/memory_impl' require_relative 'file_system/uniquefile' #...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/thread_local.rb
lib/puppet/thread_local.rb
# frozen_string_literal: true require 'concurrent' class Puppet::ThreadLocal < Concurrent::ThreadLocalVar end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/environments.rb
lib/puppet/environments.rb
# frozen_string_literal: true require_relative '../puppet/concurrent/synchronized' # @api private module Puppet::Environments class EnvironmentNotFound < Puppet::Error def initialize(environment_name, original = nil) environmentpath = Puppet[:environmentpath] super("Could not find a directory enviro...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/compilable_resource_type.rb
lib/puppet/compilable_resource_type.rb
# frozen_string_literal: true require_relative '../puppet' # The CompilableResourceType module should be either included in a class or used as a class extension # to mark that the instance used as the 'resource type' of a resource instance # is an object that is compatible with Puppet::Type's API wrt. compiling. # Pup...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/module.rb
lib/puppet/module.rb
# frozen_string_literal: true require_relative '../puppet/util/logging' require_relative 'module/task' require_relative 'module/plan' require_relative '../puppet/util/json' require 'semantic_puppet/gem_version' # Support for modules class Puppet::Module class Error < Puppet::Error; end class MissingModule < Error...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/context.rb
lib/puppet/context.rb
# frozen_string_literal: true require_relative '../puppet/thread_local' # Puppet::Context is a system for tracking services and contextual information # that puppet needs to be able to run. Values are "bound" in a context when it is created # and cannot be changed; however a child context can be created, using # {#ov...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/defaults.rb
lib/puppet/defaults.rb
# frozen_string_literal: true require_relative '../puppet/util/platform' module Puppet def self.default_diffargs '-u' end # If you modify this, update puppet/type/file/checksum.rb too def self.default_digest_algorithm 'sha256' end def self.valid_digest_algorithms Puppet::Util::Platform.fips_...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/coercion.rb
lib/puppet/coercion.rb
# frozen_string_literal: true # Various methods used to coerce values into a canonical form. # # @api private module Puppet::Coercion # Try to coerce various input values into boolean true/false # # Only a very limited subset of values are allowed. This method does not try # to provide a generic "truthiness" s...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/functions.rb
lib/puppet/functions.rb
# frozen_string_literal: true # Functions in the puppet language can be written in Ruby and distributed in # puppet modules. The function is written by creating a file in the module's # `lib/puppet/functions/<modulename>` directory, where `<modulename>` is # replaced with the module's name. The file should have the na...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/info_service.rb
lib/puppet/info_service.rb
# frozen_string_literal: true module Puppet::InfoService require_relative 'info_service/class_information_service' require_relative 'info_service/task_information_service' require_relative 'info_service/plan_information_service' def self.classes_per_environment(env_file_hash) Puppet::InfoService::ClassInf...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/data_binding.rb
lib/puppet/data_binding.rb
# frozen_string_literal: true require_relative '../puppet/indirector' # A class for managing data lookups class Puppet::DataBinding # Set up indirection, so that data can be looked for in the compiler extend Puppet::Indirector indirects(:data_binding, :terminus_setting => :data_binding_terminus, ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/configurer.rb
lib/puppet/configurer.rb
# frozen_string_literal: true # The client for interacting with the puppetmaster config server. require 'timeout' require_relative '../puppet/util' require 'securerandom' # require 'puppet/parser/script_compiler' require_relative '../puppet/pops/evaluator/deferred_resolver' class Puppet::Configurer require_relative...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/application_support.rb
lib/puppet/application_support.rb
# frozen_string_literal: true require 'yaml' require_relative '../puppet' require_relative '../puppet/node/environment' require_relative '../puppet/file_system' require_relative '../puppet/indirector' module Puppet module ApplicationSupport # Pushes a Puppet Context configured with a remote environment for an ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/error.rb
lib/puppet/error.rb
# frozen_string_literal: true module Puppet # The base class for all Puppet errors. It can wrap another exception class Error < RuntimeError attr_accessor :original def initialize(message, original = nil) super(message.scrub) @original = original end end module ExternalFileError #...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/indirector.rb
lib/puppet/indirector.rb
# frozen_string_literal: true # Manage indirections to termini. They are organized in terms of indirections - # - e.g., configuration, node, file, certificate -- and each indirection has one # or more terminus types defined. The indirection is configured via the # +indirects+ method, which will be called by the clas...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/pops.rb
lib/puppet/pops.rb
# frozen_string_literal: true module Puppet # The Pops language system. This includes the parser, evaluator, AST model, and # Binder. # # @todo Explain how a user should use this to parse and evaluate the puppet # language. # # @note Warning: Pops is still considered experimental, as such the API may ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util.rb
lib/puppet/util.rb
# frozen_string_literal: true # A module to collect utility functions. require 'English' require_relative '../puppet/error' require_relative 'util/execution_stub' require 'uri' require 'pathname' require 'ostruct' require_relative 'util/platform' require_relative 'util/windows' require_relative 'util/symbolic_file_mo...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/confine.rb
lib/puppet/confine.rb
# frozen_string_literal: true # The class that handles testing whether our providers # actually work or not. require_relative '../puppet/util' class Puppet::Confine include Puppet::Util @tests = {} class << self attr_accessor :name end def self.inherited(klass) name = klass.to_s.split("::").pop.d...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/x509/pem_store.rb
lib/puppet/x509/pem_store.rb
# frozen_string_literal: true require_relative '../../puppet/x509' # Methods for managing PEM encoded files. While PEM encoded strings are # always ASCII, the files may contain user specified comments, so they are # UTF-8 encoded. # # @api private module Puppet::X509::PemStore # Load a pem encoded object. # # @...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/x509/cert_provider.rb
lib/puppet/x509/cert_provider.rb
# frozen_string_literal: true require_relative '../../puppet/x509' # Class for loading and saving cert related objects. By default the provider # loads and saves based on puppet's default settings, such as `Puppet[:localcacert]`. # The providers sets the permissions on files it saves, such as the private key. # All o...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/storage.rb
lib/puppet/util/storage.rb
# frozen_string_literal: true require 'yaml' require 'singleton' require_relative '../../puppet/util/yaml' # a class for storing state class Puppet::Util::Storage include Singleton include Puppet::Util def self.state @@state end def initialize self.class.load end # Return a hash that will be ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/reference.rb
lib/puppet/util/reference.rb
# frozen_string_literal: true require_relative '../../puppet/util/instance_loader' require 'fileutils' # Manage Reference Documentation. class Puppet::Util::Reference include Puppet::Util include Puppet::Util::Docs extend Puppet::Util::InstanceLoader instance_load(:reference, 'puppet/reference') def self...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/platform.rb
lib/puppet/util/platform.rb
# frozen_string_literal: true module Puppet module Util module Platform FIPS_STATUS_FILE = "/proc/sys/crypto/fips_enabled" WINDOWS_FIPS_REGISTRY_KEY = 'System\\CurrentControlSet\\Control\\Lsa\\FipsAlgorithmPolicy' def windows? # Ruby only sets File::ALT_SEPARATOR on Windows and the Rub...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/json_lockfile.rb
lib/puppet/util/json_lockfile.rb
# frozen_string_literal: true require_relative '../../puppet/util/lockfile' # This class provides a simple API for managing a lock file # whose contents are a serialized JSON object. In addition # to querying the basic state (#locked?) of the lock, managing # the lock (#lock, #unlock), the contents can be retrieved ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/watcher.rb
lib/puppet/util/watcher.rb
# frozen_string_literal: true module Puppet::Util::Watcher require_relative 'watcher/timer' require_relative 'watcher/change_watcher' require_relative 'watcher/periodic_watcher' module Common def self.file_ctime_change_watcher(filename) Puppet::Util::Watcher::ChangeWatcher.watch(lambda do Pu...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/limits.rb
lib/puppet/util/limits.rb
# frozen_string_literal: true require_relative '../../puppet/util' module Puppet::Util::Limits # @api private def setpriority(priority) return unless priority Process.setpriority(0, Process.pid, priority) rescue Errno::EACCES, NotImplementedError Puppet.warning(_("Failed to set process priority to ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/autoload.rb
lib/puppet/util/autoload.rb
# frozen_string_literal: true require 'pathname' require_relative '../../puppet/util/rubygems' require_relative '../../puppet/util/warnings' require_relative '../../puppet/pops/adaptable' require_relative '../../puppet/concurrent/synchronized' # An adapter that ties the module_directories cache to the environment whe...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/diff.rb
lib/puppet/util/diff.rb
# frozen_string_literal: true require 'tempfile' # Provide a diff between two strings. module Puppet::Util::Diff include Puppet::Util::Execution require 'tempfile' def diff(old, new) diff_cmd = Puppet[:diff] return '' unless diff_cmd && diff_cmd != "" command = [diff_cmd] args = Puppet[:diff_a...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/monkey_patches.rb
lib/puppet/util/monkey_patches.rb
# frozen_string_literal: true require_relative '../../puppet/util/platform' module Puppet::Util::MonkeyPatches end begin Process.maxgroups = 1024 rescue NotImplementedError # Actually, I just want to ignore it, since various platforms - JRuby, # Windows, and so forth - don't support it, but only because it isn...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/execution_stub.rb
lib/puppet/util/execution_stub.rb
# frozen_string_literal: true module Puppet::Util class ExecutionStub class << self # Set a stub block that Puppet::Util::Execution.execute() should invoke instead # of actually executing commands on the target machine. Intended # for spec testing. # # The arguments passed to the b...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/plist.rb
lib/puppet/util/plist.rb
# frozen_string_literal: true require 'cfpropertylist' if Puppet.features.cfpropertylist? require_relative '../../puppet/util/execution' module Puppet::Util::Plist class FormatError < RuntimeError; end # So I don't have to prepend every method name with 'self.' Most of the # methods are going to be Provider me...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/libuser.rb
lib/puppet/util/libuser.rb
# frozen_string_literal: true module Puppet::Util::Libuser def self.getconf File.expand_path('libuser.conf', __dir__) end def self.getenv newenv = {} newenv['LIBUSER_CONF'] = getconf newenv 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/util/http_proxy.rb
lib/puppet/util/http_proxy.rb
# frozen_string_literal: true require_relative '../../puppet/http' # for backwards compatibility Puppet::Util::HttpProxy = Puppet::HTTP::Proxy
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/errors.rb
lib/puppet/util/errors.rb
# frozen_string_literal: true # Some helper methods for throwing and populating errors. # # @api public module Puppet::Util::Errors # Throw a Puppet::DevError with the specified message. Used for unknown or # internal application failures. # # @param msg [String] message used in raised error # @raise [Puppe...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/lockfile.rb
lib/puppet/util/lockfile.rb
# frozen_string_literal: true # This class provides a simple API for managing a lock file # whose contents are an (optional) String. In addition # to querying the basic state (#locked?) of the lock, managing # the lock (#lock, #unlock), the contents can be retrieved at # any time while the lock is held (#lock_data). ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/profiler.rb
lib/puppet/util/profiler.rb
# frozen_string_literal: true require 'benchmark' # A simple profiling callback system. # # @api public module Puppet::Util::Profiler require_relative 'profiler/wall_clock' require_relative 'profiler/object_counts' require_relative 'profiler/around_profiler' @profiler = Puppet::Util::Profiler::AroundProfiler...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/at_fork.rb
lib/puppet/util/at_fork.rb
# frozen_string_literal: true require_relative '../../puppet' # A module for building AtFork handlers. These handlers are objects providing # pre/post fork callbacks modeled after those registered by the `pthread_atfork` # function. # Currently there are two AtFork handler implementations: # - a noop implementation u...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/filetype.rb
lib/puppet/util/filetype.rb
# frozen_string_literal: true # Basic classes for reading, writing, and emptying files. Not much # to see here. require_relative '../../puppet/util/selinux' require 'tempfile' require 'fileutils' class Puppet::Util::FileType attr_accessor :loaded, :path, :synced class FileReadError < Puppet::Error; end incl...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/instance_loader.rb
lib/puppet/util/instance_loader.rb
# frozen_string_literal: true require_relative '../../puppet/util/autoload' require_relative '../../puppet/util' require_relative '../../puppet/concurrent/lock' # A module that can easily autoload things for us. Uses an instance # of Puppet::Util::Autoload module Puppet::Util::InstanceLoader include Puppet::Util ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/package.rb
lib/puppet/util/package.rb
# frozen_string_literal: true module Puppet::Util::Package def versioncmp(version_a, version_b, ignore_trailing_zeroes = false) vre = /[-.]|\d+|[^-.\d]+/ if ignore_trailing_zeroes version_a = normalize(version_a) version_b = normalize(version_b) end ax = version_a.scan(vre) bx = ver...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/rdoc.rb
lib/puppet/util/rdoc.rb
# frozen_string_literal: true require_relative '../../puppet/util' module Puppet::Util::RDoc module_function # launch a rdoc documentation process # with the files/dir passed in +files+ def rdoc(outputdir, files, charset = nil) # then rdoc require 'rdoc/rdoc' require 'rdoc/options' # load our...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/log.rb
lib/puppet/util/log.rb
# frozen_string_literal: true require_relative '../../puppet/util/tagging' require_relative '../../puppet/util/classgen' require_relative '../../puppet/util/psych_support' require_relative '../../puppet/network/format_support' # Pass feedback to the user. Log levels are modeled after syslog's, and it is # expected t...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/docs.rb
lib/puppet/util/docs.rb
# frozen_string_literal: true # Some simple methods for helping manage automatic documentation generation. module Puppet::Util::Docs # Specify the actual doc string. def desc(str) @doc = str end # Add a new autodoc block. We have to define these as class methods, # rather than just sticking them in a h...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/logging.rb
lib/puppet/util/logging.rb
# frozen_string_literal: true # A module to make logging a bit easier. require_relative '../../puppet/util/log' require_relative '../../puppet/error' module Puppet::Util module Logging def send_log(level, message) Puppet::Util::Log.create({ :level => level, :source => log_source, :message => message }.merge(log...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/inifile.rb
lib/puppet/util/inifile.rb
# frozen_string_literal: true # Module Puppet::IniConfig # A generic way to parse .ini style files and manipulate them in memory # One 'file' can be made up of several physical files. Changes to sections # on the file are tracked so that only the physical files in which # something has changed are written back to disk...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/warnings.rb
lib/puppet/util/warnings.rb
# frozen_string_literal: true # Methods to help with handling warnings. module Puppet::Util::Warnings module_function def notice_once(msg) Puppet::Util::Warnings.maybe_log(msg, self.class) { Puppet.notice msg } end def debug_once(msg) return nil unless Puppet[:debug] Puppet::Util::Warnings.maybe...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/yaml.rb
lib/puppet/util/yaml.rb
# frozen_string_literal: true require 'yaml' module Puppet::Util::Yaml YamlLoadExceptions = [::StandardError, ::Psych::Exception] class YamlLoadError < Puppet::Error; end # Safely load the content as YAML. By default only the following # classes can be deserialized: # # * TrueClass # * FalseClass # ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/selinux.rb
lib/puppet/util/selinux.rb
# frozen_string_literal: true # Provides utility functions to help interface Puppet to SELinux. # # This requires the very new SELinux Ruby bindings. These bindings closely # mirror the SELinux C library interface. # # Support for the command line tools is not provided because the performance # was abysmal. At this ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/feature.rb
lib/puppet/util/feature.rb
# frozen_string_literal: true require_relative '../../puppet' require_relative '../../puppet/util/warnings' class Puppet::Util::Feature include Puppet::Util::Warnings attr_reader :path # Create a new feature test. You have to pass the feature name, and it must be # unique. You can pass a block to determine ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/resource_template.rb
lib/puppet/util/resource_template.rb
# frozen_string_literal: true require_relative '../../puppet/util' require_relative '../../puppet/util/logging' require 'erb' # A template wrapper that evaluates a template in the # context of a resource, allowing the resource attributes # to be looked up from within the template. # This provides functionality essen...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/json.rb
lib/puppet/util/json.rb
# frozen_string_literal: true module Puppet::Util module Json class ParseError < StandardError attr_reader :cause, :data def self.build(original_exception, data) new(original_exception.message).tap do |exception| exception.instance_eval do @cause = original_exception ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/suidmanager.rb
lib/puppet/util/suidmanager.rb
# frozen_string_literal: true require_relative '../../puppet/util/warnings' require 'forwardable' require 'etc' module Puppet::Util::SUIDManager include Puppet::Util::Warnings extend Forwardable # Note groups= is handled specially due to a bug in OS X 10.6, 10.7, # and probably upcoming releases... to_dele...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/psych_support.rb
lib/puppet/util/psych_support.rb
# frozen_string_literal: true # This module should be included when a class can be serialized to yaml and # needs to handle the deserialization from Psych with more control. Psych normally # pokes values directly into an instance using `instance_variable_set` which completely # bypasses encapsulation. # # The class th...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/metaid.rb
lib/puppet/util/metaid.rb
# frozen_string_literal: true class Object # The hidden singleton lurks behind everyone def singleton_class; class << self; self; end; end def meta_eval(&blk); singleton_class.instance_eval(&blk); end # Adds methods to a singleton_class def meta_def(name, &blk) meta_eval { define_method name, &blk } e...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/tag_set.rb
lib/puppet/util/tag_set.rb
# frozen_string_literal: true require 'set' require_relative '../../puppet/network/format_support' class Puppet::Util::TagSet < Set include Puppet::Network::FormatSupport def self.from_yaml(yaml) new(Puppet::Util::Yaml.safe_load(yaml, [Symbol])) end def to_yaml @hash.keys.to_yaml end def self.f...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/symbolic_file_mode.rb
lib/puppet/util/symbolic_file_mode.rb
# frozen_string_literal: true require_relative '../../puppet/util' module Puppet module Util module SymbolicFileMode SetUIDBit = ReadBit = 4 SetGIDBit = WriteBit = 2 StickyBit = ExecBit = 1 SymbolicMode = { 'x' => ExecBit, 'w' => WriteBit, 'r' => ReadBit } SymbolicSpecialToBit = { 't' => { 'u' => Stic...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/classgen.rb
lib/puppet/util/classgen.rb
# frozen_string_literal: true module Puppet class ConstantAlreadyDefined < Error; end class SubclassAlreadyDefined < Error; end end # This is a utility module for generating classes. # @api public # module Puppet::Util::ClassGen include Puppet::Util # Create a new class. # @param name [String] the name of ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/fileparsing.rb
lib/puppet/util/fileparsing.rb
# frozen_string_literal: true # A mini-language for parsing files. This is only used file the ParsedFile # provider, but it makes more sense to split it out so it's easy to maintain # in one place. # # You can use this module to create simple parser/generator classes. For instance, # the following parser should go m...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/rubygems.rb
lib/puppet/util/rubygems.rb
# frozen_string_literal: true require_relative '../../puppet/util' module Puppet::Util::RubyGems # Base/factory class for rubygems source. These classes introspec into # rubygems to in order to list where the rubygems system will look for files # to load. class Source class << self # @api private ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/file_watcher.rb
lib/puppet/util/file_watcher.rb
# frozen_string_literal: true class Puppet::Util::FileWatcher include Enumerable def each(&blk) @files.keys.each(&blk) end def initialize @files = {} end def changed? @files.values.any?(&:changed?) end def watch(filename) return if watching?(filename) @files[filename] = Puppet:...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/user_attr.rb
lib/puppet/util/user_attr.rb
# frozen_string_literal: true class UserAttr def self.get_attributes_by_name(name) attributes = nil File.readlines('/etc/user_attr').each do |line| next if line =~ /^#/ token = line.split(':') next unless token[0] == name attributes = { :name => name } token[4].split(';').ea...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/terminal.rb
lib/puppet/util/terminal.rb
# frozen_string_literal: true module Puppet::Util::Terminal # Attempts to determine the width of the terminal. This is currently only # supported on POSIX systems, and relies on the claims of `stty` (or `tput`). # # Inspired by code from Thor; thanks wycats! # @return [Number] The column width of the termin...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/pidlock.rb
lib/puppet/util/pidlock.rb
# frozen_string_literal: true require 'fileutils' require_relative '../../puppet/util/lockfile' class Puppet::Util::Pidlock def initialize(lockfile) @lockfile = Puppet::Util::Lockfile.new(lockfile) end def locked? clear_if_stale @lockfile.locked? end def mine? Process.pid == lock_pid end...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/splayer.rb
lib/puppet/util/splayer.rb
# frozen_string_literal: true # Handle splay options (sleeping for a random interval before executing) module Puppet::Util::Splayer # Have we splayed already? def splayed? !!@splayed end # Sleep when splay is enabled; else just return. def splay(do_splay = Puppet[:splay]) return unless do_splay ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/command_line.rb
lib/puppet/util/command_line.rb
# frozen_string_literal: true # Bundler and rubygems maintain a set of directories from which to # load gems. If Bundler is loaded, let it determine what can be # loaded. If it's not loaded, then use rubygems. But do this before # loading any puppet code, so that our gem loading system is sane. unless defined? ::Bundl...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/ldap.rb
lib/puppet/util/ldap.rb
# frozen_string_literal: true module Puppet::Util::Ldap end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/execution.rb
lib/puppet/util/execution.rb
# frozen_string_literal: true require 'timeout' require_relative '../../puppet/file_system/uniquefile' module Puppet require 'rbconfig' require_relative '../../puppet/error' # A command failed to execute. # @api public class ExecutionFailure < Puppet::Error end end # This module defines methods for exec...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/multi_match.rb
lib/puppet/util/multi_match.rb
# frozen_string_literal: true # MultiMatch allows multiple values to be tested at once in a case expression. # This class is needed since Array does not implement the === operator to mean # "each v === other.each v". # # This class is useful in situations when the Puppet Type System cannot be used # (e.g. in Logging, ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/provider_features.rb
lib/puppet/util/provider_features.rb
# frozen_string_literal: true # Provides feature definitions. require_relative '../../puppet/util/docs' require_relative '../../puppet/util' # This module models provider features and handles checking whether the features # are present. # @todo Unclear what is api and what is private in this module. # module Puppet::U...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/skip_tags.rb
lib/puppet/util/skip_tags.rb
# frozen_string_literal: true require_relative '../../puppet/util/tagging' class Puppet::Util::SkipTags include Puppet::Util::Tagging def initialize(stags) self.tags = stags unless defined?(@tags) end def split_qualified_tags? false 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/util/network_device.rb
lib/puppet/util/network_device.rb
# frozen_string_literal: true class Puppet::Util::NetworkDevice class << self attr_reader :current end def self.init(device) require "puppet/util/network_device/#{device.provider}/device" @current = Puppet::Util::NetworkDevice.const_get(device.provider.capitalize).const_get(:Device).new(device.url, ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/run_mode.rb
lib/puppet/util/run_mode.rb
# frozen_string_literal: true require 'etc' module Puppet module Util class RunMode def initialize(name) @name = name.to_sym end attr_reader :name def self.[](name) @run_modes ||= {} if Puppet::Util::Platform.windows? @run_modes[name] ||= WindowsRunMod...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/tagging.rb
lib/puppet/util/tagging.rb
# frozen_string_literal: true require_relative '../../puppet/util/tag_set' module Puppet::Util::Tagging ValidTagRegex = /\A[[:alnum:]_][[:alnum:]_:.-]*\Z/u # Add a tag to the current tag set. # When a tag set is used for a scope, these tags will be added to all of # the objects contained in this scope when t...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/rpm_compare.rb
lib/puppet/util/rpm_compare.rb
# frozen_string_literal: true require 'English' module Puppet::Util::RpmCompare ARCH_LIST = %w[ noarch i386 i686 ppc ppc64 armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l m68kmint s390 s390x ia64 x86_64 sh3 sh4 ].freeze ARCH_REGEX = Regexp.new(ARCH_LIST.map { |arch| "\\.#{arch}" }.join('|'...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/posix.rb
lib/puppet/util/posix.rb
# frozen_string_literal: true # Utility methods for interacting with POSIX objects; mostly user and group module Puppet::Util::POSIX # This is a list of environment variables that we will set when we want to override the POSIX locale LOCALE_ENV_VARS = %w[LANG LC_ALL LC_MESSAGES LANGUAGE LC_C...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/colors.rb
lib/puppet/util/colors.rb
# frozen_string_literal: true require_relative '../../puppet/util/platform' module Puppet::Util::Colors BLACK = { :console => "\e[0;30m", :html => "color: #FFA0A0" } RED = { :console => "\e[0;31m", :html => "color: #FFA0A0" } GREEN = { :console => "\e[0;32m", :html => "color: #00CD00...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/watched_file.rb
lib/puppet/util/watched_file.rb
# frozen_string_literal: true require_relative '../../puppet/util/watcher' # Monitor a given file for changes on a periodic interval. Changes are detected # by looking for a change in the file ctime. class Puppet::Util::WatchedFile # @!attribute [r] filename # @return [String] The fully qualified path to the fi...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/retry_action.rb
lib/puppet/util/retry_action.rb
# frozen_string_literal: true module Puppet::Util::RetryAction class RetryException < Exception; end # rubocop:disable Lint/InheritException class RetryException::NoBlockGiven < RetryException; end class RetryException::NoRetriesGiven < RetryException; end class RetryException::RetriesExceeded < RetryException...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/backups.rb
lib/puppet/util/backups.rb
# frozen_string_literal: true require 'find' require 'fileutils' module Puppet::Util::Backups # Deal with backups. def perform_backup(file = nil) # if they specifically don't want a backup, then just say # we're good return true unless self[:backup] # let the path be specified file ||= self[:p...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/windows.rb
lib/puppet/util/windows.rb
# frozen_string_literal: true require_relative '../../puppet/util/platform' module Puppet::Util::Windows module ADSI class ADSIObject; end class User < ADSIObject; end class UserProfile; end class Group < ADSIObject; end end module File; end module Registry end module Service DEFAUL...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/character_encoding.rb
lib/puppet/util/character_encoding.rb
# frozen_string_literal: true # A module to centralize heuristics/practices for managing character encoding in Puppet module Puppet::Util::CharacterEncoding class << self # Given a string, attempts to convert a copy of the string to UTF-8. Conversion uses # encode - the string's internal byte representation...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/metric.rb
lib/puppet/util/metric.rb
# frozen_string_literal: true # included so we can test object types require_relative '../../puppet' require_relative '../../puppet/network/format_support' # A class for handling metrics. This is currently ridiculously hackish. class Puppet::Util::Metric include Puppet::Util::PsychSupport include Puppet::Network...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/constant_inflector.rb
lib/puppet/util/constant_inflector.rb
# frozen_string_literal: true # Created on 2008-02-12 # Copyright Luke Kanies # NOTE: I think it might be worth considering moving these methods directly into Puppet::Util. # A common module for converting between constants and # file names. module Puppet module Util module ConstantInflector def file2co...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/checksums.rb
lib/puppet/util/checksums.rb
# frozen_string_literal: true require 'digest/md5' require 'digest/sha1' require 'time' # A stand-alone module for calculating checksums # in a generic way. module Puppet::Util::Checksums module_function # If you modify this, update puppet/type/file/checksum.rb too KNOWN_CHECKSUMS = [ :sha256, :sha256lite,...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/profiler/logging.rb
lib/puppet/util/profiler/logging.rb
# frozen_string_literal: true class Puppet::Util::Profiler::Logging def initialize(logger, identifier) @logger = logger @identifier = identifier @sequence = Sequence.new end def start(description, metric_id) @sequence.next @sequence.down do_start(description, metric_id) end def fini...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/profiler/object_counts.rb
lib/puppet/util/profiler/object_counts.rb
# frozen_string_literal: true require_relative '../../../puppet/util/profiler/logging' class Puppet::Util::Profiler::ObjectCounts < Puppet::Util::Profiler::Logging def start ObjectSpace.count_objects end def finish(before) after = ObjectSpace.count_objects diff = before.collect do |type, count| ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/profiler/around_profiler.rb
lib/puppet/util/profiler/around_profiler.rb
# frozen_string_literal: true # A Profiler that can be used to wrap around blocks of code. It is configured # with other profilers and controls them to start before the block is executed # and finish after the block is executed. # # @api private class Puppet::Util::Profiler::AroundProfiler def initialize @profil...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/profiler/wall_clock.rb
lib/puppet/util/profiler/wall_clock.rb
# frozen_string_literal: true require_relative '../../../puppet/util/profiler/logging' # A profiler implementation that measures the number of seconds a segment of # code takes to execute and provides a callback with a string representation of # the profiling information. # # @api private class Puppet::Util::Profiler...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/profiler/aggregate.rb
lib/puppet/util/profiler/aggregate.rb
# frozen_string_literal: true require_relative '../../../puppet/util/profiler' require_relative '../../../puppet/util/profiler/wall_clock' class Puppet::Util::Profiler::Aggregate < Puppet::Util::Profiler::WallClock def initialize(logger, identifier) super(logger, identifier) @metrics_hash = Metric.new end...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/at_fork/solaris.rb
lib/puppet/util/at_fork/solaris.rb
# frozen_string_literal: true require_relative '../../../puppet' require 'fiddle' # Early versions of Fiddle relied on the deprecated DL module and used # classes defined in the namespace of that module instead of classes defined # in the Fiddle's own namespace e.g. DL::Handle instead of Fiddle::Handle. # We don't su...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/at_fork/noop.rb
lib/puppet/util/at_fork/noop.rb
# frozen_string_literal: true # A noop implementation of the Puppet::Util::AtFork handler class Puppet::Util::AtFork::Noop class << self def new # no need to instantiate every time, return the class object itself self end def prepare end def parent end def child end e...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/command_line/trollop.rb
lib/puppet/util/command_line/trollop.rb
# frozen_string_literal: true ## lib/trollop.rb -- trollop command-line processing library ## Author:: William Morgan (mailto: wmorgan-trollop@masanjin.net) ## Copyright:: Copyright 2007 William Morgan ## License:: the same terms as ruby itself ## ## 2012-03: small changes made by cprice (chris@puppetlabs.com); #...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/command_line/puppet_option_parser.rb
lib/puppet/util/command_line/puppet_option_parser.rb
# frozen_string_literal: true require_relative '../../../puppet/util/command_line/trollop' module Puppet module Util class CommandLine class PuppetOptionError < Puppet::Error end class TrollopCommandlineError < Puppet::Util::CommandLine::Trollop::CommandlineError; end # This is a comma...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/watcher/periodic_watcher.rb
lib/puppet/util/watcher/periodic_watcher.rb
# frozen_string_literal: true # Monitor a given watcher for changes on a periodic interval. class Puppet::Util::Watcher::PeriodicWatcher # @param watcher [Puppet::Util::Watcher::ChangeWatcher] a watcher for the value to watch # @param timer [Puppet::Util::Watcher::Timer] A timer to determine when to # recheck ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/watcher/timer.rb
lib/puppet/util/watcher/timer.rb
# frozen_string_literal: true class Puppet::Util::Watcher::Timer attr_reader :timeout def initialize(timeout) @timeout = timeout end def start @start_time = now end def expired? (now - @start_time) >= @timeout end def now Time.now.to_i 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/util/watcher/change_watcher.rb
lib/puppet/util/watcher/change_watcher.rb
# frozen_string_literal: true # Watches for changes over time. It only re-examines the values when it is requested to update readings. # @api private class Puppet::Util::Watcher::ChangeWatcher def self.watch(reader) Puppet::Util::Watcher::ChangeWatcher.new(nil, nil, reader).next_reading end def initialize(p...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/lib/puppet/util/ldap/connection.rb
lib/puppet/util/ldap/connection.rb
# frozen_string_literal: true require_relative '../../../puppet/util/ldap' class Puppet::Util::Ldap::Connection attr_accessor :host, :port, :user, :password, :reset, :ssl attr_reader :connection # Return a default connection, using our default settings. def self.instance ssl = if Puppet[:ldaptls] ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false