CFPropertyList 2.3.1 → 2.3.2

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: 5f857097a87917af6bf77650b83d5431e8f60cd3
4
- data.tar.gz: a9712990ee25c323fc489cc6e024356bc8a5aea7
3
+ metadata.gz: d519ed64cdc80f16251b4a4d7ba4c9cdf942bd32
4
+ data.tar.gz: 2dcef145b4335a0ddaf020126046093f75b69ae6
5
5
  SHA512:
6
- metadata.gz: c6373ce6a8ce1022ac08f30b3beeb522606da7989089522197d053a33bafc6874a437273a1af5e816a06d31217492e1ae4980728bfbad7f2d8c236c0f38179d9
7
- data.tar.gz: 194263a1998776a21a4fe3d87228249d8e3cc0440d08c74806258e49861bce2e1bc185af198685740697acb863821a86dd0a9ae42d7499e76b7aa54c3c50f10b
6
+ metadata.gz: 93394de8987d91f5a3a6d2a989cc0130d3393034e96fad17a51caf85e8ccb779667569f2026f865531d2230c8acb6357f41ca166491335f4aed6aae6485805e6
7
+ data.tar.gz: 7aa7b3ab2cdb9f6173a7cd8ccc2a4bdc0c8c71d68581a40d29f3485dcd2a0d792052f87306be842a5ee2a38fa4f2e3ac63fc130a0977b413fe37c53b3b3ce42c
@@ -12,7 +12,7 @@
12
12
  # License:: MIT License
13
13
 
14
14
  # general plist error. All exceptions thrown are derived from this class.
15
- class CFPlistError < Exception
15
+ class CFPlistError < StandardError
16
16
  end
17
17
 
18
18
  # Exception thrown when format errors occur
@@ -137,10 +137,11 @@ module CFPropertyList
137
137
  when Blob
138
138
  CFData.new(object, CFData::DATA_RAW)
139
139
 
140
- when String
141
- CFString.new(object)
140
+ when String, Symbol
141
+ CFString.new(object.to_s)
142
142
 
143
- when Time, DateTime, Date then CFDate.new(object)
143
+ when Time, DateTime, Date
144
+ CFDate.new(object)
144
145
 
145
146
  when Array, Enumerator, Enumerable::Enumerator
146
147
  ary = Array.new
@@ -295,7 +296,7 @@ module CFPropertyList
295
296
 
296
297
  # load a plist from a plain string
297
298
  # str:: The string containing the plist
298
- def load_binary_str(str=nil)
299
+ def load_plain_str(str=nil)
299
300
  load_str(str,List::FORMAT_PLAIN)
300
301
  end
301
302
 
@@ -359,7 +360,7 @@ module CFPropertyList
359
360
 
360
361
  prsr = nil
361
362
  if filetype == "bplist" then
362
- raise CFFormatError.new("Wong file version #{version}") unless version == "00"
363
+ raise CFFormatError.new("Wrong file version #{version}") unless version == "00"
363
364
  prsr = Binary.new
364
365
  @format = List::FORMAT_BINARY
365
366
  else
@@ -123,6 +123,8 @@ module CFPropertyList
123
123
  "\r"
124
124
  when 't'
125
125
  "\t"
126
+ when 'U'
127
+ @doc.scan(/.{4}/).hex.chr('utf-8')
126
128
  end
127
129
  end
128
130
 
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.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Kruse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2015-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project:
67
- rubygems_version: 2.4.5
67
+ rubygems_version: 2.4.6
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: Read, write and manipulate both binary and XML property lists as defined