summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Alexandre Salim <michel@fb.com>2020-01-23 17:59:45 -0800
committerMichel Alexandre Salim <michel@fb.com>2020-01-24 13:57:57 -0800
commit8e0fd798f228648360a0b14a382f364cb1bd9222 (patch)
tree875be93c2a218fc5f1009befbff5e4a73e20bad4
parent89569bd15923c251903398b8a1aa1ac8aaa90a30 (diff)
downloadchef-8e0fd798f228648360a0b14a382f364cb1bd9222.tar.gz
declare_resource.rb: consistently use `/x/y.txt`
The code examples inconsistently refer to `/x/y.txy` as well as `x/y.txt`, it seems that the latter is intended. Obvious fix. Signed-off-by: Michel Alexandre Salim <michel@fb.com>
-rw-r--r--lib/chef/dsl/declare_resource.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/dsl/declare_resource.rb b/lib/chef/dsl/declare_resource.rb
index 7ae1551c04..a4272a5f28 100644
--- a/lib/chef/dsl/declare_resource.rb
+++ b/lib/chef/dsl/declare_resource.rb
@@ -69,7 +69,7 @@ class Chef
# @return [Chef::Resource] The resource
#
# @example
- # delete_resource!(:template, '/x/y.txy')
+ # delete_resource!(:template, '/x/y.txt')
#
def delete_resource!(type, name, run_context: self.run_context)
run_context.resource_collection.delete("#{type}[#{name}]").tap do |resource|
@@ -93,7 +93,7 @@ class Chef
# @return [Chef::Resource] The resource
#
# @example
- # delete_resource(:template, '/x/y.txy')
+ # delete_resource(:template, '/x/y.txt')
#
def delete_resource(type, name, run_context: self.run_context)
delete_resource!(type, name, run_context: run_context)
@@ -114,7 +114,7 @@ class Chef
# @return [Chef::Resource] The updated resource
#
# @example
- # edit_resource!(:template, '/x/y.txy') do
+ # edit_resource!(:template, '/x/y.txt') do
# cookbook_name: cookbook_name
# end
#
@@ -147,8 +147,8 @@ class Chef
# @return [Chef::Resource] The updated or created resource
#
# @example
- # resource = edit_resource(:template, '/x/y.txy') do
- # source "y.txy.erb"
+ # resource = edit_resource(:template, '/x/y.txt') do
+ # source "y.txt.erb"
# variables {}
# end
# resource.variables.merge!({ home: "/home/klowns" })
@@ -199,7 +199,7 @@ class Chef
# @return [Chef::Resource] The updated resource
#
# @example
- # resource = find_resource!(:template, '/x/y.txy')
+ # resource = find_resource!(:template, '/x/y.txt')
#
def find_resource!(type, name, run_context: self.run_context)
raise ArgumentError, "find_resource! does not take a block" if block_given?
@@ -219,7 +219,7 @@ class Chef
# @return [Chef::Resource] The updated resource
#
# @example
- # if ( find_resource(:template, '/x/y.txy') )
+ # if ( find_resource(:template, '/x/y.txt') )
# # do something
# else
# # don't worry about the error
@@ -259,7 +259,7 @@ class Chef
# @return [Chef::Resource] The new resource.
#
# @example
- # declare_resource(:file, '/x/y.txy', caller[0]) do
+ # declare_resource(:file, '/x/y.txt', caller[0]) do
# action :delete
# end
# # Equivalent to
@@ -293,7 +293,7 @@ class Chef
# @return [Chef::Resource] The new resource.
#
# @example
- # build_resource(:file, '/x/y.txy', caller[0]) do
+ # build_resource(:file, '/x/y.txt', caller[0]) do
# action :delete
# end
#