CFPropertyList 2.0.14 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9a51cc0e399b8e8d7719764cc9459c4f148e058c552bd97de7cda479462ce778
4
+ data.tar.gz: 5a5ffaf94e704fcd34246608fe41784b4ecc579125c874c397c34fde6e131e3c
5
+ SHA512:
6
+ metadata.gz: 5ce8a2387c34385c1ba660d5a0e41b3a3160a6297f8e279719b163c8c7e282a5b5ad5ab36bf287f2f056b2beb30c16c54380a98429d52cf30180426e0857faac
7
+ data.tar.gz: afc1382af071cc6560c15be4bf8670085bf0878d1006e6803dd073248055909738856ce2f73b632f56b141b98ff09aa7d85e8326bcaaad4dec8a4f1e3a19c16c
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2010 Christian Kruse, <cjk@wwwtech.de>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a
4
+ copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+ The above copyright notice and this permission notice shall be included
11
+ in all copies or substantial portions of the Software.
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
13
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
16
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
17
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
18
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+
data/README.md ADDED
@@ -0,0 +1,79 @@
1
+ CFPropertyList implementation
2
+ class to read, manipulate and write both XML and binary property list
3
+ files (plist(5)) as defined by Apple. Have a look at CFPropertyList::List
4
+ for more documentation.
5
+
6
+ # Caution!
7
+
8
+ In version 3.0.0 we dropped Ruby 1.8 compatibility. If you are using
9
+ Ruby 1.8 consider to update Ruby; if you can't upgrade, don't upgrade
10
+ CFPropertyList.
11
+
12
+ # Installation
13
+
14
+ You could either use ruby gems and install it via
15
+
16
+ ```bash
17
+ gem install CFPropertyList
18
+ ```
19
+
20
+ or you could clone this repository and place it somewhere in your load path.
21
+
22
+ Example:
23
+ ```ruby
24
+ require 'cfpropertylist'
25
+ ```
26
+
27
+ If you're using Rails, you can add it into your Gemfile
28
+
29
+ ```ruby
30
+ gem 'CFPropertyList'
31
+ ```
32
+
33
+ # Usage
34
+
35
+ ## create a arbitrary data structure of basic data types
36
+
37
+ ```ruby
38
+ data = {
39
+ 'name' => 'John Doe',
40
+ 'missing' => true,
41
+ 'last_seen' => Time.now,
42
+ 'friends' => ['Jane Doe','Julian Doe'],
43
+ 'likes' => {
44
+ 'me' => false
45
+ }
46
+ }
47
+ ```
48
+
49
+ ## create CFPropertyList::List object
50
+
51
+ ```ruby
52
+ plist = CFPropertyList::List.new
53
+ ```
54
+
55
+ ## call CFPropertyList.guess() to create corresponding CFType values
56
+
57
+ ```ruby
58
+ plist.value = CFPropertyList.guess(data)
59
+ ```
60
+
61
+ ## write plist to file
62
+ ```ruby
63
+ plist.save("example.plist", CFPropertyList::List::FORMAT_BINARY)
64
+ ```
65
+
66
+ ## … later, read it again
67
+ ```ruby
68
+ plist = CFPropertyList::List.new(:file => "example.plist")
69
+ data = CFPropertyList.native_types(plist.value)
70
+ ```
71
+
72
+ # Author and license
73
+
74
+ **Author:** Christian Kruse (mailto:cjk@wwwtech.de)
75
+
76
+ **Copyright:** Copyright (c) 2010
77
+
78
+ **License:** MIT License
79
+
@@ -3,6 +3,14 @@ class to read, manipulate and write both XML and binary property list
3
3
  files (plist(5)) as defined by Apple. Have a look at CFPropertyList::List
4
4
  for more documentation.
5
5
 
6
+ == Installation
7
+
8
+ You could either use ruby gems and install it via
9
+
10
+ gem install CFPropertyList
11
+
12
+ or you could clone this repository and place it somewhere in your load path.
13
+
6
14
  == Example
7
15
  require 'cfpropertylist'
8
16
 
@@ -33,4 +41,3 @@ for more documentation.
33
41
  Author:: Christian Kruse (mailto:cjk@wwwtech.de)
34
42
  Copyright:: Copyright (c) 2010
35
43
  License:: MIT License
36
-
data/THANKS ADDED
@@ -0,0 +1,7 @@
1
+ Special thanks to:
2
+
3
+ Steve Madsen for providing a lot of performance patches and bugfixes!
4
+ Have a look at his Github account: <http://github.com/sjmadsen>
5
+
6
+
7
+