CFPropertyList 3.0.0 → 3.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
  SHA256:
3
- metadata.gz: 9a51cc0e399b8e8d7719764cc9459c4f148e058c552bd97de7cda479462ce778
4
- data.tar.gz: 5a5ffaf94e704fcd34246608fe41784b4ecc579125c874c397c34fde6e131e3c
3
+ metadata.gz: ce2a2a12ec01d75900aa23b675b98a29a536514b3a57535c1b8ba0eedc40d54b
4
+ data.tar.gz: 88c7d8d35e92c2c25d9da2007952a5d5b7e5149a74b3375d474075d5b71b3e16
5
5
  SHA512:
6
- metadata.gz: 5ce8a2387c34385c1ba660d5a0e41b3a3160a6297f8e279719b163c8c7e282a5b5ad5ab36bf287f2f056b2beb30c16c54380a98429d52cf30180426e0857faac
7
- data.tar.gz: afc1382af071cc6560c15be4bf8670085bf0878d1006e6803dd073248055909738856ce2f73b632f56b141b98ff09aa7d85e8326bcaaad4dec8a4f1e3a19c16c
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. Instanciate with #new
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 => LibXML::XML::Parser::Options::NOBLANKS|LibXML::XML::Parser::Options::NOENT)
17
+ doc = LibXML::XML::Document.file(opts[:file],:options => PARSER_OPTIONS)
17
18
  else
18
- doc = LibXML::XML::Document.string(opts[:data],:options => LibXML::XML::Parser::Options::NOBLANKS|LibXML::XML::Parser::Options::NOENT)
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, Nokogiri::XML::ParseOptions::NOBLANKS|Nokogiri::XML::ParseOptions::NOENT) }
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, Nokogiri::XML::ParseOptions::NOBLANKS|Nokogiri::XML::ParseOptions::NOENT)
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.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: 2018-01-13 00:00:00.000000000 Z
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
- rubyforge_project:
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