A summary of data about the Ruby ecosystem.

https://github.com/patsplat/plist

All-purpose Property List manipulation library
https://github.com/patsplat/plist

Keywords from Contributors

rubygems rack activejob activerecord mvc

Last synced: about 4 hours ago
JSON representation

Repository metadata

All-purpose Property List manipulation library

README.rdoc

          = All-purpose Property List manipulation library

{rdoc-image:https://badge.fury.io/rb/plist.svg}[https://rubygems.org/gems/plist]
{rdoc-image:https://github.com/patsplat/plist/actions/workflows/ci.yml/badge.svg}[https://github.com/patsplat/plist/actions/workflows/ci.yml]

Plist is a library to manipulate Property List files, also known as plists.  It can parse plist files into native Ruby data structures as well as generating new plist files from your Ruby objects.

== Usage

=== Security considerations

By default, Plist.parse_xml uses Marshal.load for  attributes. If the  attribute contains malicious data, an attacker can gain code execution.

You should never use the default Plist.parse_xml with untrusted plists!

To disable the Marshal.load behavior, use marshal: false. This will return the raw binary  contents as an IO object instead of attempting to unmarshal it.

=== Parsing

  result = Plist.parse_xml('path/to/example.plist')
  # or
  result = Plist.parse_xml('path/to/example.plist', marshal: false)

  result.class
  => Hash

  "#{result['FirstName']} #{result['LastName']}"
  => "John Public"

  result['ZipPostal']
  => "12345"

==== Example Property List

  
  
  
  
          FirstName
          John

          LastName
          Public

          StreetAddr1
          123 Anywhere St.

          StateProv
          CA

          City
          Some Town

          CountryName
          United States

          AreaCode
          555

          LocalPhoneNumber
          5551212

          ZipPostal
          12345
  
  

=== Generation

plist also provides the ability to generate plists from Ruby objects.  The following Ruby classes are converted into native plist types:
  Array, Bignum, Date, DateTime, Fixnum, Float, Hash, Integer, String, Symbol, Time, true, false

* +Array+ and +Hash+ are both recursive; their elements will be converted into plist nodes inside the  and  containers (respectively).
* +IO+ (and its descendants) and +StringIO+ objects are read from and their contents placed in a  element.
* User classes may implement +to_plist_node+ to dictate how they should be serialized; otherwise the object will be passed to Marshal.dump and the result placed in a  element.  See below for more details.

==== Creating a plist

There are two ways to generate complete plists.  Given an object:

  obj = [1, :two, {'c' => 0xd}]

If you've mixed in Plist::Emit (which is already done for +Array+ and +Hash+), you can simply call +to_plist+:

  obj.to_plist

This is equivalent to calling Plist::Emit.dump(obj).  Either one will yield:

  
  
  
  
      1
      two
      
        c
        13
      
  
  

You can also dump plist fragments by passing +false+ as the second parameter:

  Plist::Emit.dump('holy cow!', false)
  => "holy cow!"

==== Custom serialization

If your class can be safely coerced into a native plist datatype, you can implement +to_plist_node+.  Upon encountering an object of a class it doesn't recognize, the plist library will check to see if it responds to +to_plist_node+, and if so, insert the result of that call into the plist output.

An example:

  class MyFancyString
    ...

    def to_plist_node
      return "#{self.defancify}"
    end
  end

When you attempt to serialize a +MyFancyString+ object, the +to_plist_node+ method will be called and the object's contents will be defancified and placed in the plist.

If for whatever reason you can't add this method, your object will be serialized with Marshal.dump instead.

==== Custom indent

You can customize the default indent foramt (default format is tab) or specify the indent format on each serialization. For example, if you want to reduce size of plist output, you can set the indent to nil.

An example to change default indent format:

  Plist::Emit::DEFAULT_INDENT = nil

An example to specify indent format on dump:

  Plist::Emit.dump({:foo => :bar}, false)
  => "\n\tfoo\n\tbar\n\n"

  Plist::Emit.dump({:foo => :bar}, false, :indent => nil)
  => "\nfoo\nbar\n\n"


== Links

[Rubygems]      https://rubygems.org/gems/plist
[GitHub]        https://github.com/bleything/plist
[RDoc]          http://www.rubydoc.info/gems/plist

== Credits

plist was authored by Ben Bleything  and Patrick May . Patrick wrote most of the code; Ben contributed his plist generation library. The project is currently maintained by @mattbrictson[https://github.com/mattbrictson].

Other folks who have helped along the way:

[Martin Dittus] who pointed out that +Time+ wasn't enough for plist Dates, especially those in ~/Library/Cookies/Cookies.plist
[Chuck Remes] who pushed Patrick towards implementing #to_plist
[Mat Schaffer] who supplied code and test cases for  elements
[Michael Granger] for encouragement and help
[Carsten Bormann, Chris Hoffman, Dana Contreras, Hongli Lai, Johan Sørensen] for contributing Ruby 1.9.x compatibility fixes
And thank you to all of the other GitHub contributors[https://github.com/patsplat/plist/graphs/contributors] not mentioned here!

== License and Copyright

plist is released under the MIT License.

Portions of the code (notably the Rakefile) contain code pulled and/or adapted from other projects.  These files contain a comment at the top describing what was used.

=== MIT License

Copyright (c) 2006-2010, Ben Bleything  and Patrick May 

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 118
Total Committers: 18
Avg Commits per committer: 6.556
Development Distribution Score (DDS): 0.542

Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Ben Bleything b****n@b****t 54
Matt Brictson m****t@m****m 29
Markus Reiter me@r****s 15
Yen-Nan Lin y****w@g****m 3
Patrick May p****k@h****g 3
Tim Smith t****4@g****m 2
Hayg Astourian h****g@m****m 1
Patrick Way p****y@i****m 1
Albert Wang a****w@m****u 1
Alejandro Rupérez a****z@g****m 1
Brian Freese b****e@h****m 1
Chris Larsen c****d@g****m 1
Dustin J. Mitchell d****n@v****s 1
Laurent Arnoud l****t@s****t 1
Sam Neubardt s****t@g****m 1
Shay Frendt s****t@g****m 1
Taylor Boyko t****o@g****m 1
bradleyjucsc b****t@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 26 days ago

Total issues: 20
Total pull requests: 50
Average time to close issues: over 2 years
Average time to close pull requests: 9 months
Total issue authors: 20
Total pull request authors: 24
Average comments per issue: 4.6
Average comments per pull request: 1.5
Merged pull request: 40
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/patsplat/plist

Top Issue Authors

  • ljharb (1)
  • mindloaf (1)
  • Destrocamil (1)
  • quantumgardener (1)
  • adytzs (1)
  • ArloL (1)
  • grosser (1)
  • buk (1)
  • tomandersen (1)
  • nsforge (1)
  • mattbrictson (1)
  • bradleyjucsc (1)
  • ghost (1)
  • perlmunger (1)
  • Larzo (1)

Top Pull Request Authors

  • mattbrictson (22)
  • reitermarkus (3)
  • patsplat (2)
  • pelargir (2)
  • tas50 (2)
  • albertyw (1)
  • kunklejr (1)
  • igorsales (1)
  • samn (1)
  • warfreak92 (1)
  • tboyko (1)
  • copacetic (1)
  • bkoell (1)
  • HCLarsen (1)
  • bfreese (1)

Top Issue Labels

  • new feature (2)
  • you can help! (2)
  • confirmed bug (1)
  • bug? (1)
  • needs more info (1)

Top Pull Request Labels


Package metadata

gem.coop: plist

Plist is a library to manipulate Property List files, also known as plists. It can parse plist files into native Ruby data structures as well as generating new plist files from your Ruby objects.

  • Homepage: https://github.com/patsplat/plist
  • Documentation: http://www.rubydoc.info/gems/plist/
  • Licenses: MIT
  • Latest release: 3.7.2 (published about 1 year ago)
  • Last Synced: 2026-03-02T08:03:02.816Z (1 day ago)
  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 191,068,023 Total
  • Docker Downloads: 464,698,359
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.09%
    • Downloads: 0.132%
    • Docker downloads count: 0.228%
  • Maintainers (2)
rubygems.org: plist

Plist is a library to manipulate Property List files, also known as plists. It can parse plist files into native Ruby data structures as well as generating new plist files from your Ruby objects.

  • Homepage: https://github.com/patsplat/plist
  • Documentation: http://www.rubydoc.info/gems/plist/
  • Licenses: MIT
  • Latest release: 3.7.2 (published about 1 year ago)
  • Last Synced: 2026-03-02T07:31:39.500Z (1 day ago)
  • Versions: 18
  • Dependent Packages: 258
  • Dependent Repositories: 26,152
  • Downloads: 191,068,023 Total
  • Docker Downloads: 464,698,359
  • Rankings:
    • Downloads: 0.146%
    • Dependent packages count: 0.155%
    • Dependent repos count: 0.22%
    • Docker downloads count: 0.302%
    • Average: 1.198%
    • Forks count: 3.146%
    • Stargazers count: 3.218%
  • Maintainers (2)
proxy.golang.org: github.com/patsplat/plist

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/patsplat/plist#section-documentation
  • Licenses: mit
  • Latest release: v3.7.2+incompatible (published about 1 year ago)
  • Last Synced: 2026-02-28T12:03:49.630Z (3 days ago)
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Forks count: 2.944%
    • Stargazers count: 3.157%
    • Average: 6.62%
    • Dependent packages count: 9.576%
    • Dependent repos count: 10.802%
ubuntu-24.04: ruby-plist

  • Homepage: https://github.com/patsplat/plist
  • Licenses:
  • Latest release: 3.7.0-1 (published 25 days ago)
  • Last Synced: 2026-02-06T15:46:46.297Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-23.04: ruby-plist

  • Homepage: https://github.com/patsplat/plist
  • Licenses:
  • Latest release: 3.6.0-1 (published 20 days ago)
  • Last Synced: 2026-02-11T06:46:29.064Z (20 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.10: ruby-plist

  • Homepage: https://github.com/patsplat/plist
  • Licenses:
  • Latest release: 3.6.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T18:29:32.764Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-plist

  • Homepage: https://github.com/patsplat/plist
  • Licenses:
  • Latest release: 3.7.0-1 (published 22 days ago)
  • Last Synced: 2026-02-09T17:04:27.885Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-22.04: ruby-plist

  • Homepage: https://github.com/patsplat/plist
  • Licenses:
  • Latest release: 3.6.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T13:22:58.571Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-plist

  • Homepage: https://github.com/patsplat/plist
  • Documentation: https://packages.debian.org/bookworm/ruby-plist
  • Licenses:
  • Latest release: 3.6.0-1 (published 19 days ago)
  • Last Synced: 2026-02-12T23:37:27.397Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-13: ruby-plist

  • Homepage: https://github.com/patsplat/plist
  • Documentation: https://packages.debian.org/trixie/ruby-plist
  • Licenses:
  • Latest release: 3.7.0-1 (published 19 days ago)
  • Last Synced: 2026-02-13T13:18:38.196Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Dependencies

plist.gemspec rubygems
  • bundler >= 1.14 development
  • rake ~> 10.5 development
  • test-unit ~> 1.2 development
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • ruby/setup-ruby v1 composite
Dockerfile docker
  • ruby 2.5.3-alpine3.8 build
docker-compose.yml docker
Gemfile rubygems
  • base64 >= 0
  • rake ~> 13.0
  • rake ~> 11.3
  • test-unit ~> 3.5

Score: 29.624648377778314