forked from zuazo/ssl_certificate-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Berksfile
38 lines (33 loc) · 1.06 KB
/
Berksfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# encoding: UTF-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
source 'https://supermarket.getchef.com'
my_cookbook = ::File.basename(Dir.pwd).sub(/[-_]?cookbook$/, '')
# Berkshelf helper to include a local cookbook from disk.
#
# @param name [String] cookbook name.
# @param version [String] cookbook version requirement.
# @param options [Hash] #cookbook method options.
# return void
def local_cookbook(name, version = '>= 0.0.0', options = {})
cookbook(name, version, {
path: "../../cookbooks/#{name}"
}.merge(options))
end
cookbook 'apt'
metadata
# Minitest Chef Handler
# More info at https://github.com/calavera/minitest-chef-handler
if ::File.directory?(::File.join('files', 'default', 'tests', 'minitest')) ||
::File.directory?(
::File.join(
'test', 'cookbooks', "#{my_cookbook}_test", 'files', 'default', 'tests',
'minitest'
)
)
cookbook 'minitest-handler'
end
# Integration tests cookbook:
if ::File.directory?("./test/cookbooks/#{my_cookbook}_test")
cookbook "#{my_cookbook}_test", path: "./test/cookbooks/#{my_cookbook}_test"
end