Skip to content

Commit

Permalink
Update for removal of docset_url attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Dec 30, 2015
1 parent b611ae9 commit 4638615
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GIT

GIT
remote: https://github.com/CocoaPods/Core.git
revision: ca0a5d504357e48da31b274430a966d64fd62078
revision: 0c386062a4b72b3eb487129f6c8854bcd8ea1b68
branch: master
specs:
cocoapods-core (0.39.0)
Expand Down
7 changes: 0 additions & 7 deletions lib/cocoapods/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ def perform_extensive_analysis(spec)
validate_screenshots(spec)
validate_social_media_url(spec)
validate_documentation_url(spec)
validate_docset_url(spec)

valid = spec.available_platforms.send(fail_fast ? :all? : :each) do |platform|
UI.message "\n\n#{spec} - Analyzing on #{platform} platform.".green.reversed
Expand Down Expand Up @@ -342,12 +341,6 @@ def validate_documentation_url(spec)
validate_url(spec.documentation_url) if spec.documentation_url
end

# Performs validations related to the `docset_url` attribute.
#
def validate_docset_url(spec)
validate_url(spec.docset_url) if spec.docset_url
end

def setup_validation_environment
validation_dir.rmtree if validation_dir.exist?
validation_dir.mkpath
Expand Down
19 changes: 0 additions & 19 deletions spec/unit/validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,25 +265,6 @@ def podspec_path
@validator.results.map(&:to_s).first.should.match /The URL (.*) is not reachable/
end
end

describe 'docset URL validation' do
before do
@validator.stubs(:validate_homepage)
end

it 'checks if the docset URL is valid' do
Specification.any_instance.stubs(:docset_url).returns('http://banana-corp.local/')
WebMock::API.stub_request(:head, /banana-corp.local/).to_return(:status => 200)
@validator.validate
@validator.results.should.be.empty?
end

it "should fail validation if it wasn't able to validate the URL" do
Specification.any_instance.stubs(:docset_url).returns('http://banana-corp.local/not-found')
@validator.validate
@validator.results.map(&:to_s).first.should.match /The URL (.*) is not reachable/
end
end
end

it 'respects the no clean option' do
Expand Down

0 comments on commit 4638615

Please sign in to comment.