plist4r

Plist4r is a friendly rubygem / ruby lib for handling plist files.

Installation

  gem install plist4r

Quick Start

  require 'plist4r'

  Plist4r::Config.default_path = "/Library/LaunchDaemons"
  filename = "com.github.myservice.plist"
  p = Plist4r.open(filename)

  p.plist_type
  # => :launchd

  p.file_format
  # => :xml

  p.edit do
    program_arguments ["/usr/local/bin/myservice"]
    watch_paths ["/var/db/myservice"]
  end

  p.save

Overview

Examples

Recommended reading

How to contribute

Copyright

Plist4r is Copyright © 2009 under MIT License. See LICENSE for details.