Class: Shenzhen::Plugins::Crashlytics::Client
- Inherits:
-
Object
- Object
- Shenzhen::Plugins::Crashlytics::Client
- Defined in:
- lib/shenzhen/plugins/crashlytics.rb
Instance Method Summary collapse
-
#initialize(crashlytics_path, api_token, build_secret) ⇒ Client
constructor
A new instance of Client.
- #upload_build(ipa, options) ⇒ Object
Constructor Details
#initialize(crashlytics_path, api_token, build_secret) ⇒ Client
Returns a new instance of Client.
7 8 9 10 11 12 |
# File 'lib/shenzhen/plugins/crashlytics.rb', line 7 def initialize(crashlytics_path, api_token, build_secret) @api_token, @build_secret = api_token, build_secret @crashlytics_path = Pathname.new("#{crashlytics_path}/submit").cleanpath.to_s say_error "Path to Crashlytics.framework/submit is invalid" and abort unless File.exists?(@crashlytics_path) end |
Instance Method Details
#upload_build(ipa, options) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/shenzhen/plugins/crashlytics.rb', line 14 def upload_build(ipa, ) command = "#{@crashlytics_path} #{@api_token} #{@build_secret} -ipaPath '#{[:file]}'" command += " -notesPath '#{[:notes]}'" if [:notes] command += " -emails #{[:emails]}" if [:emails] command += " -groupAliases #{[:groups]}" if [:groups] command += " -notifications #{[:notifications] ? 'YES' : 'NO'}" system command end |