{"action":"created","issue":{"url":"https://api.github.com/repos/martinb3-cookbooks/xmledit-cookbook/issues/17","repository_url":"https://api.github.com/repos/martinb3-cookbooks/xmledit-cookbook","labels_url":"https://api.github.com/repos/martinb3-cookbooks/xmledit-cookbook/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/martinb3-cookbooks/xmledit-cookbook/issues/17/comments","events_url":"https://api.github.com/repos/martinb3-cookbooks/xmledit-cookbook/issues/17/events","html_url":"https://github.com/martinb3-cookbooks/xmledit-cookbook/issues/17","id":153013520,"number":17,"title":"Append to end and to begin.","user":{"login":"marchenkov","id":6850491,"avatar_url":"https://avatars.githubusercontent.com/u/6850491?v=3","gravatar_id":"","url":"https://api.github.com/users/marchenkov","html_url":"https://github.com/marchenkov","followers_url":"https://api.github.com/users/marchenkov/followers","following_url":"https://api.github.com/users/marchenkov/following{/other_user}","gists_url":"https://api.github.com/users/marchenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/marchenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marchenkov/subscriptions","organizations_url":"https://api.github.com/users/marchenkov/orgs","repos_url":"https://api.github.com/users/marchenkov/repos","events_url":"https://api.github.com/users/marchenkov/events{/privacy}","received_events_url":"https://api.github.com/users/marchenkov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-04T13:35:22Z","updated_at":"2016-05-04T22:20:14Z","closed_at":"2016-05-04T14:58:44Z","body":"If I use append_if_missing new value is appended to the end if I have list with values (because you use node_parent.add_child()).\r\n\r\nCan you add new action: append_first_if_missing (and use node_parent.prepend_child(), but not node_parent.add_child()).\r\n```\r\nxml_edit 'set foo to true' do\r\n  path '/etc/application.xml'\r\n  target '/config/foo[text()=\\'false\\']'\r\n  fragment '<foo>true</foo>'\r\n  action : append_first_if_missing\r\nend\r\n```\r\nOR\r\nYou can create first: true as option that I can pass:\r\n```\r\nxml_edit 'set foo to true' do\r\n  path '/etc/application.xml'\r\n  target '/config/foo[text()=\\'false\\']'\r\n  fragment '<foo>true</foo>'\r\n  first True\r\n  action : append_if_missing\r\nend\r\n```\r\n\r\nI've prefer first variant with new action: append_first_if_missing.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/martinb3-cookbooks/xmledit-cookbook/issues/comments/217021147","html_url":"https://github.com/martinb3-cookbooks/xmledit-cookbook/issues/17#issuecomment-217021147","issue_url":"https://api.github.com/repos/martinb3-cookbooks/xmledit-cookbook/issues/17","id":217021147,"user":{"login":"marchenkov","id":6850491,"avatar_url":"https://avatars.githubusercontent.com/u/6850491?v=3","gravatar_id":"","url":"https://api.github.com/users/marchenkov","html_url":"https://github.com/marchenkov","followers_url":"https://api.github.com/users/marchenkov/followers","following_url":"https://api.github.com/users/marchenkov/following{/other_user}","gists_url":"https://api.github.com/users/marchenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/marchenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marchenkov/subscriptions","organizations_url":"https://api.github.com/users/marchenkov/orgs","repos_url":"https://api.github.com/users/marchenkov/repos","events_url":"https://api.github.com/users/marchenkov/events{/privacy}","received_events_url":"https://api.github.com/users/marchenkov/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T22:20:14Z","updated_at":"2016-05-04T22:20:14Z","body":"Hi. \r\nWhen you plan release on Chef Supermarket? \r\nhttps://supermarket.chef.io/cookbooks/xmledit - just now I see only 3.0.2. \r\nThanks."}}