Class: Pod::Command::Bin::Spec::Lint
- Inherits:
-
Pod::Command::Bin::Spec
- Object
- Pod::Command
- Pod::Command::Bin
- Pod::Command::Bin::Spec
- Pod::Command::Bin::Spec::Lint
- Defined in:
- lib/cocoapods-pahealth-bin/command/bin/spec/lint.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Lint
constructor
A new instance of Lint.
- #run ⇒ Object
Methods inherited from Pod::Command::Bin
Methods included from CBin::SpecFilesHelper
#binary_spec, #binary_spec_files, #binary_template_spec, #binary_template_spec_file, #binary_template_spec_files, #clear_binary_spec_file_if_needed, #code_spec, #code_spec_files, #create_binary_spec_file, #find_spec_file, #spec_files
Methods included from CBin::SourcesHelper
#code_source, #sources_manager, #sources_option, #valid_sources
Constructor Details
#initialize(argv) ⇒ Lint
Returns a new instance of Lint.
24 25 26 27 28 29 30 31 32 |
# File 'lib/cocoapods-pahealth-bin/command/bin/spec/lint.rb', line 24 def initialize(argv) @podspec = argv.shift_argument @release = argv.flag?('release',false ) @sources = argv.option('sources') @allow_prerelease = argv.flag?('allow-prerelease') super @additional_args = argv.remainder! end |
Class Method Details
.options ⇒ Object
18 19 20 21 22 |
# File 'lib/cocoapods-pahealth-bin/command/bin/spec/lint.rb', line 18 def self. [ ['--release', '在 release 环境下进行 lint'] ].concat(Pod::Command::Spec::Lint.).concat(super).uniq end |
Instance Method Details
#run ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/cocoapods-pahealth-bin/command/bin/spec/lint.rb', line 34 def run Podfile.execute_with_bin_plugin do Podfile.execute_with_allow_prerelease(@allow_prerelease) do argvs = [ "--sources=#{sources_option(@release, @sources)+','+Pod::TrunkSource::TRUNK_REPO_URL}", *@additional_args ] argvs << spec_file if spec_file lint = Pod::Command::Spec::Lint.new(CLAide::ARGV.new(argvs)) lint.validate! lint.run end end end |