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
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/component.rb
lib/puppet/type/component.rb
# frozen_string_literal: true require_relative '../../puppet' require_relative '../../puppet/type' require_relative '../../puppet/transaction' Puppet::Type.newtype(:component) do include Enumerable newparam(:name) do desc "The name of the component. Generally optional." isnamevar end # Override how...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/group.rb
lib/puppet/type/group.rb
# frozen_string_literal: true require 'etc' require_relative '../../puppet/property/keyvalue' require_relative '../../puppet/parameter/boolean' module Puppet Type.newtype(:group) do @doc = "Manage groups. On most platforms this can only create groups. Group membership must be managed on individual users. ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/stage.rb
lib/puppet/type/stage.rb
# frozen_string_literal: true Puppet::Type.newtype(:stage) do desc "A resource type for creating new run stages. Once a stage is available, classes can be assigned to it by declaring them with the resource-like syntax and using [the `stage` metaparameter](https://puppet.com/docs/puppet/latest/metaparame...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/package.rb
lib/puppet/type/package.rb
# coding: utf-8 # frozen_string_literal: true # Define the different packaging systems. Each package system is implemented # in a module, which then gets used to individually extend each package object. # This allows packages to exist on the same machine using different packaging # systems. require_relative '../../p...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/resources.rb
lib/puppet/type/resources.rb
# frozen_string_literal: true require_relative '../../puppet' require_relative '../../puppet/parameter/boolean' Puppet::Type.newtype(:resources) do @doc = "This is a metatype that can manage other resource types. Any metaparams specified here will be passed on to any generated resources, so you can purge u...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file.rb
lib/puppet/type/file.rb
# coding: utf-8 # frozen_string_literal: true require 'digest/md5' require 'cgi' require 'etc' require 'uri' require 'fileutils' require 'pathname' require_relative '../../puppet/parameter/boolean' require_relative '../../puppet/util/diff' require_relative '../../puppet/util/checksums' require_relative '../../puppet/u...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
true
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/notify.rb
lib/puppet/type/notify.rb
# frozen_string_literal: true # # Simple module for logging messages on the client-side module Puppet Type.newtype(:notify) do @doc = "Sends an arbitrary message, specified as a string, to the agent run-time log. It's important to note that the notify resource type is not idempotent. As a result, notifications ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/exec.rb
lib/puppet/type/exec.rb
# frozen_string_literal: true module Puppet Type.newtype(:exec) do include Puppet::Util::Execution require 'timeout' @doc = "Executes external commands. Any command in an `exec` resource **must** be able to run multiple times without causing harm --- that is, it must be *idempotent*. There ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/filebucket.rb
lib/puppet/type/filebucket.rb
# frozen_string_literal: true module Puppet require_relative '../../puppet/file_bucket/dipper' Type.newtype(:filebucket) do @doc = <<-EOT A repository for storing and retrieving file content by cryptographic checksum. Can be local to each agent node, or centralized on a primary Puppet server. All ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/service.rb
lib/puppet/type/service.rb
# frozen_string_literal: true # This is our main way of managing processes right now. # # a service is distinct from a process in that services # can only be managed through the interface of an init script # which is why they have a search path for initscripts and such module Puppet Type.newtype(:service) do @d...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/whit.rb
lib/puppet/type/whit.rb
# frozen_string_literal: true Puppet::Type.newtype(:whit) do desc "Whits are internal artifacts of Puppet's current implementation, and Puppet suppresses their appearance in all logs. We make no guarantee of the whit's continued existence, and it should never be used in an actual manifest. Use the `ancho...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/tidy.rb
lib/puppet/type/tidy.rb
# frozen_string_literal: true require_relative '../../puppet/parameter/boolean' Puppet::Type.newtype(:tidy) do require_relative '../../puppet/file_serving/fileset' require_relative '../../puppet/file_bucket/dipper' @doc = "Remove unwanted files based on specific criteria. Multiple criteria are OR'd togeth...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/schedule.rb
lib/puppet/type/schedule.rb
# frozen_string_literal: true module Puppet Type.newtype(:schedule) do @doc = <<-'EOT' Define schedules for Puppet. Resources can be limited to a schedule by using the [`schedule`](https://puppet.com/docs/puppet/latest/metaparameter.html#schedule) metaparameter. Currently, **schedules ca...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/user.rb
lib/puppet/type/user.rb
# frozen_string_literal: true require 'etc' require_relative '../../puppet/parameter/boolean' require_relative '../../puppet/property/list' require_relative '../../puppet/property/ordered_list' require_relative '../../puppet/property/keyvalue' module Puppet Type.newtype(:user) do @doc = "Manage users. This typ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/ctime.rb
lib/puppet/type/file/ctime.rb
# frozen_string_literal: true module Puppet Puppet::Type.type(:file).newproperty(:ctime) do desc "A read-only state to check the file ctime. On most modern \*nix-like systems, this is the time of the most recent change to the owner, group, permissions, or content of the file." def retrieve ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/target.rb
lib/puppet/type/file/target.rb
# frozen_string_literal: true module Puppet Puppet::Type.type(:file).newproperty(:target) do desc "The target for creating a link. Currently, symlinks are the only type supported. This attribute is mutually exclusive with `source` and `content`. Symlink targets can be relative, as well as abs...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/source.rb
lib/puppet/type/file/source.rb
# frozen_string_literal: true require_relative '../../../puppet/file_serving/content' require_relative '../../../puppet/file_serving/metadata' require_relative '../../../puppet/file_serving/terminus_helper' require_relative '../../../puppet/http' module Puppet # Copy files from a local or remote source. This stat...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/content.rb
lib/puppet/type/file/content.rb
# frozen_string_literal: true require 'net/http' require 'uri' require 'tempfile' require_relative '../../../puppet/util/checksums' require_relative '../../../puppet/type/file/data_sync' module Puppet Puppet::Type.type(:file).newproperty(:content) do include Puppet::Util::Checksums include Puppet::DataSync...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/group.rb
lib/puppet/type/file/group.rb
# frozen_string_literal: true require_relative '../../../puppet/util/posix' module Puppet # Manage file group ownership. Puppet::Type.type(:file).newproperty(:group) do desc <<-EOT Which group should own the file. Argument can be either a group name or a group ID. On Windows, a user (such ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/checksum.rb
lib/puppet/type/file/checksum.rb
# frozen_string_literal: true require_relative '../../../puppet/util/checksums' # Specify which checksum algorithm to use when checksumming # files. Puppet::Type.type(:file).newparam(:checksum) do include Puppet::Util::Checksums # The default is defined in Puppet.default_digest_algorithm desc "The checksum typ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/mode.rb
lib/puppet/type/file/mode.rb
# frozen_string_literal: true # Manage file modes. This state should support different formats # for specification (e.g., u+rwx, or -0011), but for now only supports # specifying the full mode. module Puppet Puppet::Type.type(:file).newproperty(:mode) do require_relative '../../../puppet/util/symbolic_file_mod...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/type.rb
lib/puppet/type/file/type.rb
# frozen_string_literal: true module Puppet Puppet::Type.type(:file).newproperty(:type) do require 'etc' desc "A read-only state to check the file type." def retrieve current_value = :absent stat = @resource.stat if stat current_value = stat.ftype end current_value ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/checksum_value.rb
lib/puppet/type/file/checksum_value.rb
# frozen_string_literal: true require_relative '../../../puppet/util/checksums' require_relative '../../../puppet/type/file/data_sync' module Puppet Puppet::Type.type(:file).newproperty(:checksum_value) do include Puppet::Util::Checksums include Puppet::DataSync desc "The checksum of the source content...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/owner.rb
lib/puppet/type/file/owner.rb
# frozen_string_literal: true module Puppet Puppet::Type.type(:file).newproperty(:owner) do include Puppet::Util::Warnings desc <<-EOT The user to whom the file should belong. Argument can be a user name or a user ID. On Windows, a group (such as "Administrators") can be set as a file's ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/selcontext.rb
lib/puppet/type/file/selcontext.rb
# frozen_string_literal: true # Manage SELinux context of files. # # This code actually manages three pieces of data in the context. # # [root@delenn files]# ls -dZ / # drwxr-xr-x root root system_u:object_r:root_t / # # The context of '/' here is 'system_u:object_r:root_t'. This is # three separate fields: ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/ensure.rb
lib/puppet/type/file/ensure.rb
# frozen_string_literal: true module Puppet Puppet::Type.type(:file).ensurable do require 'etc' require_relative '../../../puppet/util/symbolic_file_mode' include Puppet::Util::SymbolicFileMode desc <<-EOT Whether the file should exist, and if so what kind of file it should be. Possible ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/data_sync.rb
lib/puppet/type/file/data_sync.rb
# frozen_string_literal: true require_relative '../../../puppet/util/checksums' require_relative '../../../puppet/util/diff' require 'date' require 'tempfile' module Puppet module DataSync include Puppet::Util::Checksums include Puppet::Util::Diff def write_temporarily(param) tempfile = Tempfile....
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/type/file/mtime.rb
lib/puppet/type/file/mtime.rb
# frozen_string_literal: true module Puppet Puppet::Type.type(:file).newproperty(:mtime) do desc "A read-only state to check the file mtime. On \*nix-like systems, this is the time of the most recent change to the content of the file." def retrieve current_value = :absent stat = @resource....
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/generate/type.rb
lib/puppet/generate/type.rb
# frozen_string_literal: true require 'erb' require 'fileutils' require_relative '../../puppet/util/autoload' require_relative '../../puppet/generate/models/type/type' module Puppet module Generate # Responsible for generating type definitions in Puppet class Type # Represents an input to the type gen...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/generate/models/type/type.rb
lib/puppet/generate/models/type/type.rb
# frozen_string_literal: true require_relative '../../../../puppet/generate/models/type/property' module Puppet module Generate module Models module Type # A model for Puppet resource types. class Type # Gets the name of the type as a Puppet string literal. attr_reader ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/generate/models/type/property.rb
lib/puppet/generate/models/type/property.rb
# frozen_string_literal: true module Puppet module Generate module Models module Type # A model for resource type properties and parameters. class Property # Gets the name of the property as a Puppet string literal. attr_reader :name # Gets the Puppet type of ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/resource/type.rb
lib/puppet/resource/type.rb
# frozen_string_literal: true require_relative '../../puppet/parser' require_relative '../../puppet/util/warnings' require_relative '../../puppet/util/errors' require_relative '../../puppet/parser/ast/leaf' # Puppet::Resource::Type represents nodes, classes and defined types. # # @api public class Puppet::Resource::T...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/resource/catalog.rb
lib/puppet/resource/catalog.rb
# frozen_string_literal: true require_relative '../../puppet/node' require_relative '../../puppet/indirector' require_relative '../../puppet/transaction' require_relative '../../puppet/util/tagging' require_relative '../../puppet/graph' require 'securerandom' # This class models a node catalog. It is the thing meant...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/resource/type_collection.rb
lib/puppet/resource/type_collection.rb
# frozen_string_literal: true require_relative '../../puppet/parser/type_loader' require_relative '../../puppet/util/file_watcher' require_relative '../../puppet/util/warnings' require_relative '../../puppet/concurrent/lock' # @api private class Puppet::Resource::TypeCollection attr_reader :environment attr_acces...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/resource/status.rb
lib/puppet/resource/status.rb
# frozen_string_literal: true require 'time' require_relative '../../puppet/network/format_support' require_relative '../../puppet/util/psych_support' module Puppet class Resource # This class represents the result of evaluating a given resource. It # contains file and line information about the source, eve...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/vendor/require_vendored.rb
lib/puppet/vendor/require_vendored.rb
# This adds upfront requirements on vendored code found under lib/vendor/x # Add one requirement per vendored package (or a comment if it is loaded on demand). # The vendored library 'rgen' is loaded on demand.
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/node/environment.rb
lib/puppet/node/environment.rb
# frozen_string_literal: true require_relative '../../puppet/util' require 'monitor' require_relative '../../puppet/parser/parser_factory' require_relative '../../puppet/concurrent/lock' # Just define it, so this class has fewer load dependencies. class Puppet::Node end # Puppet::Node::Environment acts as a containe...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/node/server_facts.rb
lib/puppet/node/server_facts.rb
# frozen_string_literal: true class Puppet::Node::ServerFacts def self.load server_facts = {} # Add our server Puppet Enterprise version, if available. pe_version_file = '/opt/puppetlabs/server/pe_version' if File.readable?(pe_version_file) and !File.zero?(pe_version_file) server_facts['pe_ser...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/node/facts.rb
lib/puppet/node/facts.rb
# frozen_string_literal: true require 'time' require_relative '../../puppet/node' require_relative '../../puppet/indirector' require_relative '../../puppet/util/psych_support' # Manage a given node's facts. This either accepts facts and stores them, or # returns facts for a given node. class Puppet::Node::Facts i...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/transaction/report.rb
lib/puppet/transaction/report.rb
# frozen_string_literal: true require_relative '../../puppet' require_relative '../../puppet/indirector' # This class is used to report what happens on a client. # There are two types of data in a report; _Logs_ and _Metrics_. # # * **Logs** - are the output that each change produces. # * **Metrics** - are all of the...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/transaction/persistence.rb
lib/puppet/transaction/persistence.rb
# frozen_string_literal: true require 'yaml' require_relative '../../puppet/util/yaml' # A persistence store implementation for storing information between # transaction runs for the purposes of information inference (such # as calculating corrective_change). # @api private class Puppet::Transaction::Persistence de...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/transaction/event.rb
lib/puppet/transaction/event.rb
# frozen_string_literal: true require_relative '../../puppet/transaction' require_relative '../../puppet/util/tagging' require_relative '../../puppet/util/logging' require_relative '../../puppet/network/format_support' # A simple struct for storing what happens on the system. class Puppet::Transaction::Event includ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/transaction/additional_resource_generator.rb
lib/puppet/transaction/additional_resource_generator.rb
# frozen_string_literal: true # Adds additional resources to the catalog and relationship graph that are # generated by existing resources. There are two ways that a resource can # generate additional resources, either through the #generate method or the # #eval_generate method. # # @api private class Puppet::Transact...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/transaction/event_manager.rb
lib/puppet/transaction/event_manager.rb
# frozen_string_literal: true require_relative '../../puppet/transaction' # This class stores, routes, and responds to events generated while evaluating # a transaction. # # @api private class Puppet::Transaction::EventManager # @!attribute [r] transaction # @return [Puppet::Transaction] The transaction associa...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/transaction/resource_harness.rb
lib/puppet/transaction/resource_harness.rb
# frozen_string_literal: true require_relative '../../puppet/resource/status' class Puppet::Transaction::ResourceHarness NO_ACTION = Object.new extend Forwardable def_delegators :@transaction, :relationship_graph attr_reader :transaction def initialize(transaction) @transaction = transaction @per...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/action_manager.rb
lib/puppet/interface/action_manager.rb
# frozen_string_literal: true # This class is not actually public API, but the method # {Puppet::Interface::ActionManager#action action} is public when used # as part of the Faces DSL (i.e. from within a # {Puppet::Interface.define define} block). # @api public module Puppet::Interface::ActionManager # Declare that ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/option_builder.rb
lib/puppet/interface/option_builder.rb
# frozen_string_literal: true # @api public class Puppet::Interface::OptionBuilder # The option under construction # @return [Puppet::Interface::Option] # @api private attr_reader :option # Build an option # @return [Puppet::Interface::Option] # @api private def self.build(face, *declaration, &block) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/face_collection.rb
lib/puppet/interface/face_collection.rb
# frozen_string_literal: true module Puppet::Interface::FaceCollection @faces = Hash.new { |hash, key| hash[key] = {} } @loader = Puppet::Util::Autoload.new(:application, 'puppet/face') def self.faces unless @loaded @loaded = true names = @loader.files_to_load(Puppet.lookup(:current_environment...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/documentation.rb
lib/puppet/interface/documentation.rb
# frozen_string_literal: true class Puppet::Interface # @api private module DocGen require_relative '../../puppet/util/docs' # @api private def self.strip_whitespace(text) # I don't want no... Puppet::Util::Docs.scrub(text) end # The documentation attributes all have some common b...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/option.rb
lib/puppet/interface/option.rb
# frozen_string_literal: true # This represents an option on an action or face (to be globally applied # to its actions). Options should be constructed by calling # {Puppet::Interface::OptionManager#option}, which is available on # {Puppet::Interface}, and then calling methods of # {Puppet::Interface::OptionBuilder} i...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/option_manager.rb
lib/puppet/interface/option_manager.rb
# frozen_string_literal: true # This class is not actually public API, but the method # {Puppet::Interface::OptionManager#option option} is public when used # as part of the Faces DSL (i.e. from within a # {Puppet::Interface.define define} block). # @api public module Puppet::Interface::OptionManager # @api private ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/action_builder.rb
lib/puppet/interface/action_builder.rb
# frozen_string_literal: true # This class is used to build {Puppet::Interface::Action actions}. # When an action is defined with # {Puppet::Interface::ActionManager#action} the block is evaluated # within the context of a new instance of this class. # @api public class Puppet::Interface::ActionBuilder extend Forwar...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/action.rb
lib/puppet/interface/action.rb
# coding: utf-8 # frozen_string_literal: true require 'prettyprint' # This represents an action that is attached to a face. Actions should # be constructed by calling {Puppet::Interface::ActionManager#action}, # which is available on {Puppet::Interface}, and then calling methods of # {Puppet::Interface::ActionBuilder...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/graph/sequential_prioritizer.rb
lib/puppet/graph/sequential_prioritizer.rb
# frozen_string_literal: true # This implements a priority in which keys are given values that will keep them # in the same priority in which they priorities are requested. Nested # structures (those in which a key is contained within another key) are # preserved in such a way that child keys are after the parent and ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/graph/rb_tree_map.rb
lib/puppet/graph/rb_tree_map.rb
# frozen_string_literal: true # Algorithms and Containers project is Copyright (c) 2009 Kanwei Li # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without lim...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/graph/simple_graph.rb
lib/puppet/graph/simple_graph.rb
# frozen_string_literal: true require_relative '../../puppet/external/dot' require_relative '../../puppet/relationship' require 'set' # A hopefully-faster graph class to replace the use of GRATR. class Puppet::Graph::SimpleGraph include Puppet::Util::PsychSupport # # All public methods of this class must maint...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/graph/relationship_graph.rb
lib/puppet/graph/relationship_graph.rb
# frozen_string_literal: true # The relationship graph is the final form of a puppet catalog in # which all dependency edges are explicitly in the graph. This form of the # catalog is used to traverse the graph in the order in which resources are # managed. # # @api private class Puppet::Graph::RelationshipGraph < Pup...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/graph/prioritizer.rb
lib/puppet/graph/prioritizer.rb
# frozen_string_literal: true # Base, template method, class for Prioritizers. This provides the basic # tracking facilities used. # # @api private class Puppet::Graph::Prioritizer def initialize @priority = {} end def forget(key) @priority.delete(key) end def record_priority_for(key, priority) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/graph/key.rb
lib/puppet/graph/key.rb
# frozen_string_literal: true # Sequential, nestable keys for tracking order of insertion in "the graph" # @api private class Puppet::Graph::Key include Comparable attr_reader :value protected :value def initialize(value = [0]) @value = value end def next next_values = @value.clone next_valu...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/enum_setting.rb
lib/puppet/settings/enum_setting.rb
# frozen_string_literal: true class Puppet::Settings::EnumSetting < Puppet::Settings::BaseSetting attr_accessor :values def type :enum end def munge(value) if values.include?(value) value else raise Puppet::Settings::ValidationError, _("Invalid value '%{value}' for paramet...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/priority_setting.rb
lib/puppet/settings/priority_setting.rb
# frozen_string_literal: true require_relative '../../puppet/settings/base_setting' # A setting that represents a scheduling priority, and evaluates to an # OS-specific priority level. class Puppet::Settings::PrioritySetting < Puppet::Settings::BaseSetting PRIORITY_MAP = if Puppet::Util::Platform.windows? ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/base_setting.rb
lib/puppet/settings/base_setting.rb
# frozen_string_literal: true require 'set' require_relative '../../puppet/settings/errors' # The base setting type class Puppet::Settings::BaseSetting attr_writer :default attr_accessor :name, :desc, :section attr_reader :short, :deprecated, :call_hook # Hooks are called during different parts of the settin...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/file_or_directory_setting.rb
lib/puppet/settings/file_or_directory_setting.rb
# frozen_string_literal: true class Puppet::Settings::FileOrDirectorySetting < Puppet::Settings::FileSetting def type if Puppet::FileSystem.directory?(value) || @path_ends_with_slash :directory else :file end end # Overrides munge to be able to read the un-munged value (the FileSetting.m...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/array_setting.rb
lib/puppet/settings/array_setting.rb
# frozen_string_literal: true class Puppet::Settings::ArraySetting < Puppet::Settings::BaseSetting def type :array end def munge(value) case value when String value.split(/\s*,\s*/) when Array value else raise ArgumentError, _("Expected an Array or String, got a %{klass}") ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/environment_conf.rb
lib/puppet/settings/environment_conf.rb
# frozen_string_literal: true # Configuration settings for a single directory Environment. # @api private class Puppet::Settings::EnvironmentConf ENVIRONMENT_CONF_ONLY_SETTINGS = [:modulepath, :manifest, :config_version].freeze VALID_SETTINGS = (ENVIRONMENT_CONF_ONLY_SETTINGS + [:environment_timeout, :environment_...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/config_file.rb
lib/puppet/settings/config_file.rb
# frozen_string_literal: true require_relative '../../puppet/settings/ini_file' ## # @api private # # Parses puppet configuration files # class Puppet::Settings::ConfigFile ## # @param value_converter [Proc] a function that will convert strings into ruby types def initialize(value_converter) @value_converte...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/errors.rb
lib/puppet/settings/errors.rb
# frozen_string_literal: true # Exceptions for the settings module require_relative '../../puppet/error' class Puppet::Settings class SettingsError < Puppet::Error; end class ValidationError < SettingsError; end class InterpolationError < SettingsError; end class ParseError < SettingsError include Puppet...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/directory_setting.rb
lib/puppet/settings/directory_setting.rb
# frozen_string_literal: true class Puppet::Settings::DirectorySetting < Puppet::Settings::FileSetting def type :directory end # @api private # # @param option [String] Extra file operation mode information to use # (defaults to read-only mode 'r') # This is the standard mechanism Ruby uses in t...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/terminus_setting.rb
lib/puppet/settings/terminus_setting.rb
# frozen_string_literal: true class Puppet::Settings::TerminusSetting < Puppet::Settings::BaseSetting def munge(value) case value when '', nil nil when String value.intern when Symbol value else raise Puppet::Settings::ValidationError, _("Invalid terminus setting: %{value}...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/boolean_setting.rb
lib/puppet/settings/boolean_setting.rb
# frozen_string_literal: true # A simple boolean. class Puppet::Settings::BooleanSetting < Puppet::Settings::BaseSetting # get the arguments in getopt format def getopt_args if short [["--#{name}", "-#{short}", GetoptLong::NO_ARGUMENT], ["--no-#{name}", GetoptLong::NO_ARGUMENT]] else [["--#{nam...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/integer_setting.rb
lib/puppet/settings/integer_setting.rb
# frozen_string_literal: true class Puppet::Settings::IntegerSetting < Puppet::Settings::BaseSetting def munge(value) return value if value.is_a?(Integer) begin value = Integer(value) rescue ArgumentError, TypeError raise Puppet::Settings::ValidationError, _("Cannot convert '%{value}' to an ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/string_setting.rb
lib/puppet/settings/string_setting.rb
# frozen_string_literal: true class Puppet::Settings::StringSetting < Puppet::Settings::BaseSetting def type :string end def validate(value) value.nil? or value.is_a?(String) end end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/http_extra_headers_setting.rb
lib/puppet/settings/http_extra_headers_setting.rb
# frozen_string_literal: true class Puppet::Settings::HttpExtraHeadersSetting < Puppet::Settings::BaseSetting def type :http_extra_headers end def munge(headers) return headers if headers.is_a?(Hash) headers = headers.split(/\s*,\s*/) if headers.is_a?(String) raise ArgumentError, _("Expected a...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/duration_setting.rb
lib/puppet/settings/duration_setting.rb
# frozen_string_literal: true # A setting that represents a span of time, and evaluates to an integer # number of seconds after being parsed class Puppet::Settings::DurationSetting < Puppet::Settings::BaseSetting # How we convert from various units to seconds. UNITMAP = { # 365 days isn't technically a year, b...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/port_setting.rb
lib/puppet/settings/port_setting.rb
# frozen_string_literal: true class Puppet::Settings::PortSetting < Puppet::Settings::IntegerSetting def munge(value) value = super(value) if value < 0 || value > 65_535 raise Puppet::Settings::ValidationError, _("Value '%{value}' is not a valid port number for parameter: %{name}") % { value: value.in...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/alias_setting.rb
lib/puppet/settings/alias_setting.rb
# frozen_string_literal: true class Puppet::Settings::AliasSetting attr_reader :name, :alias_name def initialize(args = {}) @name = args[:name] @alias_name = args[:alias_for] @alias_for = Puppet.settings.setting(alias_name) end def optparse_args args = @alias_for.optparse_args args[0].gsu...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/ini_file.rb
lib/puppet/settings/ini_file.rb
# frozen_string_literal: true # @api private class Puppet::Settings::IniFile DEFAULT_SECTION_NAME = "main" def self.update(config_fh, &block) config = parse(config_fh) manipulator = Manipulator.new(config) yield manipulator config.write(config_fh) end def self.parse(config_fh) config = ne...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/ttl_setting.rb
lib/puppet/settings/ttl_setting.rb
# frozen_string_literal: true # A setting that represents a span of time to live, and evaluates to Numeric # seconds to live where 0 means shortest possible time to live, a positive numeric value means time # to live in seconds, and the symbolic entry 'unlimited' is an infinite amount of time. # class Puppet::Settings...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/value_translator.rb
lib/puppet/settings/value_translator.rb
# frozen_string_literal: true # Convert arguments into booleans, integers, or whatever. class Puppet::Settings::ValueTranslator def [](value) # Handle different data types correctly case value when /^false$/i; false when /^true$/i; true when true; true when false; false else value.g...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/symbolic_enum_setting.rb
lib/puppet/settings/symbolic_enum_setting.rb
# frozen_string_literal: true class Puppet::Settings::SymbolicEnumSetting < Puppet::Settings::BaseSetting attr_accessor :values def type :symbolic_enum end def munge(value) sym = value.to_sym if values.include?(sym) sym else raise Puppet::Settings::ValidationError, _("...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/certificate_revocation_setting.rb
lib/puppet/settings/certificate_revocation_setting.rb
# frozen_string_literal: true require_relative '../../puppet/settings/base_setting' class Puppet::Settings::CertificateRevocationSetting < Puppet::Settings::BaseSetting def type :certificate_revocation end def munge(value) case value when 'chain', 'true', TrueClass :chain when 'leaf' ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/server_list_setting.rb
lib/puppet/settings/server_list_setting.rb
# frozen_string_literal: true class Puppet::Settings::ServerListSetting < Puppet::Settings::ArraySetting def type :server_list end def print(value) if value.is_a?(Array) # turn into a string value.map { |item| item.join(":") }.join(",") else value end end def munge(value) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/path_setting.rb
lib/puppet/settings/path_setting.rb
# frozen_string_literal: true class Puppet::Settings::PathSetting < Puppet::Settings::StringSetting def munge(value) if value.is_a?(String) value = value.split(File::PATH_SEPARATOR).map { |d| File.expand_path(d) }.join(File::PATH_SEPARATOR) end value end end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/autosign_setting.rb
lib/puppet/settings/autosign_setting.rb
# frozen_string_literal: true require_relative '../../puppet/settings/base_setting' # A specialization of the file setting to allow boolean values. # # The autosign value can be either a boolean or a file path, and if the setting # is a file path then it may have a owner/group/mode specified. # # @api private class P...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/settings/file_setting.rb
lib/puppet/settings/file_setting.rb
# frozen_string_literal: true # A file. class Puppet::Settings::FileSetting < Puppet::Settings::StringSetting class SettingError < StandardError; end # An unspecified user or group # # @api private class Unspecified def value nil end end # A "root" user or group # # @api private cla...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/forge/repository.rb
lib/puppet/forge/repository.rb
# frozen_string_literal: true require_relative '../../puppet/ssl/openssl_loader' require 'digest/sha1' require 'uri' require_relative '../../puppet/forge' require_relative '../../puppet/forge/errors' require_relative '../../puppet/network/http' class Puppet::Forge # = Repository # # This class is a file for acc...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/forge/errors.rb
lib/puppet/forge/errors.rb
# frozen_string_literal: true require_relative '../../puppet/util/json' require_relative '../../puppet/error' require_relative '../../puppet/forge' # Puppet::Forge specific exceptions module Puppet::Forge::Errors # This exception is the parent for all Forge API errors class ForgeError < Puppet::Error # This i...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/forge/cache.rb
lib/puppet/forge/cache.rb
# frozen_string_literal: true require 'uri' require_relative '../../puppet/forge' class Puppet::Forge # = Cache # # Provides methods for reading files from local cache, filesystem or network. class Cache # Instantiate new cache for the +repository+ instance. def initialize(repository, options = {}) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/info_service/plan_information_service.rb
lib/puppet/info_service/plan_information_service.rb
# frozen_string_literal: true class Puppet::InfoService::PlanInformationService require_relative '../../puppet/module' def self.plans_per_environment(environment_name) # get the actual environment object, raise error if the named env doesn't exist env = Puppet.lookup(:environments).get!(environment_name) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/info_service/class_information_service.rb
lib/puppet/info_service/class_information_service.rb
# frozen_string_literal: true require_relative '../../puppet' require_relative '../../puppet/pops' require_relative '../../puppet/pops/evaluator/json_strict_literal_evaluator' class Puppet::InfoService::ClassInformationService def initialize @file_to_result = {} @parser = Puppet::Pops::Parser::EvaluatingPar...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/info_service/task_information_service.rb
lib/puppet/info_service/task_information_service.rb
# frozen_string_literal: true class Puppet::InfoService::TaskInformationService require_relative '../../puppet/module' def self.tasks_per_environment(environment_name) # get the actual environment object, raise error if the named env doesn't exist env = Puppet.lookup(:environments).get!(environment_name) ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/metatype/manager.rb
lib/puppet/metatype/manager.rb
# frozen_string_literal: true require_relative '../../puppet' require_relative '../../puppet/util/classgen' require_relative '../../puppet/node/environment' # This module defines methods dealing with Type management. # This module gets included into the Puppet::Type class, it's just split out here for clarity. # @api...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/parameter/path.rb
lib/puppet/parameter/path.rb
# frozen_string_literal: true require_relative '../../puppet/parameter' # This specialized {Puppet::Parameter} handles validation and munging of paths. # By default, a single path is accepted, and by calling {accept_arrays} it is possible to # allow an array of paths. # class Puppet::Parameter::Path < Puppet::Paramet...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/parameter/value.rb
lib/puppet/parameter/value.rb
# frozen_string_literal: true require_relative '../../puppet/parameter/value_collection' # Describes an acceptable value for a parameter or property. # An acceptable value is either specified as a literal value or a regular expression. # @note this class should be used via the api methods in {Puppet::Parameter} and {...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/parameter/boolean.rb
lib/puppet/parameter/boolean.rb
# frozen_string_literal: true require_relative '../../puppet/coercion' # This specialized {Puppet::Parameter} handles Boolean options, accepting lots # of strings and symbols for both truth and falsehood. # class Puppet::Parameter::Boolean < Puppet::Parameter def unsafe_munge(value) Puppet::Coercion.boolean(val...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/parameter/package_options.rb
lib/puppet/parameter/package_options.rb
# frozen_string_literal: true require_relative '../../puppet/parameter' # This specialized {Puppet::Parameter} handles munging of package options. # Package options are passed as an array of key value pairs. Special munging is # required as the keys and values needs to be quoted in a safe way. # class Puppet::Paramet...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/parameter/value_collection.rb
lib/puppet/parameter/value_collection.rb
# frozen_string_literal: true require_relative '../../puppet/parameter/value' # A collection of values and regular expressions, used for specifying allowed values # in a given parameter. # @note This class is considered part of the internal implementation of {Puppet::Parameter}, and # {Puppet::Property} and the fun...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/test/test_helper.rb
lib/puppet/test/test_helper.rb
# frozen_string_literal: true require 'tmpdir' require 'fileutils' module Puppet::Test # This class is intended to provide an API to be used by external projects # when they are running tests that depend on puppet core. This should # allow us to vary the implementation details of managing puppet's state # ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/indirector/store_configs.rb
lib/puppet/indirector/store_configs.rb
# frozen_string_literal: true class Puppet::Indirector::StoreConfigs < Puppet::Indirector::Terminus def initialize super # This will raise if the indirection can't be found, so we can assume it # is always set to a valid instance from here on in. @target = indirection.terminus Puppet[:storeconfigs_ba...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/indirector/direct_file_server.rb
lib/puppet/indirector/direct_file_server.rb
# frozen_string_literal: true require_relative '../../puppet/file_serving/terminus_helper' require_relative '../../puppet/indirector/terminus' class Puppet::Indirector::DirectFileServer < Puppet::Indirector::Terminus include Puppet::FileServing::TerminusHelper def find(request) return nil unless Puppet::File...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false