CFPropertyList 2.2.5 → 2.2.6

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: 43f7f811eceb634fdfba4f72ed0f392a527deef5
4
- data.tar.gz: c0b1d2b1f2498420d409a6cb760fdc8584f2cfdd
3
+ metadata.gz: 4b30ded110bd85f7a8eafc9eee366c2211abb773
4
+ data.tar.gz: a1ca98c9eaad54639d28b28abd6816324d2add22
5
5
  SHA512:
6
- metadata.gz: b54f47bce079905efce945dbadb65560189c05e19376fc394133ebbef4967985f25a29f998b2b663dcaec4a2b3ee3ec1e67ded13d2cf043cf1a8faf629b2758c
7
- data.tar.gz: c5c52d7edd4e0eaf462a85b4e9fdf648a6f517f143e0a46c3d033e7dc8cf77028c30e15aa4c98a9694fa351c36d40ab72f22f5384a05b1808e3ca17e2bbd86a7
6
+ metadata.gz: cd3e1eed9eadc6ea992ebc2b3ea11416de40ca79737816900a7178b9225083dae04152c28e6978e8719beaca57860fbf7b3058945467da00320e0d9f12d8f573
7
+ data.tar.gz: 3cc180505495070909a90b443984fd464263a21691fc3d26f2478adccb77a95752b17983b60487d62d23d1e88f55ada78a8b279aa502dea417fe6026dc7c1949
@@ -186,7 +186,7 @@ module CFPropertyList
186
186
  if(object.is_a?(CFDate) || object.is_a?(CFString) || object.is_a?(CFInteger) || object.is_a?(CFReal) || object.is_a?(CFBoolean)) then
187
187
  return object.value
188
188
  elsif(object.is_a?(CFData)) then
189
- return object.decoded_value
189
+ return CFPropertyList::Blob.new(object.decoded_value)
190
190
  elsif(object.is_a?(CFArray)) then
191
191
  ary = []
192
192
  object.value.each do
@@ -91,12 +91,12 @@ module CFPropertyList
91
91
 
92
92
  if node.has_elements? then
93
93
  node.elements.each do |n|
94
- #print n.name + "\n"
95
94
  next if n.name == '#text' # avoid a bug of libxml
96
95
  next if n.name == '#comment'
97
96
 
98
97
  if n.name == "key" then
99
98
  key = get_value(n)
99
+ key = '' if key.nil? # REXML returns nil if key is empty
100
100
  else
101
101
  raise CFFormatError.new("Format error!") if key.nil?
102
102
  hsh[key] = import_xml(n)
@@ -129,6 +129,7 @@ module CFPropertyList
129
129
  ret = CFInteger.new(get_value(node).to_i)
130
130
  when 'string'
131
131
  ret = CFString.new(get_value(node))
132
+ ret.value = '' if ret.value.nil? # REXML returns nil for empty elements' .text attribute
132
133
  when 'data'
133
134
  ret = CFData.new(get_value(node))
134
135
  when 'date'
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: 2.2.5
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Kruse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-16 00:00:00.000000000 Z
11
+ date: 2013-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  version: '0'
62
62
  requirements: []
63
63
  rubyforge_project:
64
- rubygems_version: 2.1.11
64
+ rubygems_version: 2.0.3
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Read, write and manipulate both binary and XML property lists as defined