lib/headdesk/report.rb in headdesk-0.15.1 vs lib/headdesk/report.rb in headdesk-0.16.0
- old
+ new
@@ -90,6 +90,35 @@
apk: true,
android_sdk: @android_sdk
)
end
end
+
+ #
+ # Report from an IPA analysis
+ #
+ class IPAReport < Report
+ def initialize(ipa)
+ super()
+ @bundle_id = ipa.info_plist['CFBundleIdentifier']
+ @url_schemes = ipa.url_schemes
+ @entitlements = ipa.entitlements
+ end
+
+ def describe
+ <<~DESCRIPTION
+ URL Schemes: #{@url_schemes}
+ Team Id: #{@entitlements.team_identifier}
+ Associated Domains: #{@entitlements.associated_domains}
+ DESCRIPTION
+ end
+
+ def to_h
+ super.merge(
+ ipa: true,
+ url_schemes: @url_schemes,
+ team_id: @entitlements.team_identifier,
+ associated_domains: @entitlements.associated_domains
+ )
+ end
+ end
end