property-list 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -0
- data/Rakefile +8 -0
- data/lib/property-list/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa876b36addfa71b3f6ae9e2cbda72bf85644cad
|
4
|
+
data.tar.gz: 4a9757255bc2bf508d8db8a3a0aae5b6a2c7c59c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a54bf12b89e339523d7a29de13096d32ddb4e7c99ab6a6ff5f09cb09b480848883b2379826b6759472b8c1b8447b5b88b6f615dca6ada8fe1bce37dcabad543a
|
7
|
+
data.tar.gz: 3d9320c8aee3e89789ccc5d3212a70f1fcc119a5b9ca34412a2622a91ac15471e6e951d5c0b4b104c69c6a48292a7ec992e887b7892767a30472d1760ac72b32
|
data/README.md
CHANGED
@@ -23,6 +23,23 @@ Generate a plist file data
|
|
23
23
|
PropertyList.dump_binary obj
|
24
24
|
PropertyList.dump_ascii obj
|
25
25
|
|
26
|
+
XML formatting options for `PropertyList.dump_xml object, options`
|
27
|
+
|
28
|
+
- `segment:` whether wrap the xml output is a segment or wrapped with `<?xml>` and `<plist>` tags. default is `false`.
|
29
|
+
- `xml_version:` you can also specify `"1.1"` for https://www.w3.org/TR/xml11/, default is `"1.0"`, no effect if `:segment` is set to `true`.
|
30
|
+
- `indent_unit:` the indent unit, default value is `"\t"`, set to `nil` or `''` if you don't need indent.
|
31
|
+
- `initial_indent:` initial indent space, default is `''`, the indentation per line equals to `initial_indent + indent * current_indent_level`.
|
32
|
+
- `base64_width:` the width of characters per line when serializing data with Base64, default value is `68`, must be multiple of `4`.
|
33
|
+
- `base64_indent:` whether indent the Base64 encoded data, you can use `false` for compatibility to generate same output for other frameworks, default value is `true`.
|
34
|
+
|
35
|
+
ASCII formatting options for `PropertyList.dump_ascii object, options`
|
36
|
+
|
37
|
+
- `indent_unit:` the indent unit, default value is `"\t"`, set to `''` if you don't need indent
|
38
|
+
- `initial_indent:` initial indent space, default is `''`, the indentation per line equals to `initial_indent + indent * current_indent_level`
|
39
|
+
- `wrap:` wrap the top level output with `{...}` when obj is a Hash, default is `true`.
|
40
|
+
- `encoding_comment:` add encoding comment `// !$*UTF8*$!` on top of file, default is `false`
|
41
|
+
- `sort_keys:` sort dict keys, default is `true`
|
42
|
+
|
26
43
|
## Data type mapping
|
27
44
|
|
28
45
|
Data type mapping in `PropertyList.load`:
|
@@ -50,3 +67,8 @@ Reverse mapping in `PropertyList.dump_*`:
|
|
50
67
|
## Credits
|
51
68
|
|
52
69
|
The binary generating code is modified from https://github.com/jarib/plist with bug fixes and performance tuning.
|
70
|
+
|
71
|
+
## Alternative plist libraries for Ruby
|
72
|
+
|
73
|
+
- [plist](https://github.com/patsplat/plist): only deals with XML plist, and generates wrong plist when there is handle line endings in strings.
|
74
|
+
- [CFPropertyList](https://github.com/ckruse/CFPropertyList): also deals with XML/Binary/ASCII plist files, more complex API and more thourough tests.
|
data/Rakefile
CHANGED