travis-ci / dpl

Dpl (dee-pee-ell) is a deploy tool made for continuous deployment.
MIT License
1.29k stars 367 forks source link

Fix parsing of metadata.rb for chef_supermarket provider #1202

Closed bastianschwarz closed 3 years ago

bastianschwarz commented 4 years ago

Apparently Chef::Cookbook::Metadata.new.from_file('metadata.rb') only returns the last token of the metadata. Since the name is most likely not the last token the deployment failed since the name was something else, usually a version from a depends

This was changed so the metadata is an instance that is populated by from_file() and then the name property is returned.

This fixes #1199

As a side note: The unit test passed because the metadata.rb in the test was only the name property.

bastianschwarz commented 3 years ago

Is anyone interested in merging this PR? If not I will probably delete the fork soon since I'm pretty much in the middle of moving away from travis.

bastianschwarz commented 3 years ago

Feel free to use the fix but I'm closing the PR now.