lib/poise_boiler/helpers/kitchen/policy_provisioner.rb
# Run our policy generation first.
Run our policy generation first.
Run our policy generation first .
def create_sandbox
          policy_base = File.join(config[:kitchen_root], '.kitchen', 'poise_policy')
          FileUtils.rm_rf(policy_base)
          convert_halite_cookbooks(policy_base) unless poise_helper_instance.options['no_gem']
          copy_test_cookbook(policy_base)
          copy_test_cookbooks(policy_base)
          policy_path = generate_poise_policy(policy_base)
          compile_poise_policy(policy_path)
          if $use_policyfile_zero
            config[:policyfile] = "#{config[:kitchen_root]}/#{policy_path}"
          else
            config[:policyfile_path] = policy_path
          end
          super
        end
def create_sandbox policy_base = File . join ( config [ :kitchen_root ] , '.kitchen' , 'poise_policy' ) FileUtils . rm_rf ( policy_base ) convert_halite_cookbooks ( policy_base ) unless poise_helper_instance . options [ 'no_gem' ] copy_test_cookbook ( policy_base ) copy_test_cookbooks ( policy_base ) policy_path = generate_poise_policy ( policy_base ) compile_poise_policy ( policy_path ) if $use_policyfile_zero config [ :policyfile ] = "#{config[:kitchen_root]}/#{policy_path}" else config [ :policyfile_path ] = policy_path end super end
Run our policy generation first.
Run our policy generation first .
# Copy all my halite-y stuff to a folder. This should probably use a # temp dir instead. # Generate a modified policy to use the cookbooks we just made. # Compile that policy because the base provider doesn't do that. # Tell the base provider code to use our new policy instead.