Class: PoiseBoiler::Helpers::Kitchen::PolicyProvisioner
- Inherits:
-
Kitchen::Provisioner::PolicyfileZero
- Object
- Kitchen::Provisioner::PolicyfileZero
- PoiseBoiler::Helpers::Kitchen::PolicyProvisioner
- Includes:
- ProvisionerHelpers
- Defined in:
- lib/poise_boiler/helpers/kitchen/policy_provisioner.rb
Overview
Class Method Summary collapse
-
.name ⇒ Object
Override the default value from the base class.
Instance Method Summary collapse
-
#create_sandbox ⇒ Object
Run our policy generation first.
Class Method Details
.name ⇒ Object
Override the default value from the base class. default_config :policyfile, ‘.kitchen/poise_policy.rb’ expand_path_for :policyfile
36 37 38 |
# File 'lib/poise_boiler/helpers/kitchen/policy_provisioner.rb', line 36 def self.name 'PoisePolicyfileZero' end |
Instance Method Details
#create_sandbox ⇒ Object
Run our policy generation first.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/poise_boiler/helpers/kitchen/policy_provisioner.rb', line 41 def create_sandbox policy_base = File.join(config[:kitchen_root], '.kitchen', 'poise_policy') # Copy all my halite-y stuff to a folder. This should probably use a # temp dir instead. FileUtils.rm_rf(policy_base) convert_halite_cookbooks(policy_base) unless poise_helper_instance.['no_gem'] copy_test_cookbook(policy_base) copy_test_cookbooks(policy_base) # Generate a modified policy to use the cookbooks we just made. policy_path = generate_poise_policy(policy_base) # Compile that policy because the base provider doesn't do that. compile_poise_policy(policy_path) # Tell the base provider code to use our new policy instead. config[:policyfile] = policy_path super end |