lib/chef/recipe.rb in chef-10.34.6 vs lib/chef/recipe.rb in chef-11.0.0.beta.0
- old
+ new
@@ -16,26 +16,32 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-require 'chef/mixin/recipe_definition_dsl_core'
+require 'chef/dsl/recipe'
+require 'chef/dsl/data_query'
+require 'chef/dsl/platform_introspection'
+require 'chef/dsl/include_recipe'
+require 'chef/dsl/registry_helper'
+
require 'chef/mixin/from_file'
-require 'chef/mixin/language'
-require 'chef/mixin/language_include_recipe'
require 'chef/mixin/deprecation'
class Chef
# == Chef::Recipe
# A Recipe object is the context in which Chef recipes are evaluated.
class Recipe
+ include Chef::DSL::DataQuery
+ include Chef::DSL::PlatformIntrospection
+ include Chef::DSL::IncludeRecipe
+ include Chef::DSL::Recipe
+ include Chef::DSL::RegistryHelper
+
include Chef::Mixin::FromFile
- include Chef::Mixin::Language
- include Chef::Mixin::LanguageIncludeRecipe
- include Chef::Mixin::RecipeDefinitionDSLCore
include Chef::Mixin::Deprecation
attr_accessor :cookbook_name, :recipe_name, :recipe, :params, :run_context
# Parses a potentially fully-qualified recipe name into its
@@ -87,11 +93,11 @@
# tags<Array>:: The contents of run_context.node[:tags]
def tag(*tags)
if tags.length > 0
tags.each do |tag|
tag = tag.to_s
- run_context.node[:tags] << tag unless run_context.node[:tags].include?(tag)
+ run_context.node.normal[:tags] << tag unless run_context.node[:tags].include?(tag)
end
run_context.node[:tags]
else
run_context.node[:tags]
end
@@ -119,10 +125,10 @@
#
# === Returns
# tags<Array>:: The current list of run_context.node[:tags]
def untag(*tags)
tags.each do |tag|
- run_context.node[:tags].delete(tag)
+ run_context.node.normal[:tags].delete(tag)
end
end
end
end