opscode/chef — pull request #1418 by tarrall (2014-05-07 23:19:47+00:00)
Title: CHEF-5265 - upstart service not working correctly when called with parameters

When an Upstart service is created with parameters, the service_name gets changed which in turn causes us to look for the wrong upstart config file & then to conclude the service is not enabled.

Dup'ing service_name when assigning to @job allows us to mutate @job without also mutating the service_name.

We might want to delve deeper at some point and make sure that we can safely refer to two services with the same service_name but different parameters... but I wanted to keep this patch clean and free of those more debatable issues!

Regression (spec/unit) test included.