recipes/default.rb in chef-sugar-3.1.0 vs recipes/default.rb in chef-sugar-3.1.1

- old
+ new

@@ -17,11 +17,18 @@ # limitations under the License. # gem_version = run_context.cookbook_collection[cookbook_name].metadata.version -chef_gem('chef-sugar') do - version gem_version - action :nothing -end.run_action(:install) +if Chef::Resource::ChefGem.instance_methods(false).include?(:compile_time) + chef_gem 'chef-sugar' do + version gem_version + compile_time true + end +else + chef_gem 'chef-sugar' do + version gem_version + action :nothing + end.run_action(:install) +end require 'chef/sugar'