Class: Pod::Command::Repo::Push

Inherits:
Pod::Command::Repo show all
Defined in:
lib/cocoapods-bb-bin/native/push.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Push

Returns a new instance of Push.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/cocoapods-bb-bin/native/push.rb', line 10

def initialize(argv)
  @allow_warnings = argv.flag?('allow-warnings')
  @local_only = argv.flag?('local-only')
  @repo = argv.shift_argument
  @source = source_for_repo
  @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).append(Pod::TrunkSource::TRUNK_REPO_URL).uniq.join(',')).split(',')
  @update_sources = argv.flag?('update-sources')
  @podspec = argv.shift_argument
  @use_frameworks = !argv.flag?('use-libraries')
  @use_modular_headers = argv.flag?('use-modular-headers', false)
  @use_static_frameworks = argv.flag?('use-static-frameworks')
  @private = argv.flag?('private', true)
  @message = argv.option('commit-message')
  @commit_message = argv.flag?('commit-message', false)
  @use_json = argv.flag?('use-json')
  @swift_version = argv.option('swift-version', nil)
  @skip_import_validation = argv.flag?('skip-import-validation', false)
  @skip_tests = argv.flag?('skip-tests', false)
  @allow_overwrite = argv.flag?('overwrite', true)
  super
end

Instance Method Details

#validate_podspec_filesObject

Performs a full lint against the podspecs.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/cocoapods-bb-bin/native/push.rb', line 34

def validate_podspec_files
  UI.puts "\nValidating #{'spec'.pluralize(count)}".yellow
  podspec_files.each do |podspec|
    validator = Validator.new(podspec, @source_urls)
    validator.allow_warnings = @allow_warnings
    validator.use_frameworks = @use_frameworks
    validator.use_static_frameworks = @use_static_frameworks
    validator.use_modular_headers = @use_modular_headers
    validator.ignore_public_only_results = @private
    validator.swift_version = @swift_version
    validator.skip_import_validation = @skip_import_validation
    validator.skip_tests = @skip_tests
    begin
      validator.validate
    rescue => e
      raise Informative, "The `#{podspec}` specification does not validate." \
                         "\n\n#{e.message}"
    end
    raise Informative, "The `#{podspec}` specification does not validate." unless validator.validated?
  end
end