Sha256: 31259fb5a614d2d2244d4615fb4cb1c8901c962fd1802c11cd3a55f86d551abd

Contents?: true

Size: 633 Bytes

Versions: 31

Compression:

Stored size: 633 Bytes

Contents

module Berkshelf
  module TestGenerators
    def generate_berks_config(path)
      Berkshelf::Config.new(path,
        ssl: {
          verify: false
        }
      ).save
    end

    # Generate a minimal, default, Chef configuration file
    #
    # @param [#to_s] path
    #   path to the configuration to generate
    def generate_chef_config(path)
      contents = <<-TXT
chef_server_url "http://localhost:4000"
validation_key "/etc/chef/validation.pem"
validation_client_name "chef-validator"
client_key "/etc/chef/client.pem"
      TXT
      File.open(path, 'w+') do |f|
        f.write(contents)
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
berkshelf-2.0.18 spec/support/test_generators.rb
berkshelf-2.0.17 spec/support/test_generators.rb
berkshelf-2.0.16 spec/support/test_generators.rb
berkshelf-2.0.15 spec/support/test_generators.rb
berkshelf-2.0.14 spec/support/test_generators.rb
berkshelf-2.0.13 spec/support/test_generators.rb
berkshelf-2.0.12 spec/support/test_generators.rb
berkshelf-2.0.11 spec/support/test_generators.rb
berkshelf-2.0.10 spec/support/test_generators.rb
berkshelf-2.0.9 spec/support/test_generators.rb
berkshelf-2.0.8 spec/support/test_generators.rb
berkshelf-2.0.7 spec/support/test_generators.rb
berkshelf-2.0.6 spec/support/test_generators.rb
berkshelf-2.0.5 spec/support/test_generators.rb
berkshelf-2.0.4 spec/support/test_generators.rb
berkshelf-1.4.6 spec/support/test_generators.rb
berkshelf-2.0.3 spec/support/test_generators.rb
berkshelf-2.0.1 spec/support/test_generators.rb
berkshelf-2.0.0 spec/support/test_generators.rb
berkshelf-1.4.5 spec/support/test_generators.rb