Commit ea5eba58 authored by Tim Smith's avatar Tim Smith
Browse files

Switch from gem install in the recipe to a metadata gem install

Signed-off-by: default avatarTim Smith <>
parent 548247bf
......@@ -17,4 +17,6 @@ EOH
require File.expand_path('../lib/chef/sugar/version', __FILE__)
version Chef::Sugar::VERSION
gem "chef-sugar" if">= 12.10.48").satisfied_by?(
chef_version '>= 12.10.48' if respond_to?(:chef_version)
gem 'chef-sugar'
......@@ -16,19 +16,3 @@
# See the License for the specific language governing permissions and
# limitations under the License.
gem_version = run_context.cookbook_collection[cookbook_name].metadata.version
if Chef::Resource::ChefGem.instance_methods(false).include?(:compile_time)
chef_gem 'chef-sugar' do
version gem_version
compile_time true
chef_gem 'chef-sugar' do
version gem_version
action :nothing
require 'chef/sugar'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment