plist 3.7.0 → 3.7.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
  SHA256:
3
- metadata.gz: 34fa4fc386b9fb97f4e27a345e5a15fcae275edba2e2c92285ef04ffb25ee2b8
4
- data.tar.gz: a0a416e828b8232c07fe1b817929b55697c2234856d2a2801123e3df9cc6bb17
3
+ metadata.gz: 0c9c26542d33281fc5129c6e41bf1fb50cd6bc18e976026a99a0f5e1227422a4
4
+ data.tar.gz: 0a3e7e39de4ee273ab12239e9577166bace1e7fd244b479253d215b373da324a
5
5
  SHA512:
6
- metadata.gz: e0742f71c11f859b4b104b0e3f2bf8896b736397fbfe54eef20b72439a582448af160649c205507b66aa87c506d216745f794b73fe8aa77c3e7f576289b68c88
7
- data.tar.gz: c413bc34bdfb8edd54377bb7fb9210ccfa81992b98acb131499582785aec7b7764c1463eacfdb6768bfe3d70d1bde213045b08182a6ed60b8f44b2ee18ef9974
6
+ metadata.gz: f8604a0b065dbcbdaeaac185f69846f9b98bfa001988bf0e33cda3376a1f8ad07956df89a53bbda3e894f71003293d572fa6a9224f0bd4371a50fa075363b152
7
+ data.tar.gz: 61e3bee01b0f7afc798743e7b064244a76d8de4a18621e9dde388fe066bcc9428171e76f4b91ea28925f9c988d7cefbcb8d708547701c45a92274ed71949bf4e
@@ -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
@@ -56,7 +56,7 @@ module Plist
56
56
 
57
57
  def text(contents)
58
58
  if @open.last
59
- @open.last.text ||= ''
59
+ @open.last.text ||= ''.dup
60
60
  @open.last.text.concat(contents)
61
61
  end
62
62
  end
@@ -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.2'.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,20 +1,18 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Bleything
8
8
  - Patrick May
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2023-02-21 00:00:00.000000000 Z
11
+ date: 2024-12-26 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Plist is a library to manipulate Property List files, also known as plists.
15
14
  It can parse plist files into native Ruby data structures as well as generating
16
15
  new plist files from your Ruby objects.
17
- email:
18
16
  executables: []
19
17
  extensions: []
20
18
  extra_rdoc_files: []
@@ -28,7 +26,6 @@ homepage: https://github.com/patsplat/plist
28
26
  licenses:
29
27
  - MIT
30
28
  metadata: {}
31
- post_install_message:
32
29
  rdoc_options: []
33
30
  require_paths:
34
31
  - lib
@@ -43,8 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
40
  - !ruby/object:Gem::Version
44
41
  version: '0'
45
42
  requirements: []
46
- rubygems_version: 3.4.7
47
- signing_key:
43
+ rubygems_version: 3.6.2
48
44
  specification_version: 4
49
45
  summary: All-purpose Property List manipulation library
50
46
  test_files: []