CFPropertyList 3.0.0 → 3.0.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce2a2a12ec01d75900aa23b675b98a29a536514b3a57535c1b8ba0eedc40d54b
|
4
|
+
data.tar.gz: 88c7d8d35e92c2c25d9da2007952a5d5b7e5149a74b3375d474075d5b71b3e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3c408d2b546aaf3d0a5df01f12257965e5925130db5dbf4bc0bc92c4ef549ed649d89fb7d5887e33603f9846e59d081a3b2b11340e3573a3f3e14931f240d82
|
7
|
+
data.tar.gz: a881a3d15e2f8c6e2e14c7c6b31adb2a7f3c5a37555dc6a1f745bdf516c8c4c08fd789d90b8935aedf98952d3bba05c24538837d5ea0107cc9bf3493b0308837
|
@@ -197,7 +197,7 @@ module CFPropertyList
|
|
197
197
|
|
198
198
|
module_function :guess, :native_types
|
199
199
|
|
200
|
-
# Class representing a CFPropertyList.
|
200
|
+
# Class representing a CFPropertyList. Instantiate with #new
|
201
201
|
class List
|
202
202
|
# Format constant for binary format
|
203
203
|
FORMAT_BINARY = 1
|
@@ -5,6 +5,7 @@ require 'libxml'
|
|
5
5
|
module CFPropertyList
|
6
6
|
# XML parser
|
7
7
|
class LibXMLParser < XMLParserInterface
|
8
|
+
PARSER_OPTIONS = LibXML::XML::Parser::Options::NOBLANKS|LibXML::XML::Parser::Options::NOENT|LibXML::XML::Parser::Options::NONET
|
8
9
|
# read a XML file
|
9
10
|
# opts::
|
10
11
|
# * :file - The filename of the file to load
|
@@ -13,9 +14,9 @@ module CFPropertyList
|
|
13
14
|
doc = nil
|
14
15
|
|
15
16
|
if(opts.has_key?(:file)) then
|
16
|
-
doc = LibXML::XML::Document.file(opts[:file],:options =>
|
17
|
+
doc = LibXML::XML::Document.file(opts[:file],:options => PARSER_OPTIONS)
|
17
18
|
else
|
18
|
-
doc = LibXML::XML::Document.string(opts[:data],:options =>
|
19
|
+
doc = LibXML::XML::Document.string(opts[:data],:options => PARSER_OPTIONS)
|
19
20
|
end
|
20
21
|
|
21
22
|
if doc
|
@@ -5,6 +5,7 @@ require 'nokogiri'
|
|
5
5
|
module CFPropertyList
|
6
6
|
# XML parser
|
7
7
|
class NokogiriXMLParser < ParserInterface
|
8
|
+
PARSER_OPTIONS = Nokogiri::XML::ParseOptions::NOBLANKS|Nokogiri::XML::ParseOptions::NOENT|Nokogiri::XML::ParseOptions::NONET
|
8
9
|
# read a XML file
|
9
10
|
# opts::
|
10
11
|
# * :file - The filename of the file to load
|
@@ -12,9 +13,9 @@ module CFPropertyList
|
|
12
13
|
def load(opts)
|
13
14
|
doc = nil
|
14
15
|
if(opts.has_key?(:file)) then
|
15
|
-
File.open(opts[:file], "rb") { |fd| doc = Nokogiri::XML::Document.parse(fd, nil, nil,
|
16
|
+
File.open(opts[:file], "rb") { |fd| doc = Nokogiri::XML::Document.parse(fd, nil, nil, PARSER_OPTIONS) }
|
16
17
|
else
|
17
|
-
doc = Nokogiri::XML::Document.parse(opts[:data], nil, nil,
|
18
|
+
doc = Nokogiri::XML::Document.parse(opts[:data], nil, nil, PARSER_OPTIONS)
|
18
19
|
end
|
19
20
|
|
20
21
|
if doc
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: CFPropertyList
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Kruse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -64,8 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
|
-
|
68
|
-
rubygems_version: 2.7.3
|
67
|
+
rubygems_version: 3.0.3
|
69
68
|
signing_key:
|
70
69
|
specification_version: 4
|
71
70
|
summary: Read, write and manipulate both binary and XML property lists as defined
|