{"name":"line","version":"0.6.3","description":"Provides line editing resources for use by recipes","long_description":"# line cookbook\n\n# Motivation\nQuite often, the need arises to do line editing instead of managing an\nentire file with a template resource. This cookbook supplies various \nresources that will help you do this.\n\n# Usage\nAdd \"depends 'line'\" to your cookbook's metadata.rb to gain access to\nthe resoures.\n\n    append_if_no_line \"make sure a line is in dangerfile\" do\n      path \"/tmp/dangerfile\"\n      line \"HI THERE I AM STRING\"\n    end\n    \n    replace_or_add \"spread the love\" do\n      path \"/some/file\"\n      pattern \"Why hello there.*\"\n      line \"Why hello there, you beautiful person, you.\"\n    end\n\n    delete_lines \"remove hash-comments from /some/file\" do\n      path \"/some/file\"\n      pattern \"^#.*\"\n    end\n\n    add_to_list \"add entry to a list\"\n      path \"/some/file\"\n      pattern \"People to call: \"\n      delim [\",\"]\n      entry \"Bobby\"\n    end\n\n    delete_from_list \"delete entry from a list\"\n      path \"/some/file\"\n      pattern \"People to call: \"\n      delim [\",\"]\n      entry \"Bobby\"\n    end\n\n# Notes\nSo far, the only resource implemented are \n\n    append_if_no_line\n    replace_or_add\n    delete_lines\n    add_to_list\n    delete_from_list\n\n  add_to_list\n    delim must be an array of 1, 2 or 3 multi-character elements.\n      If one delimiter is given, it is assumed that either the delimiter or the given search pattern will proceed each entry and\n      each entry will be followed by either the delimeter or a new line character:\n          People to call: Joe, Bobby\n\t  delim [\",\"]\n\t  entry 'Karen'\n          People to call: Joe, Bobby, Karen\n\t   \n      If two delimiters are given, the first is used as the list element delimiter and the second as entry delimiters:\n          my @net1918 = (\"10.0.0.0/8\", \"172.16.0.0/12\");\n\t  delim [\", \", \"\\\"\"]\n\t  entry \"192.168.0.0/16\"\n          my @net1918 = (\"10.0.0.0/8\", \"172.16.0.0/12\", \"192.168.0.0/16\");\n\n      if three delimiters are given, the first is used as the list element delimiter, the second as the leading entry delimiter and the third as the trailing delimiter:\n          multi = ([310], [818])\n      delim [\", \", \"[\", \"]\"]\n      entry \"425\"\n          multi = ([310], [818], [425])\n\n  delete_from_list\n    Works exactly the same way as add_to_list, see above.\n\t        \n\nMore to follow.\n\n# Recipes\ntester -  A recipe to exercise the resources\n\n# Author\nAuthor:: Sean OMeara (<someara@chef.io>)\nContributor:: Antek S. Baranski (<antek.baranski@gmail.com>)\n\n","maintainer":"Sean OMeara","maintainer_email":"someara@chef.io","license":"Apache2","platforms":{},"dependencies":{},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{}}