chef-rewind icon indicating copy to clipboard operation
chef-rewind copied to clipboard

Fix README references to "cookbook_name"

Open markjreed opened this issue 11 years ago • 3 comments

The README refers to cookbook_name as an attribute of a resource specifying the location of the associated file, but that is incorrect; the attribute is simply cookbook. There is a cookbook_name method, but it just returns the name of the cookbook containing the current recipe.

markjreed avatar Oct 24 '13 18:10 markjreed

I think that's not true, @markjreed. @bryanwb overrode Chef::Recipe#cookbook_name: https://github.com/bryanwb/chef-rewind/commit/6e828cd3dda7ce137ea6c25972f00406e9ccb3b3#diff-11f3abe9c672639ddca46a2698e820e5R37

Did you run chef-rewind and get any problem because of it, or did you catch it just by reading README.md?

hltbra avatar Oct 30 '13 14:10 hltbra

Well, then the bug is different, but still there. :) Now you're hiding the upstream 'cookbook_name' method, making it unavailable inside the definition block of a rewound resource.

Why would you call it 'cookbook_name' inside chef-edit instead of just using the existing 'cookbook' attribute that cookbook_file and template resources already have?

On Wed, Oct 30, 2013 at 10:49 AM, Hugo Lopes Tavares < [email protected]> wrote:

I think that's not true, @markjreed https://github.com/markjreed. @bryanwb https://github.com/bryanwb overrode Chef::Recipe#cookbook_name: 6e828cd#diff-11f3abe9c672639ddca46a2698e820e5R37https://github.com/bryanwb/chef-rewind/commit/6e828cd3dda7ce137ea6c25972f00406e9ccb3b3#diff-11f3abe9c672639ddca46a2698e820e5R37

Did you run chef-rewind and get any problem because of it, or did you catch it just by reading README.md?

— Reply to this email directly or view it on GitHubhttps://github.com/bryanwb/chef-rewind/pull/15#issuecomment-27395330 .

Mark J. Reed [email protected]

markjreed avatar Oct 30 '13 17:10 markjreed

I'm not sure there's a way of sensibly fixing this now - demunging cookbook_name is just going to break existing rewind users

thommay avatar Dec 16 '14 15:12 thommay