From 1b2e2b3b3d7b4d4138462fa8acbf224e37122dba Mon Sep 17 00:00:00 2001 From: Bill Wiens Date: Thu, 19 Sep 2013 15:35:11 -0700 Subject: [PATCH] [COOK-3645] check for Chef::Version and include the Chef::Mixin::LanguageIncludeRecipe for older versions. Restores compatibility with 10.x, broken in COOK-3432. --- providers/celery.rb | 6 +++++- providers/django.rb | 6 +++++- providers/gunicorn.rb | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/providers/celery.rb b/providers/celery.rb index 1280c32..3ef30d5 100644 --- a/providers/celery.rb +++ b/providers/celery.rb @@ -18,7 +18,11 @@ # limitations under the License. # -include Chef::DSL::IncludeRecipe +if Chef::Version.new(Chef::VERSION) < Chef::Version.new("11.0.0") + include Chef::Mixin::LanguageIncludeRecipe +else + include Chef::DSL::IncludeRecipe +end action :before_compile do diff --git a/providers/django.rb b/providers/django.rb index 798564a..15973c2 100644 --- a/providers/django.rb +++ b/providers/django.rb @@ -20,7 +20,11 @@ require 'tmpdir' -include Chef::DSL::IncludeRecipe +if Chef::Version.new(Chef::VERSION) < Chef::Version.new("11.0.0") + include Chef::Mixin::LanguageIncludeRecipe +else + include Chef::DSL::IncludeRecipe +end action :before_compile do diff --git a/providers/gunicorn.rb b/providers/gunicorn.rb index a8bbd74..d576ddf 100644 --- a/providers/gunicorn.rb +++ b/providers/gunicorn.rb @@ -20,7 +20,11 @@ require 'tmpdir' -include Chef::DSL::IncludeRecipe +if Chef::Version.new(Chef::VERSION) < Chef::Version.new("11.0.0") + include Chef::Mixin::LanguageIncludeRecipe +else + include Chef::DSL::IncludeRecipe +end action :before_compile do