Sha256: 8b4f88a31aa64e270edad28cd8d2fe3a1b67b0f8c73b5e801bbcf202a9f6187b

Contents?: true

Size: 689 Bytes

Versions: 13

Compression:

Stored size: 689 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::Opscode.worker_type, SiteConnector::Opscode::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

13 entries across 13 versions & 1 rubygems

Version Path
berkshelf-api-1.4.0 lib/berkshelf/api/rspec.rb
berkshelf-api-1.3.1 lib/berkshelf/api/rspec.rb
berkshelf-api-1.3.0 lib/berkshelf/api/rspec.rb
berkshelf-api-1.2.2 lib/berkshelf/api/rspec.rb
berkshelf-api-1.2.1 lib/berkshelf/api/rspec.rb
berkshelf-api-1.2.0 lib/berkshelf/api/rspec.rb
berkshelf-api-1.2.0.rc2 lib/berkshelf/api/rspec.rb
berkshelf-api-1.2.0.rc1 lib/berkshelf/api/rspec.rb
berkshelf-api-1.1.1 lib/berkshelf/api/rspec.rb
berkshelf-api-1.1.0 lib/berkshelf/api/rspec.rb
berkshelf-api-1.0.0 lib/berkshelf/api/rspec.rb
berkshelf-api-0.2.0 lib/berkshelf/api/rspec.rb
berkshelf-api-0.1.0 lib/berkshelf/api/rspec.rb