Class: IpaParser
- Inherits:
-
Object
- Object
- IpaParser
- Defined in:
- lib/ipa_utilities/ipa_parser.rb
Instance Attribute Summary collapse
-
#info_plist ⇒ Object
readonly
Returns the value of attribute info_plist.
-
#ipa_path ⇒ Object
readonly
Returns the value of attribute ipa_path.
-
#provision_profile ⇒ Object
readonly
Returns the value of attribute provision_profile.
Instance Method Summary collapse
- #app_path ⇒ Object
- #bundle_name ⇒ Object
- #cleanup ⇒ Object
- #info_plist_path ⇒ Object
-
#initialize(ipa_path) ⇒ IpaParser
constructor
A new instance of IpaParser.
- #zip(path) ⇒ Object
Constructor Details
#initialize(ipa_path) ⇒ IpaParser
Returns a new instance of IpaParser.
11 12 13 14 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 11 def initialize(ipa_path) @ipa_path = ipa_path unzip_and_parse end |
Instance Attribute Details
#info_plist ⇒ Object (readonly)
Returns the value of attribute info_plist.
9 10 11 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 9 def info_plist @info_plist end |
#ipa_path ⇒ Object (readonly)
Returns the value of attribute ipa_path.
9 10 11 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 9 def ipa_path @ipa_path end |
#provision_profile ⇒ Object (readonly)
Returns the value of attribute provision_profile.
9 10 11 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 9 def provision_profile @provision_profile end |
Instance Method Details
#app_path ⇒ Object
20 21 22 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 20 def app_path Dir["Payload/*.app"].last end |
#bundle_name ⇒ Object
16 17 18 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 16 def bundle_name File.basename(app_path) end |
#cleanup ⇒ Object
35 36 37 38 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 35 def cleanup system "rm -rf #{zip_out_path}" say "Deleting directory #{zip_out_path}" if $verbose end |
#info_plist_path ⇒ Object
24 25 26 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 24 def info_plist_path app_path + "/Info.plist" end |
#zip(path) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/ipa_utilities/ipa_parser.rb', line 28 def zip(path) say "Zipping " + @ipa_path.green if $verbose system "zip -qr \"_new.ipa\" Payload" system "cp _new.ipa #{path}" say "Resigned ipa saved at " + path.green end |