Commit 053972cd authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4935 from CocoaPods/neonichu-fix-repo-lint

Fix repo lint for path arguments
parents 1d093a5f 000b7238
...@@ -38,6 +38,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -38,6 +38,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[seaders](https://github.com/seaders) [seaders](https://github.com/seaders)
[#4913](https://github.com/CocoaPods/CocoaPods/issues/4913) [#4913](https://github.com/CocoaPods/CocoaPods/issues/4913)
* Fix `repo lint` for path arguments.
[Boris Bügling](https://github.com/neonichu)
[#4883](https://github.com/CocoaPods/CocoaPods/issues/4883)
## 1.0.0.beta.3 (2016-02-03) ## 1.0.0.beta.3 (2016-02-03)
##### Breaking ##### Breaking
......
...@@ -34,17 +34,21 @@ module Pod ...@@ -34,17 +34,21 @@ module Pod
# @todo add UI.print and enable print statements again. # @todo add UI.print and enable print statements again.
# #
def run def run
if @name sources = if @name
sources = SourcesManager.sources([@name]) if File.exist?(@name)
else [Pathname.new(@name)]
sources = SourcesManager.aggregate.sources else
end SourcesManager.sources([@name]).map(&:repo)
end
else
SourcesManager.aggregate.sources.map(&:repo)
end
sources.each do |source| sources.each do |source|
SourcesManager.check_version_information(source.repo) SourcesManager.check_version_information(source)
UI.puts "\nLinting spec repo `#{source.repo.basename}`\n".yellow UI.puts "\nLinting spec repo `#{source.basename}`\n".yellow
validator = Source::HealthReporter.new(source.repo) validator = Source::HealthReporter.new(source)
validator.pre_check do |_name, _version| validator.pre_check do |_name, _version|
UI.print '.' UI.print '.'
end end
......
...@@ -17,6 +17,12 @@ module Pod ...@@ -17,6 +17,12 @@ module Pod
lambda { run_command('repo', 'lint', repo) }.should.not.raise lambda { run_command('repo', 'lint', repo) }.should.not.raise
end end
it 'lints a repository by relative path' do
repo = fixture('spec-repos/test_repo')
repo = repo.relative_path_from(SpecHelper.temporary_directory).to_s
lambda { run_command('repo', 'lint', repo) }.should.not.raise
end
it 'raises when there is no repository with given name' do it 'raises when there is no repository with given name' do
repo = fixture('spec-repos/not_existing_repo').to_s repo = fixture('spec-repos/not_existing_repo').to_s
e = lambda { run_command('repo', 'lint', repo) }.should.raise Informative e = lambda { run_command('repo', 'lint', repo) }.should.raise Informative
......
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