Sha256: 657cf2f1ed41b6b8829ced82cb92069f6aabd0c27fec92f8c0689882e0d91a7e

Contents?: true

Size: 697 Bytes

Versions: 2

Compression:

Stored size: 697 Bytes

Contents

require 'berkshelf/api'

module Berkshelf::API
  module RSpec
    require_relative 'rspec/server'

    include Mixin::Services

    def berks_dependency(name, version, options = {})
      options[:platforms] ||= Hash.new
      options[:dependencies] ||= Hash.new
      cookbook = RemoteCookbook.new(name, version,
        CacheBuilder::Worker::Supermarket.worker_type, SiteConnector::Supermarket::V1_API)
      metadata = Ridley::Chef::Cookbook::Metadata.new
      options[:platforms].each { |name, version| metadata.supports(name, version) }
      options[:dependencies].each { |name, constraint| metadata.depends(name, constraint) }
      cache_manager.add(cookbook, metadata)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
berkshelf-api-2.1.0 lib/berkshelf/api/rspec.rb
berkshelf-api-2.0.0 lib/berkshelf/api/rspec.rb