Class: FIR::AppUploader

Inherits:
Object show all
Includes:
ApiTools::DefaultRestModule, Config
Defined in:
lib/fir/util/app_uploader.rb

Direct Known Subclasses

AliUploader, QiniuUploader

Constant Summary

Constants included from Config

Config::API_YML_PATH, Config::APP_FILE_TYPE, Config::APP_INFO_PATH, Config::CONFIG_PATH, Config::XCODE_WRAPPER_PATH

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Config

#bughd_api, #config, #current_token, #fir_api, #reload_config, #write_app_info, #write_config

Constructor Details

#initialize(app_info, user_info, uploading_info, options) ⇒ AppUploader

Returns a new instance of AppUploader.



9
10
11
12
13
14
# File 'lib/fir/util/app_uploader.rb', line 9

def initialize(app_info, , uploading_info, options)
  @app_info = app_info
  @user_info = 
  @uploading_info = uploading_info
  @options = options
end

Instance Attribute Details

#app_infoObject

Returns the value of attribute app_info.



8
9
10
# File 'lib/fir/util/app_uploader.rb', line 8

def app_info
  @app_info
end

#optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/fir/util/app_uploader.rb', line 8

def options
  @options
end

#uploading_infoObject

Returns the value of attribute uploading_info.



8
9
10
# File 'lib/fir/util/app_uploader.rb', line 8

def uploading_info
  @uploading_info
end

#user_infoObject

Returns the value of attribute user_info.



8
9
10
# File 'lib/fir/util/app_uploader.rb', line 8

def 
  @user_info
end

Instance Method Details

#uploadObject



16
17
18
19
20
21
22
23
# File 'lib/fir/util/app_uploader.rb', line 16

def upload
  upload_icon
  binary_callback_info = upload_binary
  raise binary_callback_info if binary_callback_info.is_a? StandardError

  # 将 binary 的callback信息返回
  binary_callback_info
end