class Pod::Command::Bin::Repo::Push

Public Class Methods

new(argv) click to toggle source
Calls superclass method Pod::Command::Bin::new
# File lib/cocoapods-pahealth-bin/command/bin/repo/push.rb, line 24
def initialize(argv)
  @podspec = argv.shift_argument
  @sources = argv.option('sources')
  @code_dependencies = argv.flag?('code-dependencies')
  super

  @additional_args = argv.remainder!
end
options() click to toggle source
Calls superclass method
# File lib/cocoapods-pahealth-bin/command/bin/repo/push.rb, line 18
def self.options
  [

  ].concat(Pod::Command::Repo::Push.options).concat(super).uniq
end

Public Instance Methods

run() click to toggle source
# File lib/cocoapods-pahealth-bin/command/bin/repo/push.rb, line 33
def run
  argvs = [
      repo,
      "--sources=#{sources_option(@code_dependencies, @sources)+','+Pod::TrunkSource::TRUNK_REPO_URL}",
      *@additional_args
  ]

  argvs << spec_file if spec_file

  push = Pod::Command::Repo::Push.new(CLAide::ARGV.new(argvs))
  push.validate!
  push.run
end

Private Instance Methods

repo() click to toggle source
# File lib/cocoapods-pahealth-bin/command/bin/repo/push.rb, line 64
def repo
  code_source.name
end
spec_file() click to toggle source
# File lib/cocoapods-pahealth-bin/command/bin/repo/push.rb, line 49
def spec_file
  @spec_file ||= begin
                   if @podspec
                     find_spec_file(@podspec)
                   else
                     if code_spec_files.empty?
                       raise Informative, '当前目录下没有找到可用源码 podspec.'
                     end

                     spec_file = code_spec_files.first
                     spec_file
                   end
                 end
end