plist 3.7.0 → 3.7.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: 34fa4fc386b9fb97f4e27a345e5a15fcae275edba2e2c92285ef04ffb25ee2b8
4
- data.tar.gz: a0a416e828b8232c07fe1b817929b55697c2234856d2a2801123e3df9cc6bb17
3
+ metadata.gz: 4bc2cb76ebcc08a5872159aab17439db694043d2960112005e0c1c2683160a65
4
+ data.tar.gz: b5893c356807e51d272e292c117b699ac8041fbd67bcc47d8ec3987af32ace81
5
5
  SHA512:
6
- metadata.gz: e0742f71c11f859b4b104b0e3f2bf8896b736397fbfe54eef20b72439a582448af160649c205507b66aa87c506d216745f794b73fe8aa77c3e7f576289b68c88
7
- data.tar.gz: c413bc34bdfb8edd54377bb7fb9210ccfa81992b98acb131499582785aec7b7764c1463eacfdb6768bfe3d70d1bde213045b08182a6ed60b8f44b2ee18ef9974
6
+ metadata.gz: '08a326e534bf3a6281d4a03afd9eae3832d7d7f2468235b21678f5fc55121a09988c79386c5d5c7b270552695aa827c122ff4b615a5c4d7f2053da07ac664766'
7
+ data.tar.gz: de4301d201ca02df60639190c1bb721ee34ea76b42f2de2d307990e76e26bf003ddf01cd6b68851783f8dcee3469fac4ec1b2e42e4986168c089efe4fd4de5e3
@@ -124,11 +124,9 @@ module Plist
124
124
 
125
125
  def data_tag(data, level)
126
126
  # note that apple plists are wrapped at a different length then
127
- # what ruby's base64 wraps by default.
128
- # I used #encode64 instead of #b64encode (which allows a length arg)
129
- # because b64encode is b0rked and ignores the length arg.
127
+ # what ruby's pack wraps by default.
130
128
  tag('data', nil, level) do
131
- Base64.encode64(data)
129
+ [data].pack("m") # equivalent to Base64.encode64(data)
132
130
  .gsub(/\s+/, '')
133
131
  .scan(/.{1,68}/o)
134
132
  .collect { |line| indent(line, level) }
data/lib/plist/parser.rb CHANGED
@@ -246,10 +246,10 @@ module Plist
246
246
  end
247
247
  end
248
248
 
249
- require 'base64'
250
249
  class PData < PTag
251
250
  def to_ruby
252
- data = Base64.decode64(text.gsub(/\s+/, '')) unless text.nil?
251
+ # unpack("m")[0] is equivalent to Base64.decode64
252
+ data = text.gsub(/\s+/, '').unpack("m")[0] unless text.nil?
253
253
  begin
254
254
  return Marshal.load(data) if options[:marshal]
255
255
  rescue Exception
data/lib/plist/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Plist
4
- VERSION = '3.7.0'.freeze
4
+ VERSION = '3.7.1'.freeze
5
5
  end
data/lib/plist.rb CHANGED
@@ -9,7 +9,6 @@
9
9
  # Distributed under the MIT License
10
10
  #
11
11
 
12
- require 'base64'
13
12
  require 'cgi'
14
13
  require 'stringio'
15
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plist
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Bleything
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-21 00:00:00.000000000 Z
12
+ date: 2023-12-26 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Plist is a library to manipulate Property List files, also known as plists.
15
15
  It can parse plist files into native Ruby data structures as well as generating
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  requirements: []
46
- rubygems_version: 3.4.7
46
+ rubygems_version: 3.5.3
47
47
  signing_key:
48
48
  specification_version: 4
49
49
  summary: All-purpose Property List manipulation library