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/pops/parser/locator.rb
lib/puppet/pops/parser/locator.rb
# frozen_string_literal: true module Puppet::Pops module Parser # Helper class that keeps track of where line breaks are located and can answer questions about positions. # class Locator # Creates, or recreates a Locator. A Locator is created if index is not given (a scan is then # performed of the given source st...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/slurp_support.rb
lib/puppet/pops/parser/slurp_support.rb
# frozen_string_literal: true module Puppet::Pops module Parser # This module is an integral part of the Lexer. # It defines the string slurping behavior - finding the string and non string parts in interpolated # strings, translating escape sequences in strings to their single character equivalence. # # PERFORMANCE N...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/evaluating_parser.rb
lib/puppet/pops/parser/evaluating_parser.rb
# frozen_string_literal: true require_relative '../../../puppet/concurrent/thread_local_singleton' module Puppet::Pops module Parser # Does not support "import" and parsing ruby files # class EvaluatingParser extend Puppet::Concurrent::ThreadLocalSingleton attr_reader :parser def initialize @parser = Pars...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/interpolation_support.rb
lib/puppet/pops/parser/interpolation_support.rb
# frozen_string_literal: true # This module is an integral part of the Lexer. # It defines interpolation support # PERFORMANCE NOTE: There are 4 very similar methods in this module that are designed to be as # performant as possible. While it is possible to parameterize them into one common method, the overhead # of p...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/locatable.rb
lib/puppet/pops/parser/locatable.rb
# frozen_string_literal: true # Interface for something that is "locatable" (holds offset and length). class Puppet::Pops::Parser::Locatable # The offset in the locator's content def offset end # The length in the locator from the given offset def length end # This class is useful for testing class F...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/pn_parser.rb
lib/puppet/pops/parser/pn_parser.rb
# frozen_string_literal: true module Puppet::Pops module Parser class PNParser LIT_TRUE = 'true' LIT_FALSE = 'false' LIT_NIL = 'nil' TOKEN_END = 0 TOKEN_BOOL = 1 TOKEN_NIL = 2 TOKEN_INT = 3 TOKEN_FLOAT = 4 TOKEN_IDENTIFIER = 5 TOKEN_WS = 0x20 TOKEN_STRING = 0x22 TOKEN_KEY = 0x3a TOKEN_LP = 0...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/lexer_support.rb
lib/puppet/pops/parser/lexer_support.rb
# frozen_string_literal: true module Puppet::Pops module Parser require_relative '../../../puppet/util/multi_match' # This is an integral part of the Lexer. It is broken out into a separate module # for maintainability of the code, and making the various parts of the lexer focused. # module LexerSupport # Returns "...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/epp_support.rb
lib/puppet/pops/parser/epp_support.rb
# frozen_string_literal: true module Puppet::Pops module Parser # This module is an integral part of the Lexer. # It handles scanning of EPP (Embedded Puppet), a form of string/expression interpolation similar to ERB. # require 'strscan' module EppSupport TOKEN_RENDER_STRING = [:RENDER_STRING, nil, 0] TOKEN_RENDER...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/epp_parser.rb
lib/puppet/pops/parser/epp_parser.rb
# frozen_string_literal: true # The EppParser is a specialized Puppet Parser that starts parsing in Epp Text mode class Puppet::Pops::Parser::EppParser < Puppet::Pops::Parser::Parser # Initializes the epp parser support by creating a new instance of {Puppet::Pops::Parser::Lexer} # configured to start in Epp Lexing...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/heredoc_support.rb
lib/puppet/pops/parser/heredoc_support.rb
# frozen_string_literal: true module Puppet::Pops module Parser module HeredocSupport include LexerSupport # Pattern for heredoc `@(endtag[:syntax][/escapes]) # Produces groups for endtag (group 1), syntax (group 2), and escapes (group 3) # PATTERN_HEREDOC = %r{@\(([^:/\r\n)]+)(?::[[:blank:]]*([a-z][a-zA-Z0...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/parser/lexer2.rb
lib/puppet/pops/parser/lexer2.rb
# frozen_string_literal: true # The Lexer is responsible for turning source text into tokens. # This version is a performance enhanced lexer (in comparison to the 3.x and earlier "future parser" lexer. # # Old returns tokens [:KEY, value, { locator = } # Could return [[token], locator] # or Token.new([token], locator)...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/json_path.rb
lib/puppet/pops/serialization/json_path.rb
# frozen_string_literal: true require_relative '../../../puppet/concurrent/thread_local_singleton' module Puppet::Pops module Serialization module JsonPath # Creates a _json_path_ reference from the given `path` argument # # @path path [Array<Integer,String>] An array of integers and strings # @return [String...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/abstract_reader.rb
lib/puppet/pops/serialization/abstract_reader.rb
# frozen_string_literal: true require_relative 'extension' require_relative 'time_factory' module Puppet::Pops module Serialization # Abstract class for protocol specific readers such as MsgPack or JSON # The abstract reader is capable of reading the primitive scalars: # - Boolean # - Integer # - Float # - String # a...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/instance_writer.rb
lib/puppet/pops/serialization/instance_writer.rb
# frozen_string_literal: true module Puppet::Pops module Serialization # An instance writer is responsible for writing complex objects using a {Serializer} # @api private module InstanceWriter # @param [Types::PObjectType] type the type of instance to write # @param [Object] value the instance # @par...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/time_factory.rb
lib/puppet/pops/serialization/time_factory.rb
# frozen_string_literal: true module Puppet::Pops module Serialization # Implements all the constructors found in the Time class and ensures that # the created Time object can be serialized and deserialized using its # seconds and nanoseconds without loss of precision. # # @deprecated No longer in use. Funct...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/abstract_writer.rb
lib/puppet/pops/serialization/abstract_writer.rb
# frozen_string_literal: true require_relative 'extension' module Puppet::Pops module Serialization MAX_INTEGER = 0x7fffffffffffffff MIN_INTEGER = -0x8000000000000000 # Abstract class for protocol specific writers such as MsgPack or JSON # The abstract write is capable of writing the primitive scalars: # - Boolean #...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/to_data_converter.rb
lib/puppet/pops/serialization/to_data_converter.rb
# frozen_string_literal: true module Puppet::Pops module Serialization # Class that can process an arbitrary object into a value that is assignable to `Data`. # # @api public class ToDataConverter include Evaluator::Runtime3Support # Convert the given _value_ according to the given _options_ and retur...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/json.rb
lib/puppet/pops/serialization/json.rb
# frozen_string_literal: true require_relative '../../../puppet/util/json' module Puppet::Pops module Serialization require_relative 'time_factory' require_relative 'abstract_reader' require_relative 'abstract_writer' module JSON # A Writer that writes output in JSON format # @api private class Writer < Abstra...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/serializer.rb
lib/puppet/pops/serialization/serializer.rb
# frozen_string_literal: true require_relative 'extension' module Puppet::Pops module Serialization # The serializer is capable of writing, arrays, maps, and complex objects using an underlying protocol writer. It takes care of # tabulating and disassembling complex objects. # @api public class Serializer ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/from_data_converter.rb
lib/puppet/pops/serialization/from_data_converter.rb
# frozen_string_literal: true module Puppet::Pops module Serialization class Builder def initialize(values) @values = values @resolved = true end def [](key) @values[key] end def []=(key, value) @values[key] = value @resolved = false if value.is_a?(Builder) end...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/object.rb
lib/puppet/pops/serialization/object.rb
# frozen_string_literal: true require_relative 'instance_reader' require_relative 'instance_writer' module Puppet::Pops module Serialization # Instance reader for objects that implement {Types::PuppetObject} # @api private class ObjectReader include InstanceReader def read(type, impl_class, value_count, deserial...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/deserializer.rb
lib/puppet/pops/serialization/deserializer.rb
# frozen_string_literal: true require_relative 'extension' module Puppet::Pops module Serialization # The deserializer is capable of reading, arrays, maps, and complex objects using an underlying protocol reader. It takes care of # resolving tabulations and assembling complex objects. The type of the complex obje...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/to_stringified_converter.rb
lib/puppet/pops/serialization/to_stringified_converter.rb
# frozen_string_literal: true module Puppet::Pops module Serialization # Class that can process an arbitrary object into a value that is assignable to `Data` # and where contents is converted from rich data to one of: # * Numeric (Integer, Float) # * Boolean # * Undef (nil) # * String # * Array # * Has...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/extension.rb
lib/puppet/pops/serialization/extension.rb
# frozen_string_literal: true module Puppet::Pops module Serialization module Extension # 0x00 - 0x0F are reserved for low-level serialization / tabulation extensions # Tabulation internal to the low level protocol reader/writer INNER_TABULATION = 0x00 # Tabulation managed by the serializer / deserializer ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/serialization/instance_reader.rb
lib/puppet/pops/serialization/instance_reader.rb
# frozen_string_literal: true module Puppet::Pops module Serialization # An InstanceReader is responsible for reading an instance of a complex object using a deserializer. The read involves creating the # instance, register it with the deserializer (so that self references can be resolved) and then read the instan...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/external/dot.rb
lib/puppet/external/dot.rb
# frozen_string_literal: true # rdot.rb # # # This is a modified version of dot.rb from Dave Thomas's rdoc project. I [Horst Duchene] # renamed it to rdot.rb to avoid collision with an installed rdoc/dot. # # It also supports undirected edges. module DOT # These global vars are used to make nice graph source. $...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/agent.rb
lib/puppet/application/agent.rb
# frozen_string_literal: true require_relative '../../puppet/application' require_relative '../../puppet/daemon' require_relative '../../puppet/util/pidlock' require_relative '../../puppet/agent' require_relative '../../puppet/configurer' require_relative '../../puppet/ssl/oids' class Puppet::Application::Agent < Pup...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/resource.rb
lib/puppet/application/resource.rb
# frozen_string_literal: true require_relative '../../puppet/application' class Puppet::Application::Resource < Puppet::Application environment_mode :not_required attr_accessor :host, :extra_params def preinit @extra_params = [:provider] end option("--debug", "-d") option("--verbose", "-v") optio...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/report.rb
lib/puppet/application/report.rb
# frozen_string_literal: true require_relative '../../puppet/application/indirection_base' class Puppet::Application::Report < Puppet::Application::IndirectionBase end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/script.rb
lib/puppet/application/script.rb
# frozen_string_literal: true require_relative '../../puppet/application' require_relative '../../puppet/configurer' require_relative '../../puppet/util/profiler/aggregate' require_relative '../../puppet/parser/script_compiler' class Puppet::Application::Script < Puppet::Application option("--debug", "-d") option...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/generate.rb
lib/puppet/application/generate.rb
# frozen_string_literal: true require_relative '../../puppet/application/face_base' # The Generate application. class Puppet::Application::Generate < Puppet::Application::FaceBase end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/doc.rb
lib/puppet/application/doc.rb
# frozen_string_literal: true require_relative '../../puppet/application' class Puppet::Application::Doc < Puppet::Application run_mode :server attr_accessor :unknown_args, :manifest def preinit { :references => [], :mode => :text, :format => :to_markdown }.each do |name, value| options[name] = valu...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/node.rb
lib/puppet/application/node.rb
# frozen_string_literal: true require_relative '../../puppet/application/indirection_base' class Puppet::Application::Node < Puppet::Application::IndirectionBase end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/ssl.rb
lib/puppet/application/ssl.rb
# frozen_string_literal: true require_relative '../../puppet/application' require_relative '../../puppet/ssl/oids' class Puppet::Application::Ssl < Puppet::Application run_mode :agent def summary _("Manage SSL keys and certificates for puppet SSL clients") end def help <<~HELP puppet-ssl(8) --...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/plugin.rb
lib/puppet/application/plugin.rb
# frozen_string_literal: true require_relative '../../puppet/application/face_base' class Puppet::Application::Plugin < Puppet::Application::FaceBase environment_mode :not_required end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/parser.rb
lib/puppet/application/parser.rb
# frozen_string_literal: true require_relative '../../puppet/application/face_base' require_relative '../../puppet/face' class Puppet::Application::Parser < Puppet::Application::FaceBase end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/indirection_base.rb
lib/puppet/application/indirection_base.rb
# frozen_string_literal: true require_relative '../../puppet/application/face_base' class Puppet::Application::IndirectionBase < Puppet::Application::FaceBase end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/catalog.rb
lib/puppet/application/catalog.rb
# frozen_string_literal: true require_relative '../../puppet/application/indirection_base' class Puppet::Application::Catalog < Puppet::Application::IndirectionBase end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/epp.rb
lib/puppet/application/epp.rb
# frozen_string_literal: true require_relative '../../puppet/application/face_base' require_relative '../../puppet/face' class Puppet::Application::Epp < Puppet::Application::FaceBase end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/help.rb
lib/puppet/application/help.rb
# frozen_string_literal: true require_relative '../../puppet/application/face_base' class Puppet::Application::Help < Puppet::Application::FaceBase environment_mode :not_required end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/facts.rb
lib/puppet/application/facts.rb
# frozen_string_literal: true require_relative '../../puppet/application/indirection_base' class Puppet::Application::Facts < Puppet::Application::IndirectionBase # Allows `puppet facts` actions to be run against environments that # don't exist locally, such as using the `--environment` flag to make a REST # re...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/describe.rb
lib/puppet/application/describe.rb
# frozen_string_literal: true require_relative '../../puppet/application' class Formatter def initialize(width) @width = width end def wrap(txt, opts) return "" unless txt && !txt.empty? work = (opts[:scrub] ? scrub(txt) : txt) indent = opts[:indent] || 0 textLen = @width - indent patt...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/filebucket.rb
lib/puppet/application/filebucket.rb
# frozen_string_literal: true require_relative '../../puppet/application' class Puppet::Application::Filebucket < Puppet::Application environment_mode :not_required option("--bucket BUCKET", "-b") option("--debug", "-d") option("--fromdate FROMDATE", "-f") option("--todate TODATE", "-t") option("--local"...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/apply.rb
lib/puppet/application/apply.rb
# frozen_string_literal: true require_relative '../../puppet/application' require_relative '../../puppet/configurer' require_relative '../../puppet/util/profiler/aggregate' class Puppet::Application::Apply < Puppet::Application require_relative '../../puppet/util/splayer' include Puppet::Util::Splayer option("...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/config.rb
lib/puppet/application/config.rb
# frozen_string_literal: true require_relative '../../puppet/application/face_base' class Puppet::Application::Config < Puppet::Application::FaceBase environment_mode :not_required end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/face_base.rb
lib/puppet/application/face_base.rb
# frozen_string_literal: true require_relative '../../puppet/application' require_relative '../../puppet/face' require 'optparse' class Puppet::Application::FaceBase < Puppet::Application option("--debug", "-d") do |_arg| set_log_level(:debug => true) end option("--verbose", "-v") do |_| set_log_level(...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/module.rb
lib/puppet/application/module.rb
# frozen_string_literal: true require_relative '../../puppet/application/face_base' class Puppet::Application::Module < Puppet::Application::FaceBase end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/lookup.rb
lib/puppet/application/lookup.rb
# frozen_string_literal: true require_relative '../../puppet/application' require_relative '../../puppet/pops' require_relative '../../puppet/node' require_relative '../../puppet/node/server_facts' require_relative '../../puppet/parser/compiler' class Puppet::Application::Lookup < Puppet::Application RUN_HELP = _("...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/application/device.rb
lib/puppet/application/device.rb
# frozen_string_literal: true require_relative '../../puppet/application' require_relative '../../puppet/configurer' require_relative '../../puppet/util/network_device' require_relative '../../puppet/ssl/oids' class Puppet::Application::Device < Puppet::Application run_mode :agent attr_accessor :args, :agent, :h...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/concurrent/thread_local_singleton.rb
lib/puppet/concurrent/thread_local_singleton.rb
# frozen_string_literal: true module Puppet module Concurrent module ThreadLocalSingleton def singleton key = (name + ".singleton").intern thread = Thread.current value = thread.thread_variable_get(key) if value.nil? value = new thread.thread_variable_set...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/concurrent/synchronized.rb
lib/puppet/concurrent/synchronized.rb
# frozen_string_literal: true module Puppet module Concurrent # Including Puppet::Concurrent::Synchronized into a class when running on JRuby # causes all of its instance methods to be synchronized on the instance itself. # When running on MRI it has no effect. if RUBY_PLATFORM == 'java' require 'jruby/synchronized'...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/concurrent/lock.rb
lib/puppet/concurrent/lock.rb
# frozen_string_literal: true require_relative '../../puppet/concurrent/synchronized' module Puppet module Concurrent # A simple lock that at the moment only does any locking on jruby class Lock include Puppet::Concurrent::Synchronized def synchronize yield end end 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/scheduler/scheduler.rb
lib/puppet/scheduler/scheduler.rb
# frozen_string_literal: true module Puppet::Scheduler class Scheduler def initialize(timer = Puppet::Scheduler::Timer.new) @timer = timer end def run_loop(jobs) mark_start_times(jobs, @timer.now) until enabled(jobs).empty? @timer.wait_for(min_interval_to_next_run_from(jobs, @t...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/scheduler/splay_job.rb
lib/puppet/scheduler/splay_job.rb
# frozen_string_literal: true module Puppet::Scheduler class SplayJob < Job attr_reader :splay, :splay_limit def initialize(run_interval, splay_limit, &block) @splay, @splay_limit = calculate_splay(splay_limit) super(run_interval, &block) end def interval_to_next_from(time) if las...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/scheduler/timer.rb
lib/puppet/scheduler/timer.rb
# frozen_string_literal: true module Puppet::Scheduler class Timer def wait_for(seconds) if seconds > 0 sleep(seconds) end end def now Time.now end 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/scheduler/job.rb
lib/puppet/scheduler/job.rb
# frozen_string_literal: true module Puppet::Scheduler class Job attr_reader :run_interval attr_accessor :last_run attr_accessor :start_time def initialize(run_interval, &block) self.run_interval = run_interval @last_run = nil @run_proc = block @enabled = true end de...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/plugins/syntax_checkers.rb
lib/puppet/plugins/syntax_checkers.rb
# frozen_string_literal: true module Puppet::Plugins module SyntaxCheckers # The lookup **key** for the multibind containing syntax checkers used to syntax check embedded string in non # puppet DSL syntax. # @api public SYNTAX_CHECKERS_KEY = :'puppet::syntaxcheckers' # SyntaxChecker is a Puppet Extension Po...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/plugins/configuration.rb
lib/puppet/plugins/configuration.rb
# frozen_string_literal: true # Configures the Puppet Plugins, by registering extension points # and default implementations. # # See the respective configured services for more information. # # @api private # module Puppet::Plugins module Configuration require_relative '../../puppet/plugins/syntax_checkers' ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/libuser.rb
lib/puppet/feature/libuser.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' require_relative '../../puppet/util/libuser' Puppet.features.add(:libuser) { File.executable?("/usr/sbin/lgroupadd") and File.executable?("/usr/sbin/luseradd") and Puppet::FileSystem.exist?(Puppet::Util::Libuser.getconf) }
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/hiera_eyaml.rb
lib/puppet/feature/hiera_eyaml.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' Puppet.features.add(:hiera_eyaml, :libs => ['hiera/backend/eyaml/parser/parser'])
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/eventlog.rb
lib/puppet/feature/eventlog.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' if Puppet::Util::Platform.windows? Puppet.features.add(:eventlog) end
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/cfpropertylist.rb
lib/puppet/feature/cfpropertylist.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' Puppet.features.add(:cfpropertylist, :libs => ['cfpropertylist'])
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/msgpack.rb
lib/puppet/feature/msgpack.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' Puppet.features.add(:msgpack, :libs => ["msgpack"])
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/selinux.rb
lib/puppet/feature/selinux.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' Puppet.features.add(:selinux, :libs => ["selinux"])
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/ssh.rb
lib/puppet/feature/ssh.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' Puppet.features.add(:ssh, :libs => %(net/ssh))
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/base.rb
lib/puppet/feature/base.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' # Add the simple features, all in one file. # Order is important as some features depend on others # We have a syslog implementation Puppet.features.add(:syslog, :libs => ["syslog"]) # We can use POSIX user functions Puppet.features.add(:po...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/telnet.rb
lib/puppet/feature/telnet.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' Puppet.features.add(:telnet, :libs => %(net/telnet))
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/bolt.rb
lib/puppet/feature/bolt.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' Puppet.features.add(:bolt, :libs => ['bolt'])
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/pe_license.rb
lib/puppet/feature/pe_license.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' # Is the pe license library installed providing the ability to read licenses. Puppet.features.add(:pe_license, :libs => %(pe_license))
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/pson.rb
lib/puppet/feature/pson.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' # PSON is deprecated, use JSON instead Puppet.features.add(:pson, :libs => ['puppet/external/pson'])
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/hocon.rb
lib/puppet/feature/hocon.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' Puppet.features.add(:hocon, :libs => ['hocon'])
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/feature/zlib.rb
lib/puppet/feature/zlib.rb
# frozen_string_literal: true require_relative '../../puppet/util/feature' # We want this to load if possible, but it's not automatically # required. Puppet.features.add(:zlib, :libs => %(zlib))
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reports/log.rb
lib/puppet/reports/log.rb
# frozen_string_literal: true require_relative '../../puppet/reports' Puppet::Reports.register_report(:log) do desc "Send all received logs to the local log destinations. Usually the log destination is syslog." def process logs.each do |log| log.source = "//#{host}/#{log.source}" Puppet::Uti...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reports/store.rb
lib/puppet/reports/store.rb
# frozen_string_literal: true require_relative '../../puppet' require 'fileutils' require_relative '../../puppet/util' SEPARATOR = [Regexp.escape(File::SEPARATOR.to_s), Regexp.escape(File::ALT_SEPARATOR.to_s)].join Puppet::Reports.register_report(:store) do desc "Store the yaml report on disk. Each host sends its...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reports/http.rb
lib/puppet/reports/http.rb
# frozen_string_literal: true require_relative '../../puppet' require_relative '../../puppet/network/http_pool' require 'uri' Puppet::Reports.register_report(:http) do desc <<-DESC Send reports via HTTP or HTTPS. This report processor submits reports as POST requests to the address in the `reporturl` settin...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/property/boolean.rb
lib/puppet/property/boolean.rb
# frozen_string_literal: true require_relative '../../puppet/coercion' class Puppet::Property::Boolean < Puppet::Property def unsafe_munge(value) Puppet::Coercion.boolean(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/property/ordered_list.rb
lib/puppet/property/ordered_list.rb
# frozen_string_literal: true require_relative '../../puppet/property/list' module Puppet class Property # This subclass of {Puppet::Property} manages an ordered list of values. # The maintained order is the order defined by the 'current' set of values (i.e. the # original order is not disrupted). Any a...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/property/keyvalue.rb
lib/puppet/property/keyvalue.rb
# frozen_string_literal: true require_relative '../../puppet/property' module Puppet class Property # This subclass of {Puppet::Property} manages string key value pairs. # In order to use this property: # # * the _should_ value must be an array of key-value pairs separated by the 'separator' # *...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/property/ensure.rb
lib/puppet/property/ensure.rb
# frozen_string_literal: true require_relative '../../puppet/property' # This property is automatically added to any {Puppet::Type} that responds # to the methods 'exists?', 'create', and 'destroy'. # # Ensure defaults to having the wanted _(should)_ value `:present`. # # @api public # class Puppet::Property::Ensure ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/property/list.rb
lib/puppet/property/list.rb
# frozen_string_literal: true require_relative '../../puppet/property' module Puppet class Property # This subclass of {Puppet::Property} manages an unordered list of values. # For an ordered list see {Puppet::Property::OrderedList}. # class List < Property def is_to_s(currentvalue) # rubocop:...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/datatypes/error.rb
lib/puppet/datatypes/error.rb
# frozen_string_literal: true Puppet::DataTypes.create_type('Error') do interface <<-PUPPET type_parameters => { kind => Optional[Variant[String,Regexp,Type[Enum],Type[Pattern],Type[NotUndef],Type[Undef]]], issue_code => Optional[Variant[String,Regexp,Type[Enum],Type[Pattern],Type[NotUndef],Type[Unde...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/datatypes/impl/error.rb
lib/puppet/datatypes/impl/error.rb
# frozen_string_literal: true class Puppet::DataTypes::Error attr_reader :msg, :kind, :issue_code, :details alias message msg def self.from_asserted_hash(hash) new(hash['msg'], hash['kind'], hash['details'], hash['issue_code']) end def _pcore_init_hash result = { 'msg' => @msg } result['kind'] ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/file_system/uniquefile.rb
lib/puppet/file_system/uniquefile.rb
# frozen_string_literal: true require 'English' require_relative '../../puppet/file_system' require 'delegate' require 'tmpdir' # A class that provides `Tempfile`-like capabilities, but does not attempt to # manage the deletion of the file for you. API is identical to the # normal `Tempfile` class. # # @api public c...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/file_system/memory_impl.rb
lib/puppet/file_system/memory_impl.rb
# frozen_string_literal: true class Puppet::FileSystem::MemoryImpl def initialize(*files) @files = files + all_children_of(files) end def expand_path(path, dir_string = nil) File.expand_path(path, dir_string) end def exist?(path) path.exist? end def directory?(path) path.directory? e...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/file_system/jruby.rb
lib/puppet/file_system/jruby.rb
# frozen_string_literal: true require_relative '../../puppet/file_system/posix' class Puppet::FileSystem::JRuby < Puppet::FileSystem::Posix def unlink(*paths) File.unlink(*paths) rescue Errno::ENOENT # JRuby raises ENOENT if the path doesn't exist or the parent directory # doesn't allow execute/traver...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/file_system/path_pattern.rb
lib/puppet/file_system/path_pattern.rb
# frozen_string_literal: true require 'pathname' require_relative '../../puppet/error' module Puppet::FileSystem class PathPattern class InvalidPattern < Puppet::Error; end DOTDOT = '..' ABSOLUTE_UNIX = %r{^/} ABSOLUTE_WINDOWS = /^[a-z]:/i CURRENT_DRIVE_RELATIVE_WINDOWS = /^\\/ def self.re...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/file_system/file_impl.rb
lib/puppet/file_system/file_impl.rb
# frozen_string_literal: true # Abstract implementation of the Puppet::FileSystem # class Puppet::FileSystem::FileImpl def pathname(path) path.is_a?(Pathname) ? path : Pathname.new(path) end def assert_path(path) return path if path.is_a?(Pathname) # Some paths are string, or in the case of Watched...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/file_system/posix.rb
lib/puppet/file_system/posix.rb
# frozen_string_literal: true class Puppet::FileSystem::Posix < Puppet::FileSystem::FileImpl def binread(path) path.binread end # Provide an encoding agnostic version of compare_stream # # The FileUtils implementation in Ruby 2.0+ was modified in a manner where # it cannot properly compare File and St...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/file_system/windows.rb
lib/puppet/file_system/windows.rb
# frozen_string_literal: true require_relative '../../puppet/file_system/posix' require_relative '../../puppet/util/windows' class Puppet::FileSystem::Windows < Puppet::FileSystem::Posix FULL_CONTROL = Puppet::Util::Windows::File::FILE_ALL_ACCESS FILE_READ = Puppet::Util::Windows::File::FILE_GENERIC_READ def o...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/file_system/memory_file.rb
lib/puppet/file_system/memory_file.rb
# frozen_string_literal: true # An in-memory file abstraction. Commonly used with Puppet::FileSystem::File#overlay # @api private class Puppet::FileSystem::MemoryFile attr_reader :path, :children def self.a_missing_file(path) new(path, :exist? => false, :executable? => false) end def self.a_missing_direc...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reference/report.rb
lib/puppet/reference/report.rb
# frozen_string_literal: true require_relative '../../puppet/reports' report = Puppet::Util::Reference.newreference :report, :doc => "All available transaction reports" do Puppet::Reports.reportdocs end report.header = " Puppet can generate a report after applying a catalog. This report includes events, log messag...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reference/type.rb
lib/puppet/reference/type.rb
# frozen_string_literal: true Puppet::Util::Reference.newreference :type, :doc => "All Puppet resource types and all their details" do types = {} Puppet::Type.loadall Puppet::Type.eachtype { |type| next if type.name == :component next if type.name == :whit types[type.name] = type } str = %{ #...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reference/providers.rb
lib/puppet/reference/providers.rb
# frozen_string_literal: true providers = Puppet::Util::Reference.newreference :providers, :title => "Provider Suitability Report", :depth => 1, :dynamic => true, :doc => "Which providers are valid for this machine" do types = [] Puppet::Type.loadall Puppet::Type.eachtype do |klass| next unless klass && klas...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reference/metaparameter.rb
lib/puppet/reference/metaparameter.rb
# frozen_string_literal: true Puppet::Util::Reference.newreference :metaparameter, :doc => "All Puppet metaparameters and all their details" do str = %{ Metaparameters are attributes that work with any resource type, including custom types and defined types. In general, they affect _Puppet's_ behavior rather than ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reference/configuration.rb
lib/puppet/reference/configuration.rb
# frozen_string_literal: true config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc => "A reference for all settings") do docs = {} Puppet.settings.each do |name, object| docs[name] = object end str = ''.dup docs.sort { |a, b| a[0].to_s <=> b[0].to_s }.each do |name, obje...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reference/function.rb
lib/puppet/reference/function.rb
# frozen_string_literal: true function = Puppet::Util::Reference.newreference :function, :doc => "All functions available in the parser" do Puppet::Parser::Functions.functiondocs end function.header = " There are two types of functions in Puppet: Statements and rvalues. Statements stand on their own and do not retur...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/reference/indirection.rb
lib/puppet/reference/indirection.rb
# frozen_string_literal: true require_relative '../../puppet/indirector/indirection' require_relative '../../puppet/util/checksums' require_relative '../../puppet/file_serving/content' require_relative '../../puppet/file_serving/metadata' reference = Puppet::Util::Reference.newreference :indirection, :doc => "Indirec...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/configurer/fact_handler.rb
lib/puppet/configurer/fact_handler.rb
# frozen_string_literal: true require_relative '../../puppet/indirector/facts/facter' require_relative '../../puppet/configurer' require_relative '../../puppet/configurer/downloader' # Break out the code related to facts. This module is # just included into the agent, but having it here makes it # easier to test. m...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/configurer/plugin_handler.rb
lib/puppet/configurer/plugin_handler.rb
# frozen_string_literal: true # Break out the code related to plugins. This module is # just included into the agent, but having it here makes it # easier to test. require_relative '../../puppet/configurer' class Puppet::Configurer::PluginHandler SUPPORTED_LOCALES_MOUNT_AGENT_VERSION = Gem::Version.new("5.3.4") ...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false
puppetlabs/puppet
https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/configurer/downloader.rb
lib/puppet/configurer/downloader.rb
# frozen_string_literal: true require_relative '../../puppet/configurer' require_relative '../../puppet/resource/catalog' class Puppet::Configurer::Downloader attr_reader :name, :path, :source, :ignore # Evaluate our download, returning the list of changed values. def evaluate Puppet.info _("Retrieving %{n...
ruby
Apache-2.0
e227c27540975c25aa22d533a52424a9d2fc886a
2026-01-04T15:39:26.576514Z
false