Class: Pindo::Command::Pgyer::Apptest
- Inherits:
-
Pindo::Command::Pgyer
- Object
- CLAide::Command
- Pindo::Command
- Pindo::Command::Pgyer
- Pindo::Command::Pgyer::Apptest
- Defined in:
- lib/pindo/command/pgyer/apptest.rb
Constant Summary
Constants inherited from Pindo::Command
DEFAULT_OPTIONS, DEFAULT_ROOT_OPTIONS
Instance Attribute Summary
Attributes inherited from Pindo::Command
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Apptest
constructor
A new instance of Apptest.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pindo::Command
Methods included from Funlog::Mixin
Methods included from Pindoconfig::Mixin
Methods included from Githelper
#add_branch, #add_tag, #add_tag_with_check, #clone_clang_repo, #clone_devclang_repo, #clone_pindo_common_config_repo, #clone_pindo_env_config_repo, #clong_buildconfig_repo, #get_repo_base_name, #getcode_to_dir, #git_addpush_repo, #git_latest_commit_id, #git_root_directory, #is_git_directory?, #local_branch_exists?, #local_tag_exists?, #prepare_gitenv, #process_need_add_files, #remote_branch_exists?, #remote_tag_exists?, #remove_branch, #remove_tag
Methods included from Executable
capture_command, #executable, execute_command, which, which!
Constructor Details
#initialize(argv) ⇒ Apptest
Returns a new instance of Apptest.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/pindo/command/pgyer/apptest.rb', line 46 def initialize(argv) @args_login_flag = argv.flag?('login', false) @args_list_flag = argv.flag?('list', false) @args_send_flag = argv.flag?('send', false) @args_proj_name = argv.option('proj') super(argv) @additional_args = argv.remainder! end |
Class Method Details
.options ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/pindo/command/pgyer/apptest.rb', line 37 def self. [ ['--login', '强制再次登录pgyer网站'], ['--proj', '指定哪个项目(忽略大小写空格等等字符),用法:pindo pgyer apptest --proj=prancksoundv4'], ['--list', '列出上传记录并选择,用法:pindo pgyer apptest --list'], ['--send', '上传到之后是否发送测试信息,用法:pindo pgyer apptest --send'], ].concat(super) end |
Instance Method Details
#run ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/pindo/command/pgyer/apptest.rb', line 62 def run PgyerHelper.share_instace.setForeLogin(beforeLogin:@args_login_flag) app_info_obj = PgyerHelper.share_instace.prepare_upload(working_directory:Dir.pwd, proj_name:@args_proj_name) if app_info_obj.nil? raise Informative, "#{proj_name} 错误, 请输入正确的App代号名称, pgyer网站没有该App" end if !app_info_obj.nil? version_item_obj = PgyerHelper.share_instace.get_versioon_history_item(app_info_obj:app_info_obj, list_select_flat:@args_list_flag) if version_item_obj.nil? raise Informative, "没有找到上传记录" end msg_data = PgyerHelper.share_instace.make_msg_data(app_info_obj:app_info_obj, app_version_info_obj:version_item_obj) PgyerHelper.share_instace.print_app_version_info(msg_data:msg_data) if @args_send_flag # PgyerHelper.share_instace.send_apptest_msg(appId:app_info_obj["appId"], appVersionId:version_item_obj["id"], chatEnv: "PreFavTest", receiveType:"chat") # PgyerHelper.share_instace.send_apptest_msg(appId:app_info_obj["appId"], appVersionId:version_item_obj["id"], chatEnv: "DevTest", receiveType:"chat") else PgyerHelper.share_instace.send_apptest_msg(appId:app_info_obj["appId"], appVersionId:version_item_obj["id"], chatEnv: "", receiveType:"self") end end end |
#validate! ⇒ Object
57 58 59 60 |
# File 'lib/pindo/command/pgyer/apptest.rb', line 57 def validate! super end |