• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: Commit

Grid環境構築用のChefリポジトリです。


Commit MetaInfo

Revisión97d334e33cc7227c9bbde05df0f1f253413d9fc5 (tree)
Tiempo2016-09-11 18:52:32
Autorwhitestar <whitestar@gaea...>
Commiterwhitestar

Log Message

chef_utils-0.7.0

Cambiar Resumen

Diferencia incremental

--- /dev/null
+++ b/cookbooks/chef_utils/.foodcritic
@@ -0,0 +1,2 @@
1+~FC001
2+~FC014
--- /dev/null
+++ b/cookbooks/chef_utils/.rubocop.yml
@@ -0,0 +1,37 @@
1+AllCops:
2+ Exclude:
3+ - vendor/**/*
4+
5+AlignParameters:
6+ Enabled: false
7+LineLength:
8+ Enabled: false
9+Lint/UnusedBlockArgument:
10+ Enabled: false
11+Metrics/AbcSize:
12+ Enabled: false
13+Style/BlockComments:
14+ Enabled: false
15+Style/BlockDelimiters:
16+ Enabled: false
17+Style/ExtraSpacing:
18+ Enabled: false
19+Style/FileName:
20+ Enabled: false
21+Style/LeadingCommentSpace:
22+ Enabled: false
23+Style/RescueModifier:
24+ Enabled: false
25+Style/SpaceBeforeFirstArg:
26+ Enabled: false
27+Style/TrailingCommaInLiteral:
28+ EnforcedStyleForMultiline: comma
29+Style/WordArray:
30+ Enabled: false
31+
32+#Style/AccessorMethodName:
33+# Enabled: false
34+Style/MethodLength:
35+ Max: 20
36+#Style/ModuleLength:
37+# Max: 150
--- a/cookbooks/chef_utils/CHANGELOG.md
+++ b/cookbooks/chef_utils/CHANGELOG.md
@@ -1,13 +1,19 @@
11 CHANGELOG for chef_utils
22 =========================
33
4+0.7.0
5+-----
6+- Cleanup for FoodCritic and RuboCop.
7+- adds chef-gem-packages recipe.
8+- adds knife-supermarket recipe.
9+
410 0.6.1
511 -----
6-- add some attributes to the chef-vault recipe.
12+- adds some attributes to the chef-vault recipe.
713
814 0.6.0
915 -----
10-- add chef-server-configuration recipe.
16+- adds chef-server-configuration recipe.
1117
1218 0.1.0
1319 -----
--- /dev/null
+++ b/cookbooks/chef_utils/Gemfile
@@ -0,0 +1,3 @@
1+source 'https://rubygems.org'
2+
3+#gem 'foodcritic'
--- a/cookbooks/chef_utils/README.md
+++ b/cookbooks/chef_utils/README.md
@@ -3,50 +3,73 @@ chef_utils Cookbook
33
44 This cookbook contains setup recipes for Chef utilities and Knife plugins.
55
6-Requirements
7-------------
6+## Contents
87
9-#### packages
10-- `build-essential` - to build native libraries.
8+- [Requirements](#requirements)
9+ - [packages](#packages)
10+- [Attributes](#attributes)
11+- [Usage](#usage)
12+ - [recipes](#recipes)
13+- [License and Authors](#license-and-authors)
1114
12-Attributes
13-----------
15+## Requirements
16+
17+### packages
18+
19+- `build-essential` - to build native libraries for berkshelf.
20+
21+## Attributes
1422
1523 |Key|Type|Description, example|Default|
1624 |:--|:--|:--|:--|
1725 |`['chef_utils']['chef_gem']['clear_sources']`|Boolean|chef_gem resource's clear_sources property.|`false`|
1826 |`['chef_utils']['chef_gem']['source']`|String|chef_gem resource's source property.|`nil`|
1927 |`['chef_utils']['chef_gem']['options']`|String|chef_gem resource's options property.|`nil`|
28+|`['chef_utils']['chef_gem_packages']`|Array|These packages are installed by the `chef-gem-packages` recipe.|`[]`|
29+|`['chef_utils']['bracecomp']['version']`|String|installation version.|`nil`|
2030 |`['chef_utils']['chef-vault']['version']`|String|chef-vault installation version.|`'~> 2.6'`|
31+|`['chef_utils']['chefspec']['version']`|String|installation version.|`nil`|
32+|`['chef_utils']['knife-acl']['version']`|String|installation version.|`nil`|
33+|`['chef_utils']['knife-ec2']['version']`|String|installation version.|`nil`|
34+|`['chef_utils']['knife-eucalyptus']['version']`|String|installation version.|`nil`|
35+|`['chef_utils']['knife-openstack']['version']`|String|installation version.|`nil`|
36+|`['chef_utils']['knife-push']['version']`|String|installation version.|`nil`|
37+|`['chef_utils']['knife-reporting']['version']`|String|installation version.|`nil`|
38+|`['chef_utils']['knife-solo']['version']`|String|installation version.|`nil`|
39+|`['chef_utils']['knife-spec']['version']`|String|installation version.|`nil`|
40+|`['chef_utils']['knife-supermarket']['version']`|String|installation version.|`nil`|
41+|`['chef_utils']['knife-zero']['version']`|String|installation version.|`nil`|
42+|`['chef_utils']['spiceweasel']['version']`|String|installation version.|`nil`|
2143 |`['chef_utils']['chef-server']['configuration']`|String|Chef server conf. file's content.|see attributes/default.rb|
2244
23-Usage
24------
45+## Usage
2546
26-#### recipes
47+### recipes
2748 - `chef_utils::berkshelf` - Berkshelf gem installation. this is already included in the Chef DK.
2849 - `chef_utils::bracecomp` - bracecomp gem installation.
2950 - `chef_utils::chefspec` - chefspec gem installation. this is already included in the Chef DK.
51+- `chef_utils::chef-gem-packages` - bulk gem installation. packages must be listed in the `['chef_utils']['chef_gem_packages']` attribute (ver. 0.7.0 or later)
3052 - `chef_utils::chef-server-configuration` - chef-server.rb configuration file deployment recipe. (ver. 0.6.0 or later)
3153 - `chef_utils::chef-vault` - chef-vault gem installation. this is already included in the Chef DK. (ver. 0.5.0 or later)
3254 - `chef_utils::default` - same as bracecomp.
3355 - `chef_utils::knife-acl` - knife-acl plugin gem installation. (ver. 0.3.0 or later)
3456 - `chef_utils::knife-ec2` - knife-ec2 plugin gem installation.
3557 - `chef_utils::knife-eucalyptus` - knife-eucalyptus plugin gem installation.
36-- `chef_utils::knife-push` - knife-push plugin gem installation.
58+- `chef_utils::knife-push` - knife-push plugin gem installation. this is already included in the Chef DK.
3759 - `chef_utils::knife-reporting` - knife-reporting plugin gem installation.
3860 - `chef_utils::knife-solo` - knife-solo plugin gem installation.
3961 - `chef_utils::knife-spec` - knife-spec plugin gem installation.
62+- `chef_utils::knife-supermarket` - knife-supermarket plugin gem installation. Note: knife-supermarket feature has been moved into core Chef in versions greater than 12.11.18 and it is already included in the Chef DK. (ver. 0.7.0 or later)
4063 - `chef_utils::knife-zero` - knife-zero plugin gem installation. (ver. 0.5.0 or later)
4164 - `chef_utils::librarian-chef` - librarian-chef gem installation.
4265 - `chef_utils::spiceweasel` - spiceweasel gem installation.
4366
44-License and Authors
45--------------------
67+## License and Authors
68+
4669 - Author:: whitestar at osdn.jp
4770
4871 ```text
49-Copyright 2013-2015, whitestar
72+Copyright 2013-2016, whitestar
5073
5174 Licensed under the Apache License, Version 2.0 (the "License");
5275 you may not use this file except in compliance with the License.
--- /dev/null
+++ b/cookbooks/chef_utils/Rakefile
@@ -0,0 +1,23 @@
1+require 'rspec/core/rake_task'
2+require 'rubocop/rake_task'
3+require 'foodcritic'
4+
5+namespace :style do
6+ desc 'Run Ruby style checks'
7+ RuboCop::RakeTask.new(:ruby)
8+
9+ desc 'Run Chef style checks'
10+ FoodCritic::Rake::LintTask.new(:chef) do |t|
11+ t.options = {
12+ fail_tags: ['any'],
13+ }
14+ end
15+end
16+
17+desc 'Run all style checks'
18+task style: ['style:chef', 'style:ruby']
19+
20+desc 'Run ChefSpec examples'
21+RSpec::Core::RakeTask.new(:spec)
22+
23+task default: ['style', 'spec']
--- a/cookbooks/chef_utils/attributes/default.rb
+++ b/cookbooks/chef_utils/attributes/default.rb
@@ -20,7 +20,21 @@
2020 default['chef_utils']['chef_gem']['clear_sources'] = false
2121 default['chef_utils']['chef_gem']['source'] = nil
2222 default['chef_utils']['chef_gem']['options'] = nil
23+default['chef_utils']['chef_gem_packages'] = []
24+default['chef_utils']['bracecomp']['version'] = nil
2325 default['chef_utils']['chef-vault']['version'] = '~> 2.6'
26+default['chef_utils']['chefspec']['version'] = nil
27+default['chef_utils']['knife-acl']['version'] = nil
28+default['chef_utils']['knife-ec2']['version'] = nil
29+default['chef_utils']['knife-eucalyptus']['version'] = nil
30+default['chef_utils']['knife-openstack']['version'] = nil
31+default['chef_utils']['knife-push']['version'] = nil
32+default['chef_utils']['knife-reporting']['version'] = nil
33+default['chef_utils']['knife-solo']['version'] = nil
34+default['chef_utils']['knife-spec']['version'] = nil
35+default['chef_utils']['knife-supermarket']['version'] = nil
36+default['chef_utils']['knife-zero']['version'] = nil
37+default['chef_utils']['spiceweasel']['version'] = nil
2438
2539 # /etc/opscode/chef-server.rb
2640 default['chef_utils']['chef-server']['configuration'] = <<-EOS
@@ -29,4 +43,3 @@ default['chef_utils']['chef-server']['configuration'] = <<-EOS
2943 addons['install'] = false
3044
3145 EOS
32-
--- /dev/null
+++ b/cookbooks/chef_utils/libraries/helper.rb
@@ -0,0 +1,40 @@
1+#
2+# Cookbook Name:: ssl_cert
3+# Library:: Helper
4+#
5+# Copyright 2016, whitestar
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+
20+module ChefUtils
21+ # Helper methods.
22+ module Helper
23+ def chef_gem_package(pkg)
24+ pkg_ver = if node['chef_utils'][pkg].nil?
25+ nil
26+ else
27+ node['chef_utils'][pkg]['version']
28+ end
29+
30+ resources(chef_gem: pkg) rescue chef_gem pkg do
31+ compile_time true if respond_to?(:compile_time)
32+ clear_sources node['chef_utils']['chef_gem']['clear_sources']
33+ source node['chef_utils']['chef_gem']['source']
34+ options node['chef_utils']['chef_gem']['options']
35+ version pkg_ver
36+ action :install
37+ end
38+ end
39+ end
40+end
--- a/cookbooks/chef_utils/metadata.rb
+++ b/cookbooks/chef_utils/metadata.rb
@@ -1,13 +1,15 @@
1+# $ knife cookbook site share chef_utils "Utilities"
12 name 'chef_utils'
23 maintainer 'whitestar'
34 maintainer_email ''
45 license 'Apache 2.0'
56 description 'Installs/Configures chef_utils'
67 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7-version '0.6.1'
8+version '0.7.0'
9+source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
10+issues_url 'https://osdn.jp/projects/metasearch/ticket'
811
912 # local cookbooks
1013
1114 # external cookbooks
1215 depends 'build-essential'
13-
--- a/cookbooks/chef_utils/recipes/berkshelf.rb
+++ b/cookbooks/chef_utils/recipes/berkshelf.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: berkshelf
44 #
5-# Copyright 2013-2015, whitestar
5+# Copyright 2013-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,6 +17,8 @@
1717 # limitations under the License.
1818 #
1919
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
21+
2022 # ref. http://community.opscode.com/cookbooks/build-essential
2123 node.set['build-essential']['compile_time'] = true
2224 include_recipe 'build-essential'
@@ -25,11 +27,11 @@ include_recipe 'build-essential'
2527 dependent_packages = value_for_platform_family(
2628 'rhel' => [
2729 'libxslt-devel',
28- 'libxml2-devel'
30+ 'libxml2-devel',
2931 ],
3032 'debian' => [
3133 'libxslt-dev',
32- 'libxml2-dev'
34+ 'libxml2-dev',
3335 ]
3436 )
3537
@@ -39,8 +41,4 @@ dependent_packages.each {|pkg|
3941 end.run_action(:install)
4042 }
4143
42-chef_gem 'berkshelf' do
43- compile_time false if respond_to?(:compile_time)
44- action :install
45-end
46-
44+chef_gem_package('berkshelf')
--- a/cookbooks/chef_utils/recipes/bracecomp.rb
+++ b/cookbooks/chef_utils/recipes/bracecomp.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: bracecomp
44 #
5-# Copyright 2014,2015 whitestar
5+# Copyright 2014-2016 whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'bracecomp' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('bracecomp')
--- /dev/null
+++ b/cookbooks/chef_utils/recipes/chef-gem-packages.rb
@@ -0,0 +1,24 @@
1+#
2+# Cookbook Name:: chef_utils
3+# Recipe:: chef-gem-packages
4+#
5+# Copyright 2016 whitestar
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+
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
21+
22+node['chef_utils']['chef_gem_packages'].each {|pkg|
23+ chef_gem_package(pkg)
24+}
--- a/cookbooks/chef_utils/recipes/chef-server-configuration.rb
+++ b/cookbooks/chef_utils/recipes/chef-server-configuration.rb
@@ -23,4 +23,3 @@ file '/etc/opscode/chef-server.rb' do
2323 group 'root'
2424 mode 0644
2525 end
26-
--- a/cookbooks/chef_utils/recipes/chef-vault.rb
+++ b/cookbooks/chef_utils/recipes/chef-vault.rb
@@ -17,13 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-pkg = 'chef-vault'
21-resources(:chef_gem => pkg) rescue chef_gem pkg do
22- compile_time true if respond_to?(:compile_time)
23- clear_sources node['chef_utils']['chef_gem']['clear_sources']
24- source node['chef_utils']['chef_gem']['source']
25- options node['chef_utils']['chef_gem']['options']
26- version node['chef_utils']['chef-vault']['version']
27- action :install
28-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2921
22+chef_gem_package('chef-vault')
--- a/cookbooks/chef_utils/recipes/chefspec.rb
+++ b/cookbooks/chef_utils/recipes/chefspec.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: chefspec
44 #
5-# Copyright 2015, whitestar
5+# Copyright 2015-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'chefspec' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('chefspec')
--- a/cookbooks/chef_utils/recipes/default.rb
+++ b/cookbooks/chef_utils/recipes/default.rb
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'bracecomp' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('bracecomp')
--- a/cookbooks/chef_utils/recipes/knife-acl.rb
+++ b/cookbooks/chef_utils/recipes/knife-acl.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-acl
44 #
5-# Copyright 2015, whitestar
5+# Copyright 2015-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-acl' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-acl')
--- a/cookbooks/chef_utils/recipes/knife-ec2.rb
+++ b/cookbooks/chef_utils/recipes/knife-ec2.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-ec2
44 #
5-# Copyright 2013-2015, whitestar
5+# Copyright 2013-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-ec2' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-ec2')
--- a/cookbooks/chef_utils/recipes/knife-eucalyptus.rb
+++ b/cookbooks/chef_utils/recipes/knife-eucalyptus.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-eucalyptus
44 #
5-# Copyright 2013-2015, whitestar
5+# Copyright 2013-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-eucalyptus' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-eucalyptus')
--- a/cookbooks/chef_utils/recipes/knife-openstack.rb
+++ b/cookbooks/chef_utils/recipes/knife-openstack.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-openstack
44 #
5-# Copyright 2013-2015, whitestar
5+# Copyright 2013-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-openstack' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-openstack')
--- a/cookbooks/chef_utils/recipes/knife-push.rb
+++ b/cookbooks/chef_utils/recipes/knife-push.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-push
44 #
5-# Copyright 2015, whitestar
5+# Copyright 2015-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-push' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-push')
--- a/cookbooks/chef_utils/recipes/knife-reporting.rb
+++ b/cookbooks/chef_utils/recipes/knife-reporting.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-reporting
44 #
5-# Copyright 2015, whitestar
5+# Copyright 2015-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-reporting' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-reporting')
--- a/cookbooks/chef_utils/recipes/knife-solo.rb
+++ b/cookbooks/chef_utils/recipes/knife-solo.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-solo
44 #
5-# Copyright 2014-2015, whitestar
5+# Copyright 2014-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-solo' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-solo')
--- a/cookbooks/chef_utils/recipes/knife-spec.rb
+++ b/cookbooks/chef_utils/recipes/knife-spec.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-spec
44 #
5-# Copyright 2015, whitestar
5+# Copyright 2015-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-spec' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-spec')
--- /dev/null
+++ b/cookbooks/chef_utils/recipes/knife-supermarket.rb
@@ -0,0 +1,22 @@
1+#
2+# Cookbook Name:: chef_utils
3+# Recipe:: supermarket
4+#
5+# Copyright 2016 whitestar
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+
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
21+
22+chef_gem_package('knife-supermarket')
--- a/cookbooks/chef_utils/recipes/knife-zero.rb
+++ b/cookbooks/chef_utils/recipes/knife-zero.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: knife-zero
44 #
5-# Copyright 2015, whitestar
5+# Copyright 2015-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'knife-zero' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('knife-zero')
--- a/cookbooks/chef_utils/recipes/librarian-chef.rb
+++ b/cookbooks/chef_utils/recipes/librarian-chef.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: librarian-chef
44 #
5-# Copyright 2013-2015 whitestar
5+# Copyright 2013-2016 whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'librarian-chef' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('librarian-chef')
--- a/cookbooks/chef_utils/recipes/spiceweasel.rb
+++ b/cookbooks/chef_utils/recipes/spiceweasel.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: spiceweasel
44 #
5-# Copyright 2013-2015, whitestar
5+# Copyright 2013-2016, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
1717 # limitations under the License.
1818 #
1919
20-chef_gem 'spiceweasel' do
21- compile_time false if respond_to?(:compile_time)
22- action :install
23-end
20+::Chef::Recipe.send(:include, ChefUtils::Helper)
2421
22+chef_gem_package('spiceweasel')
Show on old repository browser