Sha256: 9e80e189b3aeed9d24a28b11cd04717d7e044a9e11127cfad720cc0a22fea049

Contents?: true

Size: 412 Bytes

Versions: 17

Compression:

Stored size: 412 Bytes

Contents

require 'chef/config'

module Berkshelf
  module RSpec
    module Knife
      class << self
        def load_knife_config(path)
          if File.exist?(path)
            Chef::Config.from_file(path)
            ENV["CHEF_CONFIG"] = path
          else
            raise "Cannot continue; '#{path}' must exist and have testing credentials." unless ENV['CI']
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
berkshelf-1.1.6 spec/support/knife.rb
berkshelf-1.1.5 spec/support/knife.rb
berkshelf-1.1.4 spec/support/knife.rb
berkshelf-1.1.3 spec/support/knife.rb
berkshelf-1.1.2 spec/support/knife.rb
berkshelf-1.1.1 spec/support/knife.rb
berkshelf-1.1.0 spec/support/knife.rb
berkshelf-1.1.0.rc1 spec/support/knife.rb
berkshelf-1.0.4 spec/support/knife.rb
berkshelf-1.0.3 spec/support/knife.rb
berkshelf-1.0.2 spec/support/knife.rb
berkshelf-1.0.0 spec/support/knife.rb
berkshelf-1.0.0.rc3 spec/support/knife.rb
berkshelf-1.0.0.rc2 spec/support/knife.rb
berkshelf-1.0.0.rc1 spec/support/knife.rb
berkshelf-0.6.0.beta4 spec/support/knife.rb
berkshelf-0.6.0.beta3 spec/support/knife.rb