source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/functions/dig_spec.rb
Ruby
apache-2.0
7,843
main
2,044
require 'spec_helper' require 'puppet_spec/compiler' require 'matchers/resource' describe 'the dig function' do include PuppetSpec::Compiler include Matchers::Resource it 'returns a value from an array index via integer index' do expect(compile_to_catalog("notify { [testing].dig(0): }")).to have_resource('...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/functions/unwrap_spec.rb
Ruby
apache-2.0
7,843
main
1,072
require 'spec_helper' require 'puppet_spec/compiler' require 'matchers/resource' describe 'the unwrap function' do include PuppetSpec::Compiler include Matchers::Resource it 'unwraps a sensitive value' do code = <<-CODE $sensitive = Sensitive.new("12345") notice("unwrapped value is ${sensitive....
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/functions/then_spec.rb
Ruby
apache-2.0
7,843
main
1,271
require 'spec_helper' require 'puppet_spec/compiler' require 'matchers/resource' describe 'the then function' do include PuppetSpec::Compiler include Matchers::Resource it 'calls a lambda passing one argument' do expect(compile_to_catalog("then(testing) |$x| { notify { $x: } }")).to have_resource('Notify[t...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/functions/step_spec.rb
Ruby
apache-2.0
7,843
main
3,835
require 'puppet' require 'spec_helper' require 'puppet_spec/compiler' require 'shared_behaviours/iterative_functions' describe 'the step method' do include PuppetSpec::Compiler it 'raises an error when given a type that cannot be iterated' do expect do compile_to_catalog(<<-MANIFEST) 3.14.step(...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/functions/all_spec.rb
Ruby
apache-2.0
7,843
main
2,757
require 'puppet' require 'spec_helper' require 'puppet_spec/compiler' require 'shared_behaviours/iterative_functions' describe 'the all method' do include PuppetSpec::Compiler context "should be callable as" do it 'all on an array' do catalog = compile_to_catalog(<<-MANIFEST) $a = [1,2,3] ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/functions/break_spec.rb
Ruby
apache-2.0
7,843
main
7,354
require 'spec_helper' require 'puppet_spec/compiler' require 'matchers/resource' describe 'the break function' do include PuppetSpec::Compiler include Matchers::Resource context do it 'breaks iteration as if at end of input in a map for an array' do expect(compile_to_catalog(<<-CODE)).to have_resour...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/functions/assert_type_spec.rb
Ruby
apache-2.0
7,843
main
3,416
require 'spec_helper' require 'puppet/pops' require 'puppet/loaders' require 'puppet_spec/compiler' describe 'the assert_type function' do include PuppetSpec::Compiler after(:all) { Puppet::Pops::Loaders.clear } let(:loaders) { Puppet::Pops::Loaders.new(Puppet::Node::Environment.create(:testing, [])) } let(:...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/agent/disabler_spec.rb
Ruby
apache-2.0
7,843
main
2,086
require 'spec_helper' require 'puppet/agent' require 'puppet/agent/locker' class DisablerTester include Puppet::Agent::Disabler end describe Puppet::Agent::Disabler do before do @disabler = DisablerTester.new end ## These tests are currently very implementation-specific, and they rely heavily on ## ha...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/agent/locker_spec.rb
Ruby
apache-2.0
7,843
main
3,490
require 'spec_helper' require 'puppet/agent' require 'puppet/agent/locker' class LockerTester include Puppet::Agent::Locker end describe Puppet::Agent::Locker do before do @locker = LockerTester.new end ## These tests are currently very implementation-specific, and they rely heavily on ## having acces...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/forge/repository_spec.rb
Ruby
apache-2.0
7,843
main
5,235
# encoding: utf-8 require 'spec_helper' require 'net/http' require 'puppet/forge/repository' require 'puppet/forge/cache' require 'puppet/forge/errors' describe Puppet::Forge::Repository do before(:all) do # any local http proxy will break these tests ENV['http_proxy'] = nil ENV['HTTP_PROXY'] = nil end...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/forge/forge_spec.rb
Ruby
apache-2.0
7,843
main
2,939
# encoding: utf-8 require 'spec_helper' require 'net/http' require 'puppet/forge/repository' describe Puppet::Forge do before(:all) do # any local http proxy will break these tests ENV['http_proxy'] = nil ENV['HTTP_PROXY'] = nil end let(:host) { 'http://fake.com' } let(:forge) { Puppet::Forge.new(...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/forge/module_release_spec.rb
Ruby
apache-2.0
7,843
main
10,754
# encoding: utf-8 require 'spec_helper' require 'puppet/forge' require 'net/http' require 'puppet/module_tool' require 'puppet_spec/files' describe Puppet::Forge::ModuleRelease do include PuppetSpec::Files let(:agent) { "Test/1.0" } let(:repository) { Puppet::Forge::Repository.new('http://fake.com', agent) } ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
spec/unit/forge/errors_spec.rb
Ruby
apache-2.0
7,843
main
2,956
require 'spec_helper' require 'puppet/forge' describe Puppet::Forge::Errors do describe 'SSLVerifyError' do subject { Puppet::Forge::Errors::SSLVerifyError } let(:exception) { subject.new(:uri => 'https://fake.com:1111') } it 'should return a valid single line error' do expect(exception.message).t...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet.rb
Ruby
apache-2.0
7,843
main
13,335
# frozen_string_literal: true require_relative 'puppet/version' require_relative 'puppet/concurrent/synchronized' Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '3.1.0' if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION) raise LoadError, "Puppet #{Puppet.version} requires Ru...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet_x.rb
Ruby
apache-2.0
7,843
main
506
# frozen_string_literal: true # The Puppet Extensions Module. # # Submodules of this module should be named after the publisher (e.g. # 'user' part of a Puppet Module name). You should also add the module # name to avoid further conflicts in the same namespace. So the # structure should be # `lib/puppet_x/<namespace>/...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/hiera_puppet.rb
Ruby
apache-2.0
7,843
main
1,805
# frozen_string_literal: true Puppet.features.hiera? require 'hiera/scope' require_relative 'puppet' module HieraPuppet module_function def lookup(key, default, scope, override, resolution_type) scope = Hiera::Scope.new(scope) answer = hiera.lookup(key, default, scope, override, resolution_type) if...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet_pal.rb
Ruby
apache-2.0
7,843
main
331
# frozen_string_literal: true # Puppet as a Library "PAL" # This is the entry point when using PAL as a standalone library. # # This requires all of puppet because 'settings' and many other things are still required in PAL. # Eventually that will not be the case. # require_relative 'puppet' require_relative 'puppet/pa...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/node.rb
Ruby
apache-2.0
7,843
main
8,473
# frozen_string_literal: true require_relative '../puppet/indirector' # A class for managing nodes, including their facts and environment. class Puppet::Node require_relative 'node/facts' require_relative 'node/environment' # Set up indirection, so that nodes can be looked for in # the node sources. extend...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/coercion.rb
Ruby
apache-2.0
7,843
main
1,052
# frozen_string_literal: true # Various methods used to coerce values into a canonical form. # # @api private module Puppet::Coercion # Try to coerce various input values into boolean true/false # # Only a very limited subset of values are allowed. This method does not try # to provide a generic "truthiness" s...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/x509.rb
Ruby
apache-2.0
7,843
main
328
# frozen_string_literal: true require_relative '../puppet' require_relative '../puppet/ssl/openssl_loader' # Responsible for loading and saving certificates and private keys. # # @see Puppet::X509::CertProvider # @api private module Puppet::X509 require_relative 'x509/pem_store' require_relative 'x509/cert_provid...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/trusted_external.rb
Ruby
apache-2.0
7,843
main
1,826
# frozen_string_literal: true # A method for retrieving external trusted facts module Puppet::TrustedExternal def retrieve(certname) command = Puppet[:trusted_external_command] return nil unless command Puppet.debug { _("Retrieving trusted external data from %{command}") % { command: command } } set...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/confiner.rb
Ruby
apache-2.0
7,843
main
1,771
# frozen_string_literal: true require_relative '../puppet/confine_collection' # The Confiner module contains methods for managing a Provider's confinement (suitability under given # conditions). The intent is to include this module in an object where confinement management is wanted. # It lazily adds an instance vari...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/compilable_resource_type.rb
Ruby
apache-2.0
7,843
main
775
# frozen_string_literal: true require_relative '../puppet' # The CompilableResourceType module should be either included in a class or used as a class extension # to mark that the instance used as the 'resource type' of a resource instance # is an object that is compatible with Puppet::Type's API wrt. compiling. # Pup...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/daemon.rb
Ruby
apache-2.0
7,843
main
5,402
# frozen_string_literal: true require_relative '../puppet/application' require_relative '../puppet/scheduler' # Run periodic actions in a daemonized process. # # A Daemon has 2 parts: # * config reparse # * an agent that responds to #run # # The config reparse will occur periodically based on Settings. The agent ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/etc.rb
Ruby
apache-2.0
7,843
main
7,824
# frozen_string_literal: true require_relative '../puppet/util/character_encoding' # Wrapper around Ruby Etc module allowing us to manage encoding in a single # place. # This represents a subset of Ruby's Etc module, only the methods required by Puppet. # On Ruby 2.1.0 and later, Etc returns strings in variable encod...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/ssl.rb
Ruby
apache-2.0
7,843
main
767
# frozen_string_literal: true # Just to make the constants work out. require_relative '../puppet' require_relative 'ssl/openssl_loader' # Responsible for bootstrapping an agent's certificate and private key, generating # SSLContexts for use in making HTTPS connections, and handling CSR attributes and # certificate ex...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/confine.rb
Ruby
apache-2.0
7,843
main
1,710
# frozen_string_literal: true # The class that handles testing whether our providers # actually work or not. require_relative '../puppet/util' class Puppet::Confine include Puppet::Util @tests = {} class << self attr_accessor :name end def self.inherited(klass) name = klass.to_s.split("::").pop.d...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/file_system.rb
Ruby
apache-2.0
7,843
main
12,649
# frozen_string_literal: true module Puppet::FileSystem require_relative '../puppet/util' require_relative 'file_system/path_pattern' require_relative 'file_system/file_impl' require_relative 'file_system/memory_file' require_relative 'file_system/memory_impl' require_relative 'file_system/uniquefile' #...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/transaction.rb
Ruby
apache-2.0
7,843
main
18,716
# frozen_string_literal: true require_relative '../puppet' require_relative '../puppet/util/tagging' require_relative '../puppet/util/skip_tags' require_relative '../puppet/application' require 'digest/sha1' require 'set' # the class that actually walks our resource/property tree, collects the changes, # and performs...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/error.rb
Ruby
apache-2.0
7,843
main
4,068
# frozen_string_literal: true module Puppet # The base class for all Puppet errors. It can wrap another exception class Error < RuntimeError attr_accessor :original def initialize(message, original = nil) super(message.scrub) @original = original end end module ExternalFileError #...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/forge.rb
Ruby
apache-2.0
7,843
main
8,216
# frozen_string_literal: true require_relative '../puppet/vendor' Puppet::Vendor.load_vendored require 'net/http' require 'tempfile' require 'uri' require 'pathname' require_relative '../puppet/util/json' require 'semantic_puppet' class Puppet::Forge < SemanticPuppet::Dependency::Source require_relative 'forge/cac...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/provider.rb
Ruby
apache-2.0
7,843
main
24,983
# frozen_string_literal: true # A Provider is an implementation of the actions that manage resources (of some type) on a system. # This class is the base class for all implementation of a Puppet Provider. # # Concepts: #-- # * **Confinement** - confinement restricts providers to only be applicable under certain condit...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/loaders.rb
Ruby
apache-2.0
7,843
main
1,493
# frozen_string_literal: true require_relative '../puppet/concurrent/synchronized' module Puppet module Pops require_relative '../puppet/pops/loaders' module Loader require_relative '../puppet/pops/loader/typed_name' require_relative '../puppet/pops/loader/loader' require_relative '../pup...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/context.rb
Ruby
apache-2.0
7,843
main
5,592
# frozen_string_literal: true require_relative '../puppet/thread_local' # Puppet::Context is a system for tracking services and contextual information # that puppet needs to be able to run. Values are "bound" in a context when it is created # and cannot be changed; however a child context can be created, using # {#ov...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/indirector.rb
Ruby
apache-2.0
7,843
main
2,750
# frozen_string_literal: true # Manage indirections to termini. They are organized in terms of indirections - # - e.g., configuration, node, file, certificate -- and each indirection has one # or more terminus types defined. The indirection is configured via the # +indirects+ method, which will be called by the clas...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/scheduler.rb
Ruby
apache-2.0
7,843
main
457
# frozen_string_literal: true module Puppet::Scheduler require_relative 'scheduler/job' require_relative 'scheduler/splay_job' require_relative 'scheduler/scheduler' require_relative 'scheduler/timer' module_function def create_job(interval, splay = false, splay_limit = 0, &block) if splay Pupp...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/facter_impl.rb
Ruby
apache-2.0
7,843
main
1,676
# frozen_string_literal: true # # @api private # Default Facter implementation that delegates to Facter API # module Puppet class FacterImpl def initialize require 'facter' setup_logging end def value(fact_name) ::Facter.value(fact_name) end def add(name, &block) ::Fac...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/data_binding.rb
Ruby
apache-2.0
7,843
main
510
# frozen_string_literal: true require_relative '../puppet/indirector' # A class for managing data lookups class Puppet::DataBinding # Set up indirection, so that data can be looked for in the compiler extend Puppet::Indirector indirects(:data_binding, :terminus_setting => :data_binding_terminus, ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face.rb
Ruby
apache-2.0
7,843
main
639
# frozen_string_literal: true # The public name of this feature is 'face', but we have hidden all the # plumbing over in the 'interfaces' namespace to make clear the distinction # between the two. # # This file exists to ensure that the public name is usable without revealing # the details of the implementation; you r...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/property.rb
Ruby
apache-2.0
7,843
main
26,963
# frozen_string_literal: true # The virtual base class for properties, which are the self-contained building # blocks for actually doing work on the system. require_relative '../puppet' require_relative '../puppet/parameter' # The Property class is the implementation of a resource's attributes of _property_ kind. # ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/resource.rb
Ruby
apache-2.0
7,843
main
21,185
# frozen_string_literal: true require_relative '../puppet' require_relative '../puppet/util/tagging' require_relative '../puppet/parameter' # The simplest resource class. Eventually it will function as the # base class for all resource-like behaviour. # # @api public class Puppet::Resource include Puppet::Util::Ta...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/reports.rb
Ruby
apache-2.0
7,843
main
3,094
# frozen_string_literal: true require_relative '../puppet/util/instance_loader' # This class is an implementation of a simple mechanism for loading and returning reports. # The intent is that a user registers a report by calling {register_report} and providing a code # block that performs setup, and defines a method ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/interface.rb
Ruby
apache-2.0
7,843
main
7,396
# frozen_string_literal: true require_relative '../puppet' require_relative '../puppet/util/autoload' require 'prettyprint' # @api public class Puppet::Interface require_relative 'interface/documentation' require_relative 'interface/face_collection' require_relative 'interface/action' require_relative 'inter...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/environments.rb
Ruby
apache-2.0
7,843
main
16,641
# frozen_string_literal: true require_relative '../puppet/concurrent/synchronized' # @api private module Puppet::Environments class EnvironmentNotFound < Puppet::Error def initialize(environment_name, original = nil) environmentpath = Puppet[:environmentpath] super("Could not find a directory enviro...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/type.rb
Ruby
apache-2.0
7,843
main
100,801
# -*- coding: utf-8 -*- # frozen_string_literal: true require_relative '../puppet' require_relative '../puppet/util/log' require_relative '../puppet/util/metric' require_relative '../puppet/property' require_relative '../puppet/parameter' require_relative '../puppet/util' require_relative '../puppet/util/autoload' req...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/pops.rb
Ruby
apache-2.0
7,843
main
3,887
# frozen_string_literal: true module Puppet # The Pops language system. This includes the parser, evaluator, AST model, and # Binder. # # @todo Explain how a user should use this to parse and evaluate the puppet # language. # # @note Warning: Pops is still considered experimental, as such the API may ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/http.rb
Ruby
apache-2.0
7,843
main
1,518
# frozen_string_literal: true module Puppet # Contains an HTTP client for making network requests to puppet and other # HTTP servers. # # @see Puppet::HTTP::Client # @see Puppet::HTTP::HTTPError # @see Puppet::HTTP::Response # @api public module HTTP ACCEPT_ENCODING = "gzip;q=1.0,deflate;q=0.6,iden...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/info_service.rb
Ruby
apache-2.0
7,843
main
1,021
# frozen_string_literal: true module Puppet::InfoService require_relative 'info_service/class_information_service' require_relative 'info_service/task_information_service' require_relative 'info_service/plan_information_service' def self.classes_per_environment(env_file_hash) Puppet::InfoService::ClassInf...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/application.rb
Ruby
apache-2.0
7,843
main
20,403
# frozen_string_literal: true require 'optparse' require_relative '../puppet/util/command_line' require_relative '../puppet/util/constant_inflector' require_relative '../puppet/error' require_relative '../puppet/application_support' module Puppet # Defines an abstract Puppet application. # # # Usage # # To create a n...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/defaults.rb
Ruby
apache-2.0
7,843
main
103,197
# frozen_string_literal: true require_relative '../puppet/util/platform' module Puppet def self.default_diffargs '-u' end # If you modify this, update puppet/type/file/checksum.rb too def self.default_digest_algorithm 'sha256' end def self.valid_digest_algorithms Puppet::Util::Platform.fips_...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parameter.rb
Ruby
apache-2.0
7,843
main
21,856
# frozen_string_literal: true require_relative '../puppet/util/logging' require_relative '../puppet/util/docs' # The Parameter class is the implementation of a resource's attributes of _parameter_ kind. # The Parameter class is also the base class for {Puppet::Property}, and is used to describe meta-parameters # (par...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/util.rb
Ruby
apache-2.0
7,843
main
25,125
# frozen_string_literal: true # A module to collect utility functions. require 'English' require_relative '../puppet/error' require_relative 'util/execution_stub' require 'uri' require 'pathname' require 'ostruct' require_relative 'util/platform' require_relative 'util/windows' require_relative 'util/symbolic_file_mo...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/module_tool.rb
Ruby
apache-2.0
7,843
main
7,115
# encoding: UTF-8 # frozen_string_literal: true # Load standard libraries require 'pathname' require 'fileutils' require_relative '../puppet/util/colors' module Puppet module ModuleTool require_relative 'module_tool/tar' extend Puppet::Util::Colors # Directory and names that should not be checksummed. ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/configurer.rb
Ruby
apache-2.0
7,843
main
29,528
# frozen_string_literal: true # The client for interacting with the puppetmaster config server. require 'timeout' require_relative '../puppet/util' require 'securerandom' # require 'puppet/parser/script_compiler' require_relative '../puppet/pops/evaluator/deferred_resolver' class Puppet::Configurer require_relative...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/functions.rb
Ruby
apache-2.0
7,843
main
33,536
# frozen_string_literal: true # Functions in the puppet language can be written in Ruby and distributed in # puppet modules. The function is written by creating a file in the module's # `lib/puppet/functions/<modulename>` directory, where `<modulename>` is # replaced with the module's name. The file should have the na...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/datatypes.rb
Ruby
apache-2.0
7,843
main
7,840
# frozen_string_literal: true # Data types in the Puppet Language can have implementations written in Ruby # and distributed in puppet modules. A data type can be declared together with # its implementation by creating a file in 'lib/puppet/functions/<modulename>'. # The name of the file must be the downcased name of ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/plugins.rb
Ruby
apache-2.0
7,843
main
283
# frozen_string_literal: true # The Puppet Plugins module defines extension points where plugins can be configured # to add or modify puppet's behavior. See the respective classes in this module for more # details. # # @api public # @since Puppet 4.0.0 # module Puppet::Plugins end
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/runtime.rb
Ruby
apache-2.0
7,843
main
1,550
# frozen_string_literal: true require_relative '../puppet/http' require_relative '../puppet/facter_impl' require 'singleton' # Provides access to runtime implementations. # # @api private class Puppet::Runtime include Singleton def initialize @runtime_services = { http: proc do klass = Puppet::...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/agent.rb
Ruby
apache-2.0
7,843
main
6,221
# frozen_string_literal: true require_relative '../puppet/application' require_relative '../puppet/error' require_relative '../puppet/util/at_fork' require 'timeout' # A general class for triggering a run of another # class. class Puppet::Agent require_relative 'agent/locker' include Puppet::Agent::Locker req...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/confine_collection.rb
Ruby
apache-2.0
7,843
main
1,303
# frozen_string_literal: true # Manage a collection of confines, returning a boolean or # helpful information. require_relative '../puppet/confine' class Puppet::ConfineCollection def confine(hash) if hash.include?(:for_binary) for_binary = true hash.delete(:for_binary) else for_binary = f...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/vendor.rb
Ruby
apache-2.0
7,843
main
2,046
# frozen_string_literal: true module Puppet # Simple module to manage vendored code. # # To vendor a library: # # * Download its whole git repo or untar into `lib/puppet/vendor/<libname>` # * Create a vendor/puppetload_libraryname.rb file to add its libdir into the $:. # (Look at existing load_xxx file...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/application_support.rb
Ruby
apache-2.0
7,843
main
3,190
# frozen_string_literal: true require 'yaml' require_relative '../puppet' require_relative '../puppet/node/environment' require_relative '../puppet/file_system' require_relative '../puppet/indirector' module Puppet module ApplicationSupport # Pushes a Puppet Context configured with a remote environment for an ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/version.rb
Ruby
apache-2.0
7,843
main
3,747
# frozen_string_literal: true # The version method and constant are isolated in puppet/version.rb so that a # simple `require 'puppet/version'` allows a rubygems gemspec or bundler # Gemfile to get the Puppet version of the gem install. # # The version can be set programmatically because we want to allow the # Raketas...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/graph.rb
Ruby
apache-2.0
7,843
main
302
# frozen_string_literal: true module Puppet::Graph require_relative 'graph/prioritizer' require_relative 'graph/sequential_prioritizer' require_relative 'graph/simple_graph' require_relative 'graph/rb_tree_map' require_relative 'graph/key' require_relative 'graph/relationship_graph' end
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/settings.rb
Ruby
apache-2.0
7,843
main
54,853
# frozen_string_literal: true require_relative '../puppet' require 'getoptlong' require_relative '../puppet/util/watched_file' require_relative '../puppet/util/command_line/puppet_option_parser' require 'forwardable' require 'fileutils' require 'concurrent' require_relative 'concurrent/lock' # The class for handling ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/module.rb
Ruby
apache-2.0
7,843
main
13,381
# frozen_string_literal: true require_relative '../puppet/util/logging' require_relative 'module/task' require_relative 'module/plan' require_relative '../puppet/util/json' require 'semantic_puppet/gem_version' # Support for modules class Puppet::Module class Error < Puppet::Error; end class MissingModule < Error...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser.rb
Ruby
apache-2.0
7,843
main
658
# frozen_string_literal: true # is only needed to create the name space module Puppet::Parser; end require_relative 'parser/ast' require_relative 'parser/abstract_compiler' require_relative 'parser/compiler' require_relative 'parser/compiler/catalog_validator' require_relative '../puppet/resource/type_collection' re...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/relationship.rb
Ruby
apache-2.0
7,843
main
2,066
# frozen_string_literal: true # subscriptions are permanent associations determining how different # objects react to an event # This is Puppet's class for modeling edges in its configuration graph. # It used to be a subclass of GRATR::Edge, but that class has weird hash # overrides that dramatically slow down the gr...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/config.rb
Ruby
apache-2.0
7,843
main
10,605
# frozen_string_literal: true require_relative '../../puppet/face' require_relative '../../puppet/settings/ini_file' Puppet::Face.define(:config, '0.0.1') do extend Puppet::Util::Colors copyright "Puppet Inc.", 2011 license _("Apache 2 license; see COPYING") summary _("Interact with Puppet's settings.") ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/resource.rb
Ruby
apache-2.0
7,843
main
1,724
# frozen_string_literal: true require_relative '../../puppet/indirector/face' Puppet::Indirector::Face.define(:resource, '0.0.1') do copyright "Puppet Inc.", 2011 license _("Apache 2 license; see COPYING") summary _("API only: interact directly with resources via the RAL.") description <<-'EOT' API onl...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/report.rb
Ruby
apache-2.0
7,843
main
1,845
# frozen_string_literal: true require_relative '../../puppet/indirector/face' Puppet::Indirector::Face.define(:report, '0.0.1') do copyright "Puppet Inc.", 2011 license _("Apache 2 license; see COPYING") summary _("Create, display, and submit reports.") save = get_action(:save) save.summary _("API only:...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/module.rb
Ruby
apache-2.0
7,843
main
708
# frozen_string_literal: true require_relative '../../puppet/face' require_relative '../../puppet/module_tool' require_relative '../../puppet/util/colors' Puppet::Face.define(:module, '1.0.0') do extend Puppet::Util::Colors copyright "Puppet Inc.", 2012 license _("Apache 2 license; see COPYING") summary _...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/parser.rb
Ruby
apache-2.0
7,843
main
7,507
# frozen_string_literal: true require_relative '../../puppet/face' require_relative '../../puppet/parser' Puppet::Face.define(:parser, '0.0.1') do copyright "Puppet Inc.", 2014 license _("Apache 2 license; see COPYING") summary _("Interact directly with the parser.") action :validate do summary _("Val...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/epp.rb
Ruby
apache-2.0
7,843
main
22,445
# frozen_string_literal: true require_relative '../../puppet/face' require_relative '../../puppet/pops' require_relative '../../puppet/parser/files' require_relative '../../puppet/file_system' Puppet::Face.define(:epp, '0.0.1') do copyright "Puppet Inc.", 2014 license _("Apache 2 license; see COPYING") summa...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/node.rb
Ruby
apache-2.0
7,843
main
1,758
# frozen_string_literal: true require_relative '../../puppet/indirector/face' Puppet::Indirector::Face.define(:node, '0.0.1') do copyright "Puppet Inc.", 2011 license _("Apache 2 license; see COPYING") summary _("View and manage node definitions.") description <<-'EOT' This subcommand interacts with nod...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/plugin.rb
Ruby
apache-2.0
7,843
main
2,035
# frozen_string_literal: true require_relative '../../puppet/face' require_relative '../../puppet/configurer/plugin_handler' Puppet::Face.define(:plugin, '0.0.1') do copyright "Puppet Inc.", 2011 license _("Apache 2 license; see COPYING") summary _("Interact with the Puppet plugin system.") description <<-...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/generate.rb
Ruby
apache-2.0
7,843
main
2,351
# frozen_string_literal: true require_relative '../../puppet/face' require_relative '../../puppet/generate/type' # Create the Generate face Puppet::Face.define(:generate, '0.1.0') do copyright 'Puppet Inc.', 2016 license _('Apache 2 license; see COPYING') summary _('Generates Puppet code from Ruby definition...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/facts.rb
Ruby
apache-2.0
7,843
main
5,630
# frozen_string_literal: true require_relative '../../puppet/indirector/face' require_relative '../../puppet/node/facts' Puppet::Indirector::Face.define(:facts, '0.0.1') do copyright "Puppet Inc.", 2011 license _("Apache 2 license; see COPYING") summary _("Retrieve and store facts.") description <<-'EOT' ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/catalog.rb
Ruby
apache-2.0
7,843
main
5,769
# frozen_string_literal: true require_relative '../../puppet/indirector/face' Puppet::Indirector::Face.define(:catalog, '0.0.1') do copyright "Puppet Inc.", 2011 license "Apache 2 license; see COPYING" summary _("Compile, save, view, and convert catalogs.") description <<-'EOT' This subcommand deals wi...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/help.rb
Ruby
apache-2.0
7,843
main
9,060
# frozen_string_literal: true require_relative '../../puppet/face' require_relative '../../puppet/application/face_base' require_relative '../../puppet/util/constant_inflector' require 'pathname' require 'erb' Puppet::Face.define(:help, '0.0.1') do copyright "Puppet Inc.", 2011 license _("Apache 2 license; see ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/node/clean.rb
Ruby
apache-2.0
7,843
main
3,391
# frozen_string_literal: true Puppet::Face.define(:node, '0.0.1') do action(:clean) do summary _("Clean up signed certs, cached facts, node objects, and reports for a node stored by the puppetmaster") arguments _("<host1> [<host2> ...]") description <<-'EOT' Cleans up the following information a pu...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/module/list.rb
Ruby
apache-2.0
7,843
main
9,608
# encoding: UTF-8 # frozen_string_literal: true Puppet::Face.define(:module, '1.0.0') do action(:list) do summary _("List installed modules") description <<-HEREDOC Lists the installed puppet modules. By default, this action scans the modulepath from puppet.conf's `[main]` block; use the --module...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/module/install.rb
Ruby
apache-2.0
7,843
main
5,727
# encoding: UTF-8 # frozen_string_literal: true require_relative '../../../puppet/forge' require_relative '../../../puppet/module_tool/install_directory' require 'pathname' Puppet::Face.define(:module, '1.0.0') do action(:install) do summary _("Install a module from the Puppet Forge or a release archive.") ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/module/upgrade.rb
Ruby
apache-2.0
7,843
main
2,803
# encoding: UTF-8 # frozen_string_literal: true Puppet::Face.define(:module, '1.0.0') do action(:upgrade) do summary _("Upgrade a puppet module.") description <<-EOT Upgrades a puppet module. Note: Module upgrade uses MD5 checksums, which are prohibited on FIPS enabled systems. EOT retur...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/module/changes.rb
Ruby
apache-2.0
7,843
main
1,398
# frozen_string_literal: true Puppet::Face.define(:module, '1.0.0') do action(:changes) do summary _("Show modified files of an installed module.") description <<-EOT Shows any files in a module that have been modified since it was installed. This action compares the files on disk to the md5 chec...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/module/uninstall.rb
Ruby
apache-2.0
7,843
main
3,371
# frozen_string_literal: true Puppet::Face.define(:module, '1.0.0') do action(:uninstall) do summary _("Uninstall a puppet module.") description <<-EOT Uninstalls a puppet module from the modulepath (or a specific target directory). Note: Module uninstall uses MD5 checksums, which are prohi...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/face/catalog/select.rb
Ruby
apache-2.0
7,843
main
1,793
# frozen_string_literal: true # Select and show a list of resources of a given type. Puppet::Face.define(:catalog, '0.0.1') do action :select do summary _("Retrieve a catalog and filter it for resources of a given type.") arguments _("<host> <resource_type>") returns _(<<-'EOT') A list of resource ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/file_bucket/file.rb
Ruby
apache-2.0
7,843
main
3,001
# frozen_string_literal: true require_relative '../../puppet/file_bucket' require_relative '../../puppet/indirector' require_relative '../../puppet/util/checksums' require 'digest/md5' require 'stringio' class Puppet::FileBucket::File # This class handles the abstract notion of a file in a filebucket. # There are...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/file_bucket/dipper.rb
Ruby
apache-2.0
7,843
main
5,630
# frozen_string_literal: true require 'pathname' require_relative '../../puppet/file_bucket' require_relative '../../puppet/file_bucket/file' require_relative '../../puppet/indirector/request' require_relative '../../puppet/util/diff' require 'tempfile' class Puppet::FileBucket::Dipper include Puppet::Util::Checksu...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/datatypes/error.rb
Ruby
apache-2.0
7,843
main
776
# 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...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/datatypes/impl/error.rb
Ruby
apache-2.0
7,843
main
973
# 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'] ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/resource.rb
Ruby
apache-2.0
7,843
main
11,235
# frozen_string_literal: true require_relative '../../puppet/resource' # The primary difference between this class and its # parent is that this class has rules on who can set # parameters class Puppet::Parser::Resource < Puppet::Resource require_relative 'resource/param' require_relative '../../puppet/util/taggi...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/compiler.rb
Ruby
apache-2.0
7,843
main
21,091
# frozen_string_literal: true require 'forwardable' require_relative '../../puppet/node' require_relative '../../puppet/resource/catalog' require_relative '../../puppet/util/errors' require_relative '../../puppet/loaders' require_relative '../../puppet/pops' # Maintain a graph of scopes, along with a bunch of data ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/relationship.rb
Ruby
apache-2.0
7,843
main
3,081
# frozen_string_literal: true class Puppet::Parser::Relationship attr_accessor :source, :target, :type PARAM_MAP = { :relationship => :before, :subscription => :notify } def arrayify(resources, left) case resources when Puppet::Pops::Evaluator::Collectors::AbstractCollector # on the LHS, go as fa...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/scope.rb
Ruby
apache-2.0
7,843
main
36,735
# frozen_string_literal: true # The scope class, which handles storing and retrieving variables and types and # such. require 'forwardable' require_relative '../../puppet/parser' require_relative '../../puppet/parser/templatewrapper' require_relative '../../puppet/parser/resource' # This class is part of the interna...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/functions.rb
Ruby
apache-2.0
7,843
main
11,812
# frozen_string_literal: true require_relative '../../puppet/util/autoload' require_relative '../../puppet/parser/scope' require_relative '../../puppet/pops/adaptable' require_relative '../../puppet/concurrent/lock' # A module for managing parser functions. Each specified function # is added to a central module that...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/catalog_compiler.rb
Ruby
apache-2.0
7,843
main
1,681
# frozen_string_literal: true require_relative '../../puppet/loaders' require_relative '../../puppet/pops' # A Catalog "compiler" that is like the regular compiler but with an API # that is harmonized with the ScriptCompiler # # The Script compiler is "one shot" - it does not support rechecking if underlying source h...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/e4_parser_adapter.rb
Ruby
apache-2.0
7,843
main
1,491
# frozen_string_literal: true require_relative '../../puppet/pops' module Puppet module Parser # Adapts an egrammar/eparser to respond to the public API of the classic parser # and makes use of the new evaluator. # class E4ParserAdapter def initialize @file = '' @string = '' @use = :unspecified end ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/files.rb
Ruby
apache-2.0
7,843
main
3,175
# frozen_string_literal: true module Puppet::Parser::Files module_function # Return a list of manifests as absolute filenames matching the given # pattern. # # @param pattern [String] A reference for a file in a module. It is the # format "<modulename>/<file glob>" # @param environment [Puppet::Node::...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
lib/puppet/parser/ast.rb
Ruby
apache-2.0
7,843
main
2,043
# frozen_string_literal: true # The base class for the 3x "parse tree", now only used by the top level # constructs and the compiler. # Handles things like file name, line #, and also does the initialization # for all of the parameters of all of the child objects. # class Puppet::Parser::AST AST = Puppet::Parser::AS...