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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c5d4e0a084175a1ea51a31be189467896203dc9
4
- data.tar.gz: 796a23fede74ba3c0bcf9bd767963c3d7630123e
3
+ metadata.gz: 7bce77e9c22f73ce28f3c0c0d5c5aefcb145a72e
4
+ data.tar.gz: 12b4eb9338b870ea79ab5816c3b7cdbc7d4e2e92
5
5
  SHA512:
6
- metadata.gz: 8dab686da733d62fc7dc66215b8f2df1d101fd12d73b82e385b4795ca83bdc1979e388cab4e94e2a6e88f7b73abe997cf0f7fdf0159c0e3522ace940a8f197b8
7
- data.tar.gz: 1781700ecee2756062c5d45f6308e1bd7d90fc2f48172b9b03a52c6bf7b00b32b51e59fcb5442ce457cafb1859d624b836a83610a58fdcbd8d9f20d860858614
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:
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module PropertyList
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.0.4'.freeze
3
3
  end
@@ -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
- puts 'gsd'
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: property-list
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luikore