Module: Berkshelf::API::RSpec
- Includes:
- Mixin::Services
- Defined in:
- lib/berkshelf/api/rspec.rb,
lib/berkshelf/api/rspec/server.rb
Defined Under Namespace
Modules: Server
Instance Method Summary collapse
Methods included from Mixin::Services
Instance Method Details
#berks_dependency(name, version, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/berkshelf/api/rspec.rb', line 9 def berks_dependency(name, version, = {}) [:platforms] ||= Hash.new [:dependencies] ||= Hash.new cookbook = RemoteCookbook.new(name, version, CacheBuilder::Worker::Supermarket.worker_type, SiteConnector::Supermarket::V1_API, 0) = Ridley::Chef::Cookbook::Metadata.new [:platforms].each { |name, version| .supports(name, version) } [:dependencies].each { |name, constraint| .depends(name, constraint) } cache_manager.add(cookbook, ) end |