property-list 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/property-list.rb +10 -0
- data/lib/property-list/version.rb +1 -1
- data/property-list.gemspec +1 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bce77e9c22f73ce28f3c0c0d5c5aefcb145a72e
|
4
|
+
data.tar.gz: 12b4eb9338b870ea79ab5816c3b7cdbc7d4e2e92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 981fc2b37ecf09bc269ea169ec3ffa117b08310f18db84176581bd7948b01ffe44e32c7cdfd9e9e369bfa63140bee8c347c501ba661b8a2b49143ccf7aad18e7
|
7
|
+
data.tar.gz: 3eed9c100b6f029336ff076e64383d5a2cd09a062b40b7f8b27b9404c743a0ef9a53e8e98a1d73668a3ae8cf6f17c3147d3a54de3eceaf7da820ca5f920538c5
|
data/README.md
CHANGED
@@ -46,6 +46,11 @@ Generate a plist file data
|
|
46
46
|
- `sort_keys:` sort dict keys, default is `true`.
|
47
47
|
- `gnu_extension:` whether allow GNUStep extensions for ASCII plist to support serializing more types, default is `true`.
|
48
48
|
|
49
|
+
Also a helper method to help getting plist from SMIME envelope:
|
50
|
+
|
51
|
+
data = File.binread 'foo.mobileprovision'
|
52
|
+
plist = PropertyList.load PropertyList.data_from_smime data
|
53
|
+
|
49
54
|
## Data type mapping
|
50
55
|
|
51
56
|
When loading, plist data types will be mapped to native Ruby types:
|
data/lib/property-list.rb
CHANGED
@@ -36,6 +36,16 @@ module PropertyList
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
# Util method for extracting data from smime/mobileprovision envelope. Example:
|
40
|
+
#
|
41
|
+
# data = File.binread 'foo.mobileprovision'
|
42
|
+
# plist = PropertyList.load PropertyList.data_from_smime data
|
43
|
+
def self.data_from_smime data
|
44
|
+
require 'openssl'
|
45
|
+
asn1 = OpenSSL::ASN1.decode data
|
46
|
+
asn1.value[1].value[0].value[2].value[1].value.first.value
|
47
|
+
end
|
48
|
+
|
39
49
|
class SyntaxError < RuntimeError
|
40
50
|
end
|
41
51
|
|
data/property-list.gemspec
CHANGED
@@ -8,13 +8,10 @@ class Array
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
-
puts 'wa?'
|
12
11
|
Gem::Specification.new do |spec|
|
13
12
|
spec.name = "property-list"
|
14
13
|
spec.version = PropertyList::VERSION
|
15
|
-
|
16
|
-
spec.author = "Luikore"
|
17
|
-
puts 'hmm'
|
14
|
+
spec.authors = ["Luikore"]
|
18
15
|
spec.email = 'no@email'
|
19
16
|
|
20
17
|
spec.summary = "Property list (plist) library with all formats support"
|