Class: Pod::Command::Push
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Executable
executable, execute_command
parse, report_error, run
#config
Constructor Details
#initialize(argv) ⇒ Push
Returns a new instance of Push.
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/cocoapods/command/push.rb', line 23
def initialize(argv)
@allow_warnings = argv.flag?('allow-warnings')
@local_only = argv.flag?('local-only')
@repo = argv.shift_argument
if @repo.nil?
@repo = "master"
elsif @repo.end_with? ".podspec"
@podspec = @repo
@repo = "master"
else
@podspec = argv.shift_argument
end
super
end
|
Class Method Details
.options ⇒ Object
18
19
20
21
|
# File 'lib/cocoapods/command/push.rb', line 18
def self.options
[ ["--allow-warnings", "Allows pushing even if there are warnings"],
["--local-only", "Does not perform the step of pushing REPO to its remote"] ].concat(super)
end
|
Instance Method Details
#run ⇒ Object
43
44
45
46
47
48
49
|
# File 'lib/cocoapods/command/push.rb', line 43
def run
validate_podspec_files
check_repo_status
update_repo
add_specs_to_repo
push_repo unless @local_only
end
|
#validate! ⇒ Object
38
39
40
41
|
# File 'lib/cocoapods/command/push.rb', line 38
def validate!
super
help! "A spec-repo name is required." unless @repo
end
|