howsigned 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/howsigned +45 -0
  3. metadata +73 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 77c7733a7eb4f7222794acebc50b9e614aef192c
4
+ data.tar.gz: dfd7b37353b73ad63700fca6cdc78d8a16b7485b
5
+ SHA512:
6
+ metadata.gz: 1f981d6e4808f0ab3eb7f4656efd9f60ac6d3c18bd836380534f181f318be36bc82ea747d33f781cf352006e6104ef034aeeb4dbc75bbb386b2cd917304ccf47
7
+ data.tar.gz: ecfedbb1c4a046598d671dec865251e66834ab2e5a86f7d7f14d62ad1be597c8766faa00a37e832451a6574036c07a981f65673174bcabb62eb2718da6f7ec4b
data/bin/howsigned ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Heavily inspired by Shenzhen's `ipa info`
4
+ # https://github.com/nomad/shenzhen/blob/master/lib/shenzhen/commands/info.rb
5
+
6
+ require 'plist'
7
+ require 'zip'
8
+ require 'zip/filesystem'
9
+
10
+ def validate_ipa!
11
+ files = Dir['*.ipa']
12
+ @file ||= case files.length
13
+ when 0 then nil
14
+ when 1 then files.first
15
+ else
16
+ @file = choose "Select an .ipa", *files
17
+ end
18
+ end
19
+
20
+ validate_ipa! unless @file = ARGV[0]
21
+ puts "Missing or unspecified .ipa file" and abort unless @file and ::File.exist?(@file)
22
+
23
+ tempdir = ::File.new(Dir.mktmpdir)
24
+ unzip = `unzip "#{@file}" -d "#{tempdir.path}"`
25
+
26
+ entitlements_hash = Hash.new
27
+
28
+ # .app
29
+ Dir.glob("#{tempdir.path}/**/*.app") do |file|
30
+ entitlements = `codesign -d --entitlements :- "#{file}" 2>&1`
31
+ plist_entitlements = Plist::parse_xml(entitlements)
32
+ application_identifier = plist_entitlements["application-identifier"]
33
+ entitlements_hash[application_identifier] = plist_entitlements
34
+ end
35
+
36
+ # .appex
37
+ Dir.glob("#{tempdir.path}/**/*.appex") do |file|
38
+ entitlements = `codesign -d --entitlements :- "#{file}" 2>&1`
39
+ plist_entitlements = Plist::parse_xml(entitlements)
40
+ application_identifier = plist_entitlements["application-identifier"]
41
+ entitlements_hash[application_identifier] = plist_entitlements
42
+ end
43
+
44
+ puts entitlements_hash.to_plist
45
+
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: howsigned
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Michael MacDougall
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: plist
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubyzip
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
41
+ description: Utility to see how the contained binaries within an .ipa are signed
42
+ email: mmacdougall@etsy.com
43
+ executables:
44
+ - howsigned
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - bin/howsigned
49
+ homepage: http://www.etsy.com
50
+ licenses:
51
+ - MIT
52
+ metadata: {}
53
+ post_install_message:
54
+ rdoc_options: []
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubyforge_project:
69
+ rubygems_version: 2.6.2
70
+ signing_key:
71
+ specification_version: 4
72
+ summary: Howsigned?
73
+ test_files: []