kitchen-chef-monorepo 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ef9deb1858f27c17ae29d0dbc0dcc048e521cf2f
4
+ data.tar.gz: d5e9c06181f40bc51a53f922d4756d20d66f66d6
5
+ SHA512:
6
+ metadata.gz: ba447db8eefc0a1ab5f7c06b7fd57d5b09a36dd40c9fe0133aa72134b612baeb1e95f50077ee03bb929acf5fff1804e1f9528a4b1866ee8c11957b0122201bb1
7
+ data.tar.gz: 45bf7920df2c5355a44fc67156bbc0d587144c2d848ea191848e093e9c7983ef1a7d257db20b3d82a7d1f812eff680bb98b034c774743cf99a768aee4db0fe7f
@@ -0,0 +1,38 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: Jeff Goldschrafe <jeff@holyhandgrenade.org>
4
+ #
5
+ # Copyright (C) 2016 Rabbit, Inc.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ require 'kitchen'
20
+ require 'kitchen/provisioner/chef_solo'
21
+ require 'kitchen_chef_monorepo/helpers'
22
+
23
+ module Kitchen
24
+ module Provisioner
25
+ # @author Jeff Goldschrafe <jeff@holyhandgrenade.org>
26
+ class ChefSoloMonorepo < ChefSolo
27
+ include KitchenChefMonorepo::Helpers
28
+
29
+ default_config :cookbooks_path, ['../']
30
+
31
+ def create_sandbox
32
+ super
33
+ cp_cookbooks
34
+ end
35
+
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: Jeff Goldschrafe <jeff@holyhandgrenade.org>
4
+ #
5
+ # Copyright (C) 2016 Rabbit, Inc.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ require 'kitchen'
20
+ require 'kitchen/provisioner/chef_zero'
21
+ require 'kitchen_chef_monorepo/helpers'
22
+
23
+ module Kitchen
24
+ module Provisioner
25
+ # @author Jeff Goldschrafe <jeff@holyhandgrenade.org>
26
+ class ChefZeroMonorepo < ChefZero
27
+ include KitchenChefMonorepo::Helpers
28
+
29
+ default_config :cookbook_path, ['../']
30
+
31
+ def create_sandbox
32
+ super
33
+ cp_cookbooks
34
+ end
35
+
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,39 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: Jeff Goldschrafe <jeff@holyhandgrenade.org>
4
+ #
5
+ # Copyright (C) 2016 Rabbit, Inc.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ module KitchenChefMonorepo
20
+ module Helpers
21
+
22
+ def cp_cookbooks
23
+ info "Preparing cookbooks from repository"
24
+
25
+ if config[:cookbook_path].kind_of?(Array)
26
+ config[:cookbook_path].reverse.each do |p|
27
+ dir = File.expand_path(p)
28
+ debug "Using cookbooks from #{dir}"
29
+ FileUtils.cp_r(File.join(dir, "."), tmpbooks_dir)
30
+ end
31
+ end
32
+ end
33
+
34
+ def tmpbooks_dir
35
+ File.join(sandbox_path, "cookbooks")
36
+ end
37
+
38
+ end
39
+ end
metadata ADDED
@@ -0,0 +1,61 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kitchen-chef-monorepo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jeff Goldschrafe
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-11-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: test-kitchen
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ description: A Test Kitchen driver for Chef using a monolithic cookbook repo
28
+ email:
29
+ - jeff@holyhandgrenade.org
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - lib/kitchen/provisioner/chef_solo_monorepo.rb
35
+ - lib/kitchen/provisioner/chef_zero_monorepo.rb
36
+ - lib/kitchen_chef_monorepo/helpers.rb
37
+ homepage: https://github.com/jgoldschrafe/kitchen-chef-monorepo
38
+ licenses:
39
+ - Apache-2.0
40
+ metadata: {}
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ requirements: []
56
+ rubyforge_project:
57
+ rubygems_version: 2.0.14.1
58
+ signing_key:
59
+ specification_version: 4
60
+ summary: A Test Kitchen driver for Chef using a monolithic cookbook repo
61
+ test_files: []