Class: Shenzhen::Plugins::ITunesConnect::Client
- Inherits:
-
Object
- Object
- Shenzhen::Plugins::ITunesConnect::Client
- Defined in:
- lib/shenzhen/plugins/itunesconnect.rb
Instance Attribute Summary collapse
-
#ipa ⇒ Object
readonly
Returns the value of attribute ipa.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#sdk ⇒ Object
readonly
Returns the value of attribute sdk.
Instance Method Summary collapse
- #ensure_itunesconnect! ⇒ Object
-
#initialize(ipa, sdk, params = []) ⇒ Client
constructor
A new instance of Client.
- #upload_build! ⇒ Object
Constructor Details
#initialize(ipa, sdk, params = []) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 |
# File 'lib/shenzhen/plugins/itunesconnect.rb', line 10 def initialize(ipa, sdk, params = []) @ipa = ipa @sdk = sdk @params = params end |
Instance Attribute Details
#ipa ⇒ Object (readonly)
Returns the value of attribute ipa.
8 9 10 |
# File 'lib/shenzhen/plugins/itunesconnect.rb', line 8 def ipa @ipa end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
8 9 10 |
# File 'lib/shenzhen/plugins/itunesconnect.rb', line 8 def params @params end |
#sdk ⇒ Object (readonly)
Returns the value of attribute sdk.
8 9 10 |
# File 'lib/shenzhen/plugins/itunesconnect.rb', line 8 def sdk @sdk end |
Instance Method Details
#ensure_itunesconnect! ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/shenzhen/plugins/itunesconnect.rb', line 16 def ensure_itunesconnect! case xcrun(:Validation, [:online]) when /(error)|(fail)/i say_error "An error occurred checking the status of the app in iTunes Connect.\nRun with --verbose for more info." and abort when /validation was skipped/i say_error "Validation was skipped. Double check your credentials and ensure the app in the 'Waiting for Upload' state." and abort end end |
#upload_build! ⇒ Object
25 26 27 28 29 30 |
# File 'lib/shenzhen/plugins/itunesconnect.rb', line 25 def upload_build! case xcrun(:Validation, [:online, :upload]) when /(error)|(fail)/i say_error "An error occurred when trying to upload the build to iTunesConnect.\nRun with --verbose for more info." and abort end end |