Class: Pindo::Command

Inherits:
CLAide::Command
  • Object
show all
Includes:
Funlog::Mixin, Githelper, Pindoconfig::Mixin
Defined in:
lib/pindo/command.rb,
lib/pindo/command/dev.rb,
lib/pindo/command/env.rb,
lib/pindo/command/ipa.rb,
lib/pindo/command/lib.rb,
lib/pindo/command/repo.rb,
lib/pindo/command/pgyer.rb,
lib/pindo/command/setup.rb,
lib/pindo/command/utils.rb,
lib/pindo/command/deploy.rb,
lib/pindo/command/dev/pub.rb,
lib/pindo/command/upgrade.rb,
lib/pindo/command/appstore.rb,
lib/pindo/command/lib/lint.rb,
lib/pindo/command/lib/push.rb,
lib/pindo/command/dev/build.rb,
lib/pindo/command/dev/debug.rb,
lib/pindo/command/deploy/iap.rb,
lib/pindo/command/deploy/pem.rb,
lib/pindo/command/deploy/tag.rb,
lib/pindo/command/ipa/import.rb,
lib/pindo/command/ipa/output.rb,
lib/pindo/command/lib/update.rb,
lib/pindo/command/repo/clone.rb,
lib/pindo/command/repo/login.rb,
lib/pindo/command/utils/boss.rb,
lib/pindo/command/utils/icon.rb,
lib/pindo/command/deploy/cert.rb,
lib/pindo/command/pgyer/login.rb,
lib/pindo/command/repo/create.rb,
lib/pindo/command/repo/search.rb,
lib/pindo/command/utils/tgate.rb,
lib/pindo/command/appstore/iap.rb,
lib/pindo/command/deploy/build.rb,
lib/pindo/command/deploy/check.rb,
lib/pindo/command/dev/applovin.rb,
lib/pindo/command/env/quarkenv.rb,
lib/pindo/command/env/swarkenv.rb,
lib/pindo/command/env/workhard.rb,
lib/pindo/command/pgyer/resign.rb,
lib/pindo/command/pgyer/upload.rb,
lib/pindo/command/utils/device.rb,
lib/pindo/command/deploy/fabric.rb,
lib/pindo/command/deploy/itcapp.rb,
lib/pindo/command/deploy/resign.rb,
lib/pindo/command/dev/autobuild.rb,
lib/pindo/command/dev/pgyercert.rb,
lib/pindo/command/lib/forcepush.rb,
lib/pindo/command/pgyer/apptest.rb,
lib/pindo/command/pgyer/comment.rb,
lib/pindo/options/deployoptions.rb,
lib/pindo/command/deploy/itcinfo.rb,
lib/pindo/command/deploy/quswark.rb,
lib/pindo/command/dev/autoresign.rb,
lib/pindo/command/ipa/autoresign.rb,
lib/pindo/command/pgyer/download.rb,
lib/pindo/command/utils/xcassets.rb,
lib/pindo/command/appstore/itcapp.rb,
lib/pindo/command/appstore/upload.rb,
lib/pindo/command/deploy/bundleid.rb,
lib/pindo/command/deploy/quswauth.rb,
lib/pindo/command/dev/confusecode.rb,
lib/pindo/command/dev/confuseproj.rb,
lib/pindo/command/dev/createbuild.rb,
lib/pindo/command/env/dreamstudio.rb,
lib/pindo/command/utils/clearcert.rb,
lib/pindo/command/utils/renewcert.rb,
lib/pindo/command/utils/renewproj.rb,
lib/pindo/command/deploy/reportbug.rb,
lib/pindo/command/deploy/uploadipa.rb,
lib/pindo/command/appstore/metadata.rb,
lib/pindo/command/deploy/configproj.rb,
lib/pindo/command/deploy/getitcinfo.rb,
lib/pindo/command/deploy/initconfig.rb,
lib/pindo/command/deploy/pullconfig.rb,
lib/pindo/command/deploy/pushconfig.rb,
lib/pindo/command/deploy/confusecode.rb,
lib/pindo/command/deploy/confuseproj.rb,
lib/pindo/command/deploy/updateconfig.rb,
lib/pindo/command/appstore/screenshots.rb

Direct Known Subclasses

Appstore, Deploy, Dev, Env, Ipa, Lib, Pgyer, Repo, Setup, Upgrade, Utils

Defined Under Namespace

Modules: DeployOptions Classes: Appstore, Deploy, Dev, Env, Ipa, Lib, Pgyer, Repo, Setup, Upgrade, Utils

Constant Summary collapse

DEFAULT_ROOT_OPTIONS =
[
  ['--version', '查看pindo版本'],
]
DEFAULT_OPTIONS =
[
  ['--help',    '查看命令行用法'],
]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Funlog::Mixin

#pindo_log_instance

Methods included from Pindoconfig::Mixin

#pindo_single_config

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, #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) ⇒ Command

Returns a new instance of Command.



94
95
96
97
# File 'lib/pindo/command.rb', line 94

def initialize(argv)
    super
    @args_help_flag = argv.flag?('help', false)
end

Instance Attribute Details

#args_help_flagObject Also known as: args_help_flag?

Returns the value of attribute args_help_flag.



52
53
54
# File 'lib/pindo/command.rb', line 52

def args_help_flag
  @args_help_flag
end

Class Method Details

.optionsObject

].concat(super) end



76
77
78
79
80
81
82
# File 'lib/pindo/command.rb', line 76

def self.options
  if root_command?
    DEFAULT_ROOT_OPTIONS + DEFAULT_OPTIONS
  else
    DEFAULT_OPTIONS
  end
end

.run(argv) ⇒ Object



89
90
91
92
# File 'lib/pindo/command.rb', line 89

def self.run(argv)

    super(argv)
end

Instance Method Details

#validate!Object



84
85
86
87
# File 'lib/pindo/command.rb', line 84

def validate!
    super
    help! if args_help_flag?
end