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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cccb65a32fea2d625572d56e271741ad40ed0e57
4
- data.tar.gz: 321a139923120337ab64a16c9836386e3ab5feaa
3
+ metadata.gz: aa876b36addfa71b3f6ae9e2cbda72bf85644cad
4
+ data.tar.gz: 4a9757255bc2bf508d8db8a3a0aae5b6a2c7c59c
5
5
  SHA512:
6
- metadata.gz: e7fe9ed9590b7a55622509048b7d51f44a011ca8dc223acd717e3cdcbcad0802627bb9075be536f511a27cf7245a2bdc5962a71d9e82dd1f87a165025f2a5777
7
- data.tar.gz: 4ef25397d9e969d28bc97943f11c9e075c00b12b36479e5cad80c47c6eec9a2fbdc94ad5c7c454c65ae1fab4a13550e8e747a425a9406c7f7ce21dfd80bb06aa
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
@@ -5,3 +5,11 @@ task :test do
5
5
  require f
6
6
  end
7
7
  end
8
+
9
+ desc "set coverage "
10
+ task :set_cov_env do
11
+ ENV['COVERAGE'] = '1'
12
+ end
13
+
14
+ desc "test and generate coverage"
15
+ task :cov => [:set_cov_env, :test]
@@ -1,3 +1,3 @@
1
1
  module PropertyList
2
- VERSION = '1.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: property-list
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luikore