{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/4067","labels_url":"https://api.github.com/repos/chef/chef/issues/4067/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/4067/comments","events_url":"https://api.github.com/repos/chef/chef/issues/4067/events","html_url":"https://github.com/chef/chef/issues/4067","id":112019500,"number":4067,"title":"converge_by in new custom resources","user":{"login":"glenjamin","id":151272,"avatar_url":"https://avatars.githubusercontent.com/u/151272?v=3","gravatar_id":"","url":"https://api.github.com/users/glenjamin","html_url":"https://github.com/glenjamin","followers_url":"https://api.github.com/users/glenjamin/followers","following_url":"https://api.github.com/users/glenjamin/following{/other_user}","gists_url":"https://api.github.com/users/glenjamin/gists{/gist_id}","starred_url":"https://api.github.com/users/glenjamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenjamin/subscriptions","organizations_url":"https://api.github.com/users/glenjamin/orgs","repos_url":"https://api.github.com/users/glenjamin/repos","events_url":"https://api.github.com/users/glenjamin/events{/privacy}","received_events_url":"https://api.github.com/users/glenjamin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-18T13:18:55Z","updated_at":"2015-10-18T14:16:32Z","closed_at":null,"body":"Is there any way to use `converge_by` in the new custom resources?\r\n\r\nI've switched a library cookbook over to using them, and everything is much nicer - but having to switch back to an LWRP to allow `converge_by` is a bit annoying."},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/149019797","html_url":"https://github.com/chef/chef/issues/4067#issuecomment-149019797","issue_url":"https://api.github.com/repos/chef/chef/issues/4067","id":149019797,"user":{"login":"glenjamin","id":151272,"avatar_url":"https://avatars.githubusercontent.com/u/151272?v=3","gravatar_id":"","url":"https://api.github.com/users/glenjamin","html_url":"https://github.com/glenjamin","followers_url":"https://api.github.com/users/glenjamin/followers","following_url":"https://api.github.com/users/glenjamin/following{/other_user}","gists_url":"https://api.github.com/users/glenjamin/gists{/gist_id}","starred_url":"https://api.github.com/users/glenjamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenjamin/subscriptions","organizations_url":"https://api.github.com/users/glenjamin/orgs","repos_url":"https://api.github.com/users/glenjamin/repos","events_url":"https://api.github.com/users/glenjamin/events{/privacy}","received_events_url":"https://api.github.com/users/glenjamin/received_events","type":"User","site_admin":false},"created_at":"2015-10-18T14:16:32Z","updated_at":"2015-10-18T14:16:32Z","body":"I created this little mixin to make the custom resource behave a bit more like an LWRP in this regard:\r\n\r\n```ruby\r\n  module ConvergeBy\r\n    include Chef::Mixin::WhyRun\r\n\r\n    def converge_by(descriptions, &block)\r\n      converge_actions.add_action(descriptions, &block)\r\n      updated_by_last_action(true)\r\n    end\r\n\r\n    protected\r\n\r\n    def converge_actions\r\n      @converge_actions ||= ConvergeActions.new(self, run_context, action)\r\n    end\r\n  end\r\n```\r\n\r\nIt seems to work, but there's a strong chance I overlooked something important"}}