Commit ba041adf authored by Mark Schall's avatar Mark Schall

cleaning up robocop warnings

parent 7b09cfc5
...@@ -39,10 +39,7 @@ module Pod ...@@ -39,10 +39,7 @@ module Pod
@allow_warnings = argv.flag?('allow-warnings') @allow_warnings = argv.flag?('allow-warnings')
@local_only = argv.flag?('local-only') @local_only = argv.flag?('local-only')
@repo = argv.shift_argument @repo = argv.shift_argument
begin @source = source_for_repo
@source = config.sources_manager.source_with_name_or_url(@repo) unless @repo.nil?
rescue
end
@source_urls = argv.option('sources', config.sources_manager.all.map(&:url).join(',')).split(',') @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).join(',')).split(',')
@podspec = argv.shift_argument @podspec = argv.shift_argument
@use_frameworks = !argv.flag?('use-libraries') @use_frameworks = !argv.flag?('use-libraries')
...@@ -246,6 +243,18 @@ module Pod ...@@ -246,6 +243,18 @@ module Pod
podspec_files.count podspec_files.count
end end
# Returns source for @repo
#
# @note If URL is invalid or repo doesn't exist, validate! will throw the error
#
# @return [Source]
#
def source_for_repo
config.sources_manager.source_with_name_or_url(@repo) unless @repo.nil?
rescue
nil
end
#---------------------------------------------------------------------# #---------------------------------------------------------------------#
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment