Commit 7a838899 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4701 from CocoaPods/seg-spec-remove-docset-url

Update for removal of docset_url attribute
parents b611ae93 507625d1
...@@ -32,6 +32,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -32,6 +32,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
removed in favor of the equivalent `default_subspecs` method. removed in favor of the equivalent `default_subspecs` method.
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
* The `docset_url` Specification attribute has been removed.
[Samuel Giddins](https://github.com/segiddins)
[Core#284](https://github.com/CocoaPods/Core/issues/284)
##### Highlighted Enhancements That Need Testing ##### Highlighted Enhancements That Need Testing
* The Podfile DSL has been cleaned up, with the removal of confusing options and * The Podfile DSL has been cleaned up, with the removal of confusing options and
......
...@@ -7,7 +7,7 @@ GIT ...@@ -7,7 +7,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Core.git remote: https://github.com/CocoaPods/Core.git
revision: ca0a5d504357e48da31b274430a966d64fd62078 revision: 0c386062a4b72b3eb487129f6c8854bcd8ea1b68
branch: master branch: master
specs: specs:
cocoapods-core (0.39.0) cocoapods-core (0.39.0)
......
...@@ -257,7 +257,6 @@ module Pod ...@@ -257,7 +257,6 @@ module Pod
validate_screenshots(spec) validate_screenshots(spec)
validate_social_media_url(spec) validate_social_media_url(spec)
validate_documentation_url(spec) validate_documentation_url(spec)
validate_docset_url(spec)
valid = spec.available_platforms.send(fail_fast ? :all? : :each) do |platform| valid = spec.available_platforms.send(fail_fast ? :all? : :each) do |platform|
UI.message "\n\n#{spec} - Analyzing on #{platform} platform.".green.reversed UI.message "\n\n#{spec} - Analyzing on #{platform} platform.".green.reversed
...@@ -342,12 +341,6 @@ module Pod ...@@ -342,12 +341,6 @@ module Pod
validate_url(spec.documentation_url) if spec.documentation_url validate_url(spec.documentation_url) if spec.documentation_url
end 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 def setup_validation_environment
validation_dir.rmtree if validation_dir.exist? validation_dir.rmtree if validation_dir.exist?
validation_dir.mkpath validation_dir.mkpath
......
...@@ -49,6 +49,7 @@ require 'pretty_bacon' ...@@ -49,6 +49,7 @@ require 'pretty_bacon'
require 'colored' require 'colored'
require 'clintegracon' require 'clintegracon'
require 'cocoapods-core/lockfile'
require 'cocoapods-core/yaml_helper' require 'cocoapods-core/yaml_helper'
require 'fileutils' require 'fileutils'
require 'integration/file_tree' require 'integration/file_tree'
...@@ -84,15 +85,9 @@ CLIntegracon.configure do |c| ...@@ -84,15 +85,9 @@ CLIntegracon.configure do |c|
c.transform_produced %r{(^|/)(Podfile|Manifest).lock$} do |path| c.transform_produced %r{(^|/)(Podfile|Manifest).lock$} do |path|
# Remove CocoaPods version & Podfile checksum # Remove CocoaPods version & Podfile checksum
yaml = YAML.load(path.read) yaml = YAML.load(path.read)
yaml.delete('COCOAPODS') deleted_keys = ['COCOAPODS', 'PODFILE CHECKSUM']
yaml.delete('PODFILE CHECKSUM') deleted_keys.each { |key| yaml.delete(key) }
keys_hint = [ keys_hint = Pod::Lockfile::HASH_KEY_ORDER - deleted_keys
'PODS',
'DEPENDENCIES',
'EXTERNAL SOURCES',
'CHECKOUT OPTIONS',
'SPEC CHECKSUMS',
]
path.open('w') { |f| f << Pod::YAMLHelper.convert_hash(yaml, keys_hint, "\n\n") } path.open('w') { |f| f << Pod::YAMLHelper.convert_hash(yaml, keys_hint, "\n\n") }
end end
......
...@@ -265,25 +265,6 @@ module Pod ...@@ -265,25 +265,6 @@ module Pod
@validator.results.map(&:to_s).first.should.match /The URL (.*) is not reachable/ @validator.results.map(&:to_s).first.should.match /The URL (.*) is not reachable/
end end
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 end
it 'respects the no clean option' do it 'respects the no clean option' do
......
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