repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/bad_func_load3.rb
spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/bad_func_load3.rb
module Puppet::Parser::Functions newfunction(:bad_func_load3, :type => :rvalue, :doc => <<-EOS A function using the 3x API EOS ) do |arguments| def bad_func_load3_illegal_method "some return value from illegal method" end "some return value" end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/func_with_syntax_error.rb
spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/func_with_syntax_error.rb
module Puppet::Parser::Functions newfunction(:func_with_syntax_error, :type => :rvalue, :doc => <<-EOS A function using the 3x API having a syntax error EOS ) do |arguments| # this syntax error is here on purpose! 1+ + + + end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/lib/puppet/functions/rb_func_a.rb
spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/lib/puppet/functions/rb_func_a.rb
Puppet::Functions.create_function(:rb_func_a) do def rb_func_a() "I am rb_func_a()" end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/lib/puppet/functions/modulea/rb_func_a.rb
spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/lib/puppet/functions/modulea/rb_func_a.rb
Puppet::Functions.create_function(:'modulea::rb_func_a') do def rb_func_a() "I am modulea::rb_func_a()" end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/pops/loaders/loaders/wo_metadata_module/modules/moduleb/lib/puppet/functions/moduleb/rb_func_b.rb
spec/fixtures/unit/pops/loaders/loaders/wo_metadata_module/modules/moduleb/lib/puppet/functions/moduleb/rb_func_b.rb
Puppet::Functions.create_function(:'moduleb::rb_func_b') do def rb_func_b() # Should be able to call modulea::rb_func_a() call_function('modulea::rb_func_a') + " + I am moduleb::rb_func_b()" end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/data_providers/environments/production/modules/abc/lib/puppet/functions/abc/data.rb
spec/fixtures/unit/data_providers/environments/production/modules/abc/lib/puppet/functions/abc/data.rb
Puppet::Functions.create_function(:'abc::data') do def data() { 'abc::def::test1' => 'module_test1', 'abc::def::test2' => 'module_test2', 'abc::def::test3' => 'module_test3', 'abc::def::ipl' => '%{lookup("abc::def::test2")}-ipl' } end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/data_providers/environments/production/lib/puppet/functions/environment/data.rb
spec/fixtures/unit/data_providers/environments/production/lib/puppet/functions/environment/data.rb
Puppet::Functions.create_function(:'environment::data') do def data() { 'abc::def::test1' => 'env_test1', 'abc::def::test2' => 'env_test2', 'xyz::def::test1' => 'env_test1', 'xyz::def::test2' => 'env_test2' } end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/functions/lookup_fixture/environments/production/modules/bad_data/lib/puppet/functions/bad_data/data.rb
spec/fixtures/unit/functions/lookup_fixture/environments/production/modules/bad_data/lib/puppet/functions/bad_data/data.rb
Puppet::Functions.create_function(:'bad_data::data') do def data() { 'b' => 'module_b', # Intentionally bad key (no module prefix) 'bad_data::c' => 'module_c' # Good key. Should be OK } end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/functions/lookup_fixture/environments/production/modules/abc/lib/puppet/functions/abc/data.rb
spec/fixtures/unit/functions/lookup_fixture/environments/production/modules/abc/lib/puppet/functions/abc/data.rb
Puppet::Functions.create_function(:'abc::data') do def data() { 'abc::b' => 'module_b', 'abc::c' => 'module_c', 'abc::e' => { 'k1' => 'module_e1', 'k2' => 'module_e2' }, 'abc::f' => { 'k1' => { 's1' => 'module_f11', 's3' => 'module_f13' }, 'k2' => { 's1' => 'module_f21', 's2' => 'module_f22' }}...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/functions/lookup_fixture/environments/production/modules/bca/lib/puppet/functions/bca/data.rb
spec/fixtures/unit/functions/lookup_fixture/environments/production/modules/bca/lib/puppet/functions/bca/data.rb
Puppet::Functions.create_function(:'bca::data') do def data() { 'bca::b' => 'module_bca_b', 'bca::c' => 'module_bca_c', 'bca::e' => { 'k1' => 'module_bca_e1', 'k2' => 'module_bca_e2' }, 'bca::f' => { 'k1' => { 's1' => 'module_bca_f11', 's3' => 'module_bca_f13' }, 'k2' => { 's1' => 'module_bca_f...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/functions/lookup_fixture/environments/production/modules/meta/lib/puppet/functions/meta/data.rb
spec/fixtures/unit/functions/lookup_fixture/environments/production/modules/meta/lib/puppet/functions/meta/data.rb
Puppet::Functions.create_function(:'meta::data') do def data() { 'meta::b' => 'module_b', 'meta::c' => 'module_c', 'meta::e' => { 'k1' => 'module_e1', 'k2' => 'module_e2' }, 'meta::f' => { 'k1' => { 's1' => 'module_f11', 's3' => 'module_f13' }, 'k2' => { 's1' => 'module_f21', 's2' => 'module_f2...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/functions/lookup_fixture/environments/production/lib/puppet/functions/environment/data.rb
spec/fixtures/unit/functions/lookup_fixture/environments/production/lib/puppet/functions/environment/data.rb
Puppet::Functions.create_function(:'environment::data') do def data() { 'abc::a' => 'env_a', 'abc::c' => 'env_c', 'abc::d' => { 'k1' => 'env_d1', 'k2' => 'env_d2', 'k3' => 'env_d3' }, 'abc::e' => { 'k1' => 'env_e1', 'k3' => 'env_e3' }, 'bca::e' => { 'k1' => 'env_bca_e1', 'k3' => 'env_bca_e...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/functions/lookup/hiera/backend/other_backend.rb
spec/fixtures/unit/functions/lookup/hiera/backend/other_backend.rb
class Hiera::Backend::Other_backend def lookup(key, scope, order_override, resolution_type, context) value = Hiera::Config[:other][key.to_sym] throw :no_such_key if value.nil? value end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
class Hiera::Backend::Custom_backend def lookup(key, scope, order_override, resolution_type, context) case key when 'hash_c' { 'hash_ca' => { 'cad' => 'value hash_c.hash_ca.cad (from global custom)' }} when 'hash' { 'array' => [ 'x5,x6' ] } when 'array' [ 'x5,x6' ] when 'datasour...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/unit/functions/hiera/hiera/backend/hieraspec_backend.rb
spec/fixtures/unit/functions/hiera/hiera/backend/hieraspec_backend.rb
class Hiera::Backend::Hieraspec_backend def initialize(cache = nil) Hiera.debug('Custom_backend starting') end def lookup(key, scope, order_override, resolution_type, context) case key when 'datasources' Hiera::Backend.datasources(scope, order_override) { |source| source } when 'resolution_...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/releases/jamtur01-apache/lib/puppet/type/a2mod.rb
spec/fixtures/releases/jamtur01-apache/lib/puppet/type/a2mod.rb
Puppet::Type.newtype(:a2mod) do @doc = "Manage Apache 2 modules" ensurable newparam(:name) do desc "The name of the module to be managed" isnamevar end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
Puppet::Type.type(:a2mod).provide(:debian) do desc "Manage Apache 2 modules on Debian-like OSes (e.g. Ubuntu)" commands :encmd => "a2enmod" commands :discmd => "a2dismod" defaultfor 'os.name' => [:debian, :ubuntu] def create encmd resource[:name] end def destroy discmd re...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/shared_examples/rhel_package_provider.rb
spec/shared_examples/rhel_package_provider.rb
shared_examples "RHEL package provider" do |provider_class, provider_name| describe provider_name do let(:name) { 'mypackage' } let(:resource) do Puppet::Type.type(:package).new( :name => name, :ensure => :installed, :provider => provider_name ) end let(:provi...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/shared_contexts/provider.rb
spec/shared_contexts/provider.rb
require 'spec_helper' RSpec.shared_context('provider specificity') do around do |example| old_defaults = described_class.instance_variable_get(:@defaults) old_notdefaults = described_class.instance_variable_get(:@notdefaults) begin described_class.instance_variable_set(:@defaults, []) describ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/shared_contexts/l10n.rb
spec/shared_contexts/l10n.rb
require 'spec_helper' RSpec.shared_context('l10n') do |locale| before :all do @old_locale = Locale.current Locale.current = locale @old_gettext_disabled = Puppet::GettextConfig.instance_variable_get(:@gettext_disabled) Puppet::GettextConfig.instance_variable_set(:@gettext_disabled, false) Puppet...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/shared_contexts/checksum.rb
spec/shared_contexts/checksum.rb
# Shared contexts for testing against all supported checksum types. # # These helpers define nested rspec example groups to test code against all our # supported checksum types. Example groups that need to be run against all # types should use the `with_checksum_types` helper which will # create a new example group for...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/shared_contexts/digests.rb
spec/shared_contexts/digests.rb
# Shared contexts for testing against all supported digest algorithms. # # These helpers define nested rspec example groups to test code against all our # supported digest algorithms. Example groups that need to be run against all # algorithms should use the `with_digest_algorithms` helper which will # create a new exa...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/shared_contexts/types_setup.rb
spec/shared_contexts/types_setup.rb
shared_context 'types_setup' do # Do not include the special type Unit in this list # Do not include the type Variant in this list as it needs to be parameterized to be meaningful def self.all_types [ Puppet::Pops::Types::PAnyType, Puppet::Pops::Types::PUndefType, Puppet::Pops::Types::PNotUndefTy...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/shared_contexts/https.rb
spec/shared_contexts/https.rb
require 'spec_helper' RSpec.shared_context('https client') do before :all do WebMock.disable! end after :all do WebMock.enable! end before :each do # make sure we don't take too long Puppet[:http_connect_timeout] = '5s' Puppet[:server] = '127.0.0.1' Puppet[:certname] = '127.0.0.1' ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/matchers/match_tokens2.rb
spec/lib/matchers/match_tokens2.rb
# Matches tokens produced by lexer # The given exepected is one or more entries where an entry is one of # - a token symbol # - an Array with a token symbol and the text value # - an Array with a token symbol and a Hash specifying all attributes of the token # - nil (ignore) # RSpec::Matchers.define :match_tokens2 do |...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/matchers/resource.rb
spec/lib/matchers/resource.rb
module Matchers; module Resource extend RSpec::Matchers::DSL matcher :have_resource do |expected_resource| def resource_match(expected_resource, actual_resource) matched = true failures = [] if actual_resource.ref != expected_resource matched = false failures << "expected #{e...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/matchers/relationship_graph_matchers.rb
spec/lib/matchers/relationship_graph_matchers.rb
module RelationshipGraphMatchers class EnforceOrderWithEdge def initialize(before, after) @before = before @after = after end def matches?(actual_graph) @actual_graph = actual_graph @reverse_edge = actual_graph.edge?( vertex_called(actual_graph, @after), verte...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/matchers/json.rb
spec/lib/matchers/json.rb
module JSONMatchers class SetJsonAttribute def initialize(attributes) @attributes = attributes end def format @format ||= Puppet::Network::FormatHandler.format('json') end def json(instance) Puppet::Util::Json.load(instance.to_json) end def attr_value(attrs, instance) ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/matchers/containment_matchers.rb
spec/lib/matchers/containment_matchers.rb
module ContainmentMatchers class ContainClass def initialize(containee) @containee = containee end def in(container) @container = container self end def matches?(catalog) @catalog = catalog raise ArgumentError, "You must set the container using #in" unless @contain...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/matchers/include_in_order_spec.rb
spec/lib/matchers/include_in_order_spec.rb
require 'spec_helper' require 'matchers/include_in_order' describe "Matching whether elements are included in order" do context "an empty array" do it "is included in an empty array" do expect([]).to include_in_order() end it "is included in a non-empty array" do expect([1]).to include_in_or...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/matchers/include_in_order.rb
spec/lib/matchers/include_in_order.rb
RSpec::Matchers.define :include_in_order do |*expected| match do |actual| elements = expected.dup actual.each do |elt| if elt == elements.first elements.shift end end elements.empty? end def failure_message "expected #{@actual.inspect} to include#{expected} in order" en...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/language.rb
spec/lib/puppet_spec/language.rb
require 'puppet_spec/compiler' require 'matchers/resource' module PuppetSpec::Language extend RSpec::Matchers::DSL def produces(expectations) calledFrom = caller expectations.each do |manifest, resources| it "evaluates #{manifest} to produce #{resources}" do begin case resources ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/fixtures.rb
spec/lib/puppet_spec/fixtures.rb
module PuppetSpec::Fixtures def fixtures(*rest) File.join(PuppetSpec::FIXTURE_DIR, *rest) end def my_fixture_dir callers = caller while line = callers.shift do next unless found = line.match(%r{/spec/(.*)_spec\.rb:}) return fixtures(found[1]) end fail "sorry, I couldn't work out yo...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/files.rb
spec/lib/puppet_spec/files.rb
require 'fileutils' require 'tempfile' require 'tmpdir' require 'pathname' # A support module for testing files. module PuppetSpec::Files def self.cleanup $global_tempfiles ||= [] while path = $global_tempfiles.pop do begin FileUtils.rm_rf path, secure: true rescue Errno::ENOENT #...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/matchers.rb
spec/lib/puppet_spec/matchers.rb
require 'stringio' ######################################################################## # Custom matchers... RSpec::Matchers.define :have_matching_element do |expected| match do |actual| actual.any? { |item| item =~ expected } end end RSpec::Matchers.define :have_matching_log do |expected| match do |act...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/compiler.rb
spec/lib/puppet_spec/compiler.rb
module PuppetSpec::Compiler module_function def compile_to_catalog(string, node = Puppet::Node.new('test')) Puppet[:code] = string # see lib/puppet/indirector/catalog/compiler.rb#filter Puppet::Parser::Compiler.compile(node).filter { |r| r.virtual? } end # Does not removed virtual resources in com...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/network.rb
spec/lib/puppet_spec/network.rb
require 'spec_helper' require 'puppet/network/http' require 'puppet/network/http/api/indirected_routes' require 'puppet/indirector_testing' module PuppetSpec::Network def not_found_error Puppet::Network::HTTP::Error::HTTPNotFoundError end def not_acceptable_error Puppet::Network::HTTP::Error::HTTPNotAc...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/ssl.rb
spec/lib/puppet_spec/ssl.rb
require 'openssl' module PuppetSpec module SSL PRIVATE_KEY_LENGTH = 2048 FIVE_YEARS = 5 * 365 * 24 * 60 * 60 CA_EXTENSIONS = [ ["basicConstraints", "CA:TRUE", true], ["keyUsage", "keyCertSign, cRLSign", true], ["subjectKeyIdentifier", "hash", false], ["authorityKeyIdentifier", "k...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/verbose.rb
spec/lib/puppet_spec/verbose.rb
# Support code for running stuff with warnings disabled or enabled module Kernel def with_verbose_disabled verbose, $VERBOSE = $VERBOSE, nil begin yield ensure $VERBOSE = verbose end end def with_verbose_enabled verbose, $VERBOSE = $VERBOSE, true begin yield ensure ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/settings.rb
spec/lib/puppet_spec/settings.rb
module PuppetSpec::Settings # It would probably be preferable to refactor defaults.rb such that the real definitions of # these settings were available as a variable, which was then accessible for use during tests. # However, I'm not doing that yet because I don't want to introduce any additional moving parts ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/scope.rb
spec/lib/puppet_spec/scope.rb
module PuppetSpec::Scope # Initialize a new scope suitable for testing. # def create_test_scope_for_node(node_name) node = Puppet::Node.new(node_name) compiler = Puppet::Parser::Compiler.new(node) scope = Puppet::Parser::Scope.new(compiler) scope.source = Puppet::Resource::Type.new(:node, node_nam...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/handler.rb
spec/lib/puppet_spec/handler.rb
require 'puppet/network/http/handler' class PuppetSpec::Handler include Puppet::Network::HTTP::Handler def initialize(* routes) register(routes) end def set_content_type(response, format) response[:content_type_header] = format end def set_response(response, body, status = 200) response[:bod...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/puppetserver.rb
spec/lib/puppet_spec/puppetserver.rb
require 'spec_helper' require 'webrick' require "webrick/ssl" class PuppetSpec::Puppetserver include PuppetSpec::Fixtures include PuppetSpec::Files attr_reader :ca_cert, :ca_crl, :server_cert, :server_key class NodeServlet < WEBrick::HTTPServlet::AbstractServlet def do_GET request, response node = ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/unindent.rb
spec/lib/puppet_spec/unindent.rb
class String def unindent(left_padding = '') gsub(/^#{scan(/^\s*/).min_by{ |l| l.length }}/, left_padding) end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/https.rb
spec/lib/puppet_spec/https.rb
require 'spec_helper' require 'webrick' class PuppetSpec::HTTPSServer include PuppetSpec::Fixtures attr_reader :ca_cert, :ca_crl, :server_cert, :server_key def initialize(ca_cert: nil, ca_crl: nil, server_key: nil, server_cert: nil) @ca_cert = ca_cert || cert_fixture('ca.pem') @ca_crl = ca_crl || crl_f...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/character_encoding.rb
spec/lib/puppet_spec/character_encoding.rb
# A support module for testing character encoding module PuppetSpec::CharacterEncoding def self.with_external_encoding(encoding, &blk) original_encoding = Encoding.default_external begin Encoding.default_external = encoding yield ensure Encoding.default_external = original_encoding e...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/modules.rb
spec/lib/puppet_spec/modules.rb
module PuppetSpec::Modules class << self def create(name, dir, options = {}) module_dir = File.join(dir, name) FileUtils.mkdir_p(module_dir) environment = options[:environment] metadata = options[:metadata] if metadata metadata[:source] ||= 'github' metadata[:autho...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/pops.rb
spec/lib/puppet_spec/pops.rb
module PuppetSpec::Pops extend RSpec::Matchers::DSL # Checks if an Acceptor has a specific issue in its list of diagnostics matcher :have_issue do |expected| match do |actual| actual.diagnostics.index { |i| i.issue == expected } != nil end failure_message do |actual| "expected Acceptor[#{...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/module_tool/stub_source.rb
spec/lib/puppet_spec/module_tool/stub_source.rb
module PuppetSpec module ModuleTool class StubSource < SemanticPuppet::Dependency::Source def inspect; "Stub Source"; end def host "http://nowhe.re" end def fetch(name) available_releases[name.tr('/', '-')].values end def available_releases return @ava...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet_spec/module_tool/shared_functions.rb
spec/lib/puppet_spec/module_tool/shared_functions.rb
require 'puppet/util/json' module PuppetSpec module ModuleTool module SharedFunctions def remote_release(name, version) remote_source.available_releases[name][version] end def preinstall(name, version, options = { :into => primary_dir }) release = remote_release(name, version) ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/certificate_factory.rb
spec/lib/puppet/certificate_factory.rb
require 'puppet/ssl' # This class encapsulates the logic of creating and adding extensions to X509 # certificates. # # @api private module Puppet::CertificateFactory # Create a new X509 certificate and add any needed extensions to the cert. # # @param cert_type [Symbol] The certificate type to create, which spe...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/indirector_proxy.rb
spec/lib/puppet/indirector_proxy.rb
class Puppet::IndirectorProxy class ProxyId attr_accessor :name def initialize(name) self.name = name end end # We should have some way to identify if we got a valid object back with the # current values, no? attr_accessor :value, :proxyname alias_method :name, :value alias_method :name...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/test_ca.rb
spec/lib/puppet/test_ca.rb
module Puppet class TestCa CERT_VALID_FROM = Time.at(0).freeze # 1969-12-31 16:00:00 -0800 CERT_VALID_UNTIL = (Time.now + (10 * 365 * 24 * 60 * 60)).freeze # 10 years from now CA_EXTENSIONS = [ ["basicConstraints", "CA:TRUE", true], ["keyUsage", "keyCertSign, cRLSign", true], ["subject...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/indirector_testing.rb
spec/lib/puppet/indirector_testing.rb
require 'puppet/indirector' class Puppet::IndirectorTesting extend Puppet::Indirector indirects :indirector_testing # We should have some way to identify if we got a valid object back with the # current values, no? attr_accessor :value alias_method :name, :value alias_method :name=, :value= def initia...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/indirector/indirector_testing/memory.rb
spec/lib/puppet/indirector/indirector_testing/memory.rb
require 'puppet/indirector/memory' class Puppet::IndirectorTesting::Memory < Puppet::Indirector::Memory def supports_remote_requests? true end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/indirector/indirector_testing/msgpack.rb
spec/lib/puppet/indirector/indirector_testing/msgpack.rb
require 'puppet/indirector_testing' require 'puppet/indirector/msgpack' class Puppet::IndirectorTesting::Msgpack < Puppet::Indirector::Msgpack desc "Testing the MessagePack indirector" end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/indirector/indirector_testing/json.rb
spec/lib/puppet/indirector/indirector_testing/json.rb
require 'puppet/indirector_testing' require 'puppet/indirector/json' class Puppet::IndirectorTesting::JSON < Puppet::Indirector::JSON desc "Testing the JSON indirector" end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/face/basetest.rb
spec/lib/puppet/face/basetest.rb
require 'puppet/face' Puppet::Face.define(:basetest, '0.0.1') do copyright "Puppet Inc.", 2011 license "Apache 2 license; see COPYING" summary "This is just so tests don't fail" option "--[no-]boolean" option "--mandatory ARGUMENT" action :foo do option("--action") when_invoked do |*args| args....
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/face/huzzah.rb
spec/lib/puppet/face/huzzah.rb
require 'puppet/face' Puppet::Face.define(:huzzah, '2.0.1') do copyright "Puppet Inc.", 2011 license "Apache 2 license; see COPYING" summary "life is a thing for celebration" action(:bar) { when_invoked { |options| "is where beer comes from" } } action(:call_older) { when_invoked { |_| method_on_older } } e...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/face/version_matching.rb
spec/lib/puppet/face/version_matching.rb
require 'puppet/face' # The set of versions here are used explicitly in the interface_spec; if you # change this you need to ensure that is still correct. --daniel 2011-04-21 ['1.0.0', '1.0.1', '1.1.0', '1.1.1', '2.0.0'].each do |version| Puppet::Face.define(:version_matching, version) do copyright "Puppet Inc."...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/face/1.0.0/huzzah.rb
spec/lib/puppet/face/1.0.0/huzzah.rb
require 'puppet/face' Puppet::Face.define(:huzzah, '1.0.0') do copyright "Puppet Inc.", 2011 license "Apache 2 license; see COPYING" summary "life is a thing for celebration" action(:obsolete_in_core) { when_invoked { |_| "you are in obsolete core now!" } } action(:call_newer) { when_invoked { |_| method_on...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/lib/puppet/face/huzzah/obsolete.rb
spec/lib/puppet/face/huzzah/obsolete.rb
Puppet::Face.define(:huzzah, '1.0.0') do action :obsolete do summary "This is an action on version 1.0.0 of the face" when_invoked do |options| options end end end
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/environments_spec.rb
spec/unit/environments_spec.rb
require 'spec_helper' require 'puppet/environments' require 'puppet/file_system' describe Puppet::Environments do FS = Puppet::FileSystem module FsRemove def remove @properties[:directory?] = false @properties[:exist?] = false @properties[:executable?] = false end end before(:each) ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/hiera_puppet_spec.rb
spec/unit/hiera_puppet_spec.rb
require 'spec_helper' require 'hiera_puppet' require 'puppet_spec/scope' describe 'HieraPuppet', :if => Puppet.features.hiera? do include PuppetSpec::Scope after(:all) do HieraPuppet.instance_variable_set(:@hiera, nil) end describe 'HieraPuppet#hiera_config' do let(:hiera_config_data) do { :bac...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/agent_spec.rb
spec/unit/agent_spec.rb
require 'spec_helper' require 'puppet/agent' require 'puppet/configurer' class AgentTestClient def initialize(transaction_uuid = nil, job_id = nil) end def run(client_args) # no-op end def stop # no-op end end describe Puppet::Agent do before do @agent = Puppet::Agent.new(AgentTestClient, ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/confine_collection_spec.rb
spec/unit/confine_collection_spec.rb
require 'spec_helper' require 'puppet/confine_collection' describe Puppet::ConfineCollection do it "should be able to add confines" do expect(Puppet::ConfineCollection.new("label")).to respond_to(:confine) end it "should require a label at initialization" do expect { Puppet::ConfineCollection.new }.to ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/info_service_spec.rb
spec/unit/info_service_spec.rb
require 'spec_helper' require 'puppet_spec/files' require 'puppet_spec/modules' require 'puppet/pops' require 'puppet/info_service' require 'puppet/pops/evaluator/literal_evaluator' describe "Puppet::InfoService" do include PuppetSpec::Files context 'task information service' do let(:mod_name) { 'test1' } ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/version_spec.rb
spec/unit/version_spec.rb
require "spec_helper" require "puppet/version" require 'pathname' describe "Puppet.version Public API" do before :each do @current_ver = Puppet.version Puppet.instance_eval do if @puppet_version @puppet_version = nil end end end after :each do Puppet.version = @current_ver ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/certificate_factory_spec.rb
spec/unit/certificate_factory_spec.rb
require 'spec_helper' require 'puppet/test_ca' require 'puppet/certificate_factory' describe Puppet::CertificateFactory, :unless => RUBY_PLATFORM == 'java' do let :serial do OpenSSL::BN.new('12') end let :name do "example.local" end let :x509_name do OpenSSL::X509::Name.new([['CN', name]]) end let :ke...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/relationship_spec.rb
spec/unit/relationship_spec.rb
require 'spec_helper' require 'puppet/relationship' describe Puppet::Relationship do before do @edge = Puppet::Relationship.new(:a, :b) end it "should have a :source attribute" do expect(@edge).to respond_to(:source) end it "should have a :target attribute" do expect(@edge).to respond_to(:targe...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/confiner_spec.rb
spec/unit/confiner_spec.rb
require 'spec_helper' require 'puppet/confiner' describe Puppet::Confiner do let(:coll) { Puppet::ConfineCollection.new('') } before do @object = Object.new @object.extend(Puppet::Confiner) end it "should have a method for defining confines" do expect(@object).to respond_to(:confine) end it...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/interface_spec.rb
spec/unit/interface_spec.rb
require 'spec_helper' require 'puppet/face' require 'puppet/interface' describe Puppet::Interface do subject { Puppet::Interface } before :each do @faces = Puppet::Interface::FaceCollection. instance_variable_get("@faces").dup @dq = $".dup $".delete_if do |path| path =~ %r{/face/.*\.rb$} end ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/provider_spec.rb
spec/unit/provider_spec.rb
require 'spec_helper' def existing_command Puppet::Util::Platform.windows? ? "cmd" : "echo" end describe Puppet::Provider do before :each do Puppet::Type.newtype(:test) do newparam(:name) { isnamevar } end end after :each do Puppet::Type.type(:test).provider_hash.clear Puppet::Type.rmty...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/face_spec.rb
spec/unit/face_spec.rb
# You should look at interface_spec.rb
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/confine_spec.rb
spec/unit/confine_spec.rb
require 'spec_helper' require 'puppet/confine' class Puppet::TestConfine < Puppet::Confine def pass?(value) false end end describe Puppet::Confine do it "should require a value" do expect { Puppet::Confine.new }.to raise_error(ArgumentError) end it "should always convert values to an array" do ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/context_spec.rb
spec/unit/context_spec.rb
require 'spec_helper' describe Puppet::Context do let(:context) { Puppet::Context.new({ :testing => "value" }) } describe "with additional context" do before :each do context.push("a" => 1) end it "allows rebinding values in a nested context" do inner = nil context.override("a" => 2...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/plan_spec.rb
spec/unit/plan_spec.rb
require 'spec_helper' require 'puppet_spec/files' require 'puppet_spec/modules' require 'puppet/module/plan' describe Puppet::Module::Plan do include PuppetSpec::Files let(:modpath) { tmpdir('plan_modpath') } let(:mymodpath) { File.join(modpath, 'mymod') } let(:othermodpath) { File.join(modpath, 'othermod') }...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/type_spec.rb
spec/unit/type_spec.rb
require 'spec_helper' require 'puppet_spec/compiler' require 'puppet/property/boolean' Puppet::Type.newtype(:type_test) do ensurable newparam(:name, isnamevar: true) newproperty(:device) newproperty(:blockdevice) newproperty(:fstype) newproperty(:options) newproperty(:pass) newproperty(:atboot, parent:...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/file_system_spec.rb
spec/unit/file_system_spec.rb
require 'spec_helper' require 'puppet/file_system' require 'puppet/util/platform' describe "Puppet::FileSystem" do include PuppetSpec::Files # different UTF-8 widths # 1-byte A # 2-byte ۿ - http://www.fileformat.info/info/unicode/char/06ff/index.htm - 0xDB 0xBF / 219 191 # 3-byte ᚠ - http://www.fileformat.i...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/puppet_spec.rb
spec/unit/puppet_spec.rb
require 'spec_helper' require 'puppet' require 'puppet_spec/files' describe Puppet do include PuppetSpec::Files context "#version" do it "should be valid semver" do expect(SemanticPuppet::Version).to be_valid Puppet.version end end Puppet::Util::Log.eachlevel do |level| it "should have a me...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/facter_impl_spec.rb
spec/unit/facter_impl_spec.rb
require 'spec_helper' describe 'Puppet::FacterImpl' do subject(:facter_impl) { Puppet::FacterImpl.new } it { is_expected.to respond_to(:value) } it { is_expected.to respond_to(:add) } describe '.value' do let(:method_name) { :value } before { allow(Facter).to receive(method_name) } it 'delegate...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/configurer_spec.rb
spec/unit/configurer_spec.rb
require 'spec_helper' require 'puppet/configurer' describe Puppet::Configurer do include PuppetSpec::Files before do Puppet[:server] = "puppetmaster" Puppet[:report] = true catalog.add_resource(resource) Puppet[:lastrunfile] = file_containing('last_run_summary.yaml', <<~SUMMARY) --- vers...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/module_spec.rb
spec/unit/module_spec.rb
require 'spec_helper' require 'puppet_spec/files' require 'puppet_spec/modules' require 'puppet/module_tool/checksums' describe Puppet::Module do include PuppetSpec::Files let(:env) { double("environment") } let(:path) { "/path" } let(:name) { "mymod" } let(:mod) { Puppet::Module.new(name, path, env) } b...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/forge_spec.rb
spec/unit/forge_spec.rb
require 'spec_helper' require 'spec_helper' require 'net/http' require 'puppet/forge' require 'puppet/module_tool' describe Puppet::Forge do let(:http_response) do File.read(my_fixture('bacula.json')) end let(:search_results) do JSON.parse(http_response)['results'].map do |hash| hash.merge( ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/indirector_spec.rb
spec/unit/indirector_spec.rb
require 'spec_helper' require 'puppet/defaults' require 'puppet/indirector' describe Puppet::Indirector, "when configuring routes" do before :each do Puppet::Node.indirection.reset_terminus_class Puppet::Node.indirection.cache_class = nil end after :each do Puppet::Node.indirection.reset_terminus_c...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/puppet_pal_catalog_spec.rb
spec/unit/puppet_pal_catalog_spec.rb
#! /usr/bin/env ruby require 'spec_helper' require 'puppet_spec/files' require 'puppet_pal' describe 'Puppet Pal' do include PuppetSpec::Files let(:testing_env) do { 'pal_env' => { 'functions' => functions, 'lib' => { 'puppet' => lib_puppet }, 'manifests' => manifests, 'm...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/util_spec.rb
spec/unit/util_spec.rb
require 'spec_helper' describe Puppet::Util do include PuppetSpec::Files if Puppet::Util::Platform.windows? def set_mode(mode, file) Puppet::Util::Windows::Security.set_mode(mode, file) end def get_mode(file) Puppet::Util::Windows::Security.get_mode(file) & 07777 end else def se...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/daemon_spec.rb
spec/unit/daemon_spec.rb
require 'spec_helper' require 'puppet/daemon' require 'puppet/agent' require 'puppet/configurer' describe Puppet::Daemon, :unless => Puppet::Util::Platform.windows? do include PuppetSpec::Files class RecordingScheduler attr_reader :jobs def run_loop(jobs) @jobs = jobs end end let(:agent) {...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/property_spec.rb
spec/unit/property_spec.rb
require 'spec_helper' require 'puppet/property' Puppet::Type.newtype(:property_test) do newparam(:name, isnamevar: true) end Puppet::Type.type(:property_test).provide(:property_test) do attr_accessor :foo end describe Puppet::Property do let :resource do Puppet::Type.type(:property_test).new(:name => "foo")...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/settings_spec.rb
spec/unit/settings_spec.rb
require 'spec_helper' require 'ostruct' require 'puppet/settings/errors' require 'puppet_spec/files' require 'matchers/resource' describe Puppet::Settings do include PuppetSpec::Files include Matchers::Resource let(:main_config_file_default_location) do File.join(Puppet::Util::RunMode[:server].conf_dir, "pu...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/functions4_spec.rb
spec/unit/functions4_spec.rb
require 'spec_helper' require 'puppet/pops' require 'puppet/loaders' require 'puppet_spec/pops' require 'puppet_spec/scope' module FunctionAPISpecModule class TestDuck end class TestFunctionLoader < Puppet::Pops::Loader::StaticLoader def initialize @constants = {} end def add_function(name, f...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/reports_spec.rb
spec/unit/reports_spec.rb
require 'spec_helper' require 'puppet/reports' describe Puppet::Reports do it "should instance-load report types" do expect(Puppet::Reports.instance_loader(:report)).to be_instance_of(Puppet::Util::Autoload) end it "should have a method for registering report types" do expect(Puppet::Reports).to respon...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/data_binding_spec.rb
spec/unit/data_binding_spec.rb
require 'spec_helper' require 'puppet/data_binding' describe Puppet::DataBinding do describe "when indirecting" do it "should default to the 'hiera' data_binding terminus" do Puppet::DataBinding.indirection.reset_terminus_class expect(Puppet::DataBinding.indirection.terminus_class).to eq(:hiera) ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/etc_spec.rb
spec/unit/etc_spec.rb
require 'puppet' require 'spec_helper' require 'puppet_spec/character_encoding' # The Ruby::Etc module is largely non-functional on Windows - many methods # simply return nil regardless of input, the Etc::Group struct is not defined, # and Etc::Passwd is missing fields # We want to test that: # - We correctly set exte...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/task_spec.rb
spec/unit/task_spec.rb
require 'spec_helper' require 'puppet_spec/files' require 'puppet_spec/modules' require 'puppet/module/task' describe Puppet::Module::Task do include PuppetSpec::Files let(:modpath) { tmpdir('task_modpath') } let(:mymodpath) { File.join(modpath, 'mymod') } let(:othermodpath) { File.join(modpath, 'othermod') }...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/puppet_pal_2pec.rb
spec/unit/puppet_pal_2pec.rb
require 'spec_helper' require 'puppet_spec/files' require 'puppet_pal' describe 'Puppet Pal' do include PuppetSpec::Files let(:testing_env) do { 'pal_env' => { 'functions' => functions, 'lib' => { 'puppet' => lib_puppet }, 'manifests' => manifests, 'modules' => modules, ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/module_tool_spec.rb
spec/unit/module_tool_spec.rb
# encoding: UTF-8 require 'spec_helper' require 'puppet/module_tool' describe Puppet::ModuleTool do describe '.is_module_root?' do it 'should return true if directory has a metadata.json file' do expect(FileTest).to receive(:file?).with(have_attributes(to_s: '/a/b/c/metadata.json')).and_return(true) ...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/application_spec.rb
spec/unit/application_spec.rb
require 'spec_helper' require 'puppet/application' require 'puppet' require 'getoptlong' require 'timeout' describe Puppet::Application do before(:each) do @appclass = Class.new(Puppet::Application) do def handle_unknown(opt, arg); end end @app = @appclass.new allow(@app).to receive(:name).an...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/transaction_spec.rb
spec/unit/transaction_spec.rb
require 'spec_helper' require 'matchers/include_in_order' require 'puppet_spec/compiler' require 'puppet/transaction' require 'fileutils' describe Puppet::Transaction do include PuppetSpec::Files include PuppetSpec::Compiler def catalog_with_resource(resource) catalog = Puppet::Resource::Catalog.new ca...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
true
OpenVoxProject/openvox
https://github.com/OpenVoxProject/openvox/blob/9336df16a11679d701a2bd9ebe1308d4fb669f57/spec/unit/defaults_spec.rb
spec/unit/defaults_spec.rb
require 'spec_helper' require 'puppet/settings' describe "Defaults" do describe ".default_diffargs" do it "should be '-u'" do expect(Puppet.default_diffargs).to eq("-u") end end describe 'strict' do it 'should accept the valid value :off' do expect {Puppet.settings[:strict] = 'off'}.to_n...
ruby
Apache-2.0
9336df16a11679d701a2bd9ebe1308d4fb669f57
2026-01-04T17:47:45.967003Z
false