Commit c2366c33 authored by Fabio Pelosin's avatar Fabio Pelosin

Bundle: update cocoapods-core

Required and update to the fixture spec repos
parent ca5ce2d5
...@@ -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: ca32661ceb9cd65cfe17eb6e05a420945c2ba9cc revision: 3b72760a736bd9733a42912882009d9e85838a6d
branch: master branch: master
specs: specs:
cocoapods-core (0.33.1) cocoapods-core (0.33.1)
...@@ -18,7 +18,7 @@ GIT ...@@ -18,7 +18,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Xcodeproj.git remote: https://github.com/CocoaPods/Xcodeproj.git
revision: abb0c05a9cf16a24487b9c131c06f379bffe6375 revision: f835e6e1145812ac04ac4b658321c727c2967547
branch: master branch: master
specs: specs:
xcodeproj (0.18.0) xcodeproj (0.18.0)
......
Subproject commit ee564d9da8878957e7b77cac987d9601eb04eca5 Subproject commit b0f4e85738f1f911e32e2914b39e9acdce7c7ed9
...@@ -18,11 +18,4 @@ Pod::Spec.new do |s| ...@@ -18,11 +18,4 @@ Pod::Spec.new do |s|
:file => 'LICENSE', :file => 'LICENSE',
:text => 'Permission is hereby granted ...' :text => 'Permission is hereby granted ...'
} }
s.documentation = {
:html => 'http://banana-corp.local/banana-lib/docs.html',
:appledoc => [
'--project-company', 'Banana Corp',
'--company-id', 'com.banana',
]
}
end end
...@@ -136,7 +136,7 @@ module Pod ...@@ -136,7 +136,7 @@ module Pod
end end
it "lints the current working directory" do it "lints the current working directory" do
Dir.chdir(fixture('spec-repos') + 'master/JSONKit/1.4/') do Dir.chdir(fixture('spec-repos') + 'master/Specs/JSONKit/1.4/') do
cmd = command('spec', 'lint', '--quick', '--only-errors') cmd = command('spec', 'lint', '--quick', '--only-errors')
cmd.run cmd.run
UI.output.should.include "passed validation" UI.output.should.include "passed validation"
...@@ -145,7 +145,7 @@ module Pod ...@@ -145,7 +145,7 @@ module Pod
# @todo VCR is required in CocoaPods only for this test. # @todo VCR is required in CocoaPods only for this test.
xit "lints a remote podspec" do xit "lints a remote podspec" do
Dir.chdir(fixture('spec-repos') + 'master/JSONKit/1.4/') do Dir.chdir(fixture('spec-repos') + 'master/Specs/JSONKit/1.4/') do
cmd = command('spec', 'lint', '--quick', '--only-errors', '--silent', 'https://github.com/CocoaPods/Specs/raw/master/A2DynamicDelegate/2.0.1/A2DynamicDelegate.podspec') cmd = command('spec', 'lint', '--quick', '--only-errors', '--silent', 'https://github.com/CocoaPods/Specs/raw/master/A2DynamicDelegate/2.0.1/A2DynamicDelegate.podspec')
# VCR.use_cassette('linter', :record => :new_episodes) { } # VCR.use_cassette('linter', :record => :new_episodes) { }
lambda { cmd.run }.should.not.raise lambda { cmd.run }.should.not.raise
...@@ -153,9 +153,9 @@ module Pod ...@@ -153,9 +153,9 @@ module Pod
end end
before do before do
text = (fixture('spec-repos') + 'master/JSONKit/1.4/JSONKit.podspec').read text = (fixture('spec-repos') + 'master/Specs/JSONKit/1.4/JSONKit.podspec.json').read
text.gsub!(/.*license.*/, "s.license = { :file => 'some_file'}") text.gsub!(/.*license.*/, '"license": { "file": "LICENSE" },')
file = temporary_directory + 'JSONKit.podspec' file = temporary_directory + 'JSONKit.podspec.json'
File.open(file, 'w') {|f| f.write(text) } File.open(file, 'w') {|f| f.write(text) }
@spec_path = file.to_s @spec_path = file.to_s
end end
...@@ -208,13 +208,13 @@ module Pod ...@@ -208,13 +208,13 @@ module Pod
it "cats the given podspec" do it "cats the given podspec" do
lambda { command('spec', 'cat', 'AFNetworking').run }.should.not.raise lambda { command('spec', 'cat', 'AFNetworking').run }.should.not.raise
UI.output.should.include fixture('spec-repos/master/AFNetworking/1.2.0/AFNetworking.podspec').read UI.output.should.include fixture('spec-repos/master/Specs/AFNetworking/2.3.1/AFNetworking.podspec.json').read
end end
it "cats the first podspec from all podspecs" do it "cats the first podspec from all podspecs" do
UI.next_input = "1\n" UI.next_input = "1\n"
run_command('spec', 'cat', '--show-all', 'AFNetworking') run_command('spec', 'cat', '--show-all', 'AFNetworking')
UI.output.should.include fixture('spec-repos/master/AFNetworking/1.2.0/AFNetworking.podspec').read UI.output.should.include fixture('spec-repos/master/Specs/AFNetworking/2.3.1/AFNetworking.podspec.json').read
end end
end end
...@@ -236,7 +236,7 @@ module Pod ...@@ -236,7 +236,7 @@ module Pod
ENV['EDITOR'] = 'podspeceditor' ENV['EDITOR'] = 'podspeceditor'
lambda { command('spec', 'edit', 'AFNetworking').run }.should.raise SystemExit lambda { command('spec', 'edit', 'AFNetworking').run }.should.raise SystemExit
UI.output.should.include '/bin/sh -i -c podspeceditor "$@" --' UI.output.should.include '/bin/sh -i -c podspeceditor "$@" --'
UI.output.should.include 'fixtures/spec-repos/master/AFNetworking' UI.output.should.include 'fixtures/spec-repos/master/Specs/AFNetworking'
end end
it "will raise if no editor is found" do it "will raise if no editor is found" do
...@@ -250,7 +250,7 @@ module Pod ...@@ -250,7 +250,7 @@ module Pod
UI.next_input = "1\n" UI.next_input = "1\n"
lambda { command('spec', 'edit', '--show-all', 'AFNetworking').run }.should.raise SystemExit lambda { command('spec', 'edit', '--show-all', 'AFNetworking').run }.should.raise SystemExit
UI.output.should.include '/bin/sh -i -c podspeceditor "$@" --' UI.output.should.include '/bin/sh -i -c podspeceditor "$@" --'
UI.output.should.include 'fixtures/spec-repos/master/AFNetworking/1.2.0/AFNetworking.podspec' UI.output.should.include 'fixtures/spec-repos/master/Specs/AFNetworking/1.2.0/AFNetworking.podspec'
end end
it "complains if it can't find a spec file for the given spec" do it "complains if it can't find a spec file for the given spec" do
...@@ -274,7 +274,7 @@ module Pod ...@@ -274,7 +274,7 @@ module Pod
it "returns the path of the specification with the given name" do it "returns the path of the specification with the given name" do
path = @sut.send(:get_path_of_spec, 'AFNetworking') path = @sut.send(:get_path_of_spec, 'AFNetworking')
path.should == fixture('spec-repos') + 'master/AFNetworking/1.2.0/AFNetworking.podspec' path.should == fixture('spec-repos') + 'master/Specs/AFNetworking/2.3.1/AFNetworking.podspec.json'
end end
end end
......
...@@ -10,7 +10,7 @@ module Pod ...@@ -10,7 +10,7 @@ module Pod
it "reports the location of the AFNetworking spec" do it "reports the location of the AFNetworking spec" do
lambda { Pod::Command.run(['spec', 'which', 'AFNetworking']) }.should.not.raise lambda { Pod::Command.run(['spec', 'which', 'AFNetworking']) }.should.not.raise
UI.output.should.include 'spec/fixtures/spec-repos/master/AFNetworking' UI.output.should.include 'spec/fixtures/spec-repos/master/Specs/AFNetworking'
end end
it "doesn't let you run as root" do it "doesn't let you run as root" do
......
...@@ -17,8 +17,8 @@ module Pod ...@@ -17,8 +17,8 @@ module Pod
output.should.include? '1.1' output.should.include? '1.1'
output.should.include? '[master repo]' output.should.include? '[master repo]'
output.should.include? 'A fast & simple, yet powerful & flexible logging framework for Mac and iOS.' output.should.include? 'A fast & simple, yet powerful & flexible logging framework for Mac and iOS.'
output.should.include? 'https://github.com/robbiehanson/CocoaLumberjack' output.should.include? 'https://github.com/CocoaLumberjack/CocoaLumberjack'
output.should.include? 'https://github.com/robbiehanson/CocoaLumberjack.git' output.should.include? 'https://github.com/CocoaLumberjack/CocoaLumberjack.git'
end end
it "presents the stats of a specification set" do it "presents the stats of a specification set" do
...@@ -36,7 +36,7 @@ module Pod ...@@ -36,7 +36,7 @@ module Pod
end end
it "should print at least one subspec" do it "should print at least one subspec" do
@set = SourcesManager.search_by_name('RestKit').first @set = SourcesManager.search(Dependency.new('RestKit'))
UI.pod(@set) UI.pod(@set)
output = UI.output output = UI.output
output.should.include? "RestKit/Network" output.should.include? "RestKit/Network"
......
...@@ -32,7 +32,7 @@ module Pod ...@@ -32,7 +32,7 @@ module Pod
specs.map(&:to_s).should == [ specs.map(&:to_s).should == [
"A2DynamicDelegate (2.0.2)", "A2DynamicDelegate (2.0.2)",
"BlocksKit (1.5.2)", "BlocksKit (1.5.2)",
"libffi (3.0.11)" "libffi (3.0.13)"
] ]
end end
...@@ -43,7 +43,7 @@ module Pod ...@@ -43,7 +43,7 @@ module Pod
specs.map(&:to_s).should == [ specs.map(&:to_s).should == [
"A2DynamicDelegate (2.0.2)", "A2DynamicDelegate (2.0.2)",
"BlocksKit (1.5.2)", "BlocksKit (1.5.2)",
"libffi (3.0.11)" "libffi (3.0.13)"
] ]
end end
...@@ -107,7 +107,7 @@ module Pod ...@@ -107,7 +107,7 @@ module Pod
it "includes all the subspecs of a specification node" do it "includes all the subspecs of a specification node" do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios platform :ios, '7.0'
pod 'RestKit', '0.10.3' pod 'RestKit', '0.10.3'
end end
resolver = Resolver.new(config.sandbox, @podfile) resolver = Resolver.new(config.sandbox, @podfile)
...@@ -121,11 +121,14 @@ module Pod ...@@ -121,11 +121,14 @@ module Pod
RestKit RestKit
RestKit/JSON RestKit/JSON
RestKit/Network RestKit/Network
RestKit/ObjectMapping
RestKit/ObjectMapping/Core RestKit/ObjectMapping/Core
RestKit/ObjectMapping/CoreData RestKit/ObjectMapping/CoreData
RestKit/ObjectMapping/JSON RestKit/ObjectMapping/JSON
RestKit/ObjectMapping/XML
RestKit/UI RestKit/UI
SOCKit SOCKit
XMLReader
cocoa-oauth cocoa-oauth
} }
end end
......
...@@ -22,7 +22,7 @@ module Pod ...@@ -22,7 +22,7 @@ module Pod
# @return [void] # @return [void]
# #
def write_podspec(text, name = 'JSONKit.podspec') def write_podspec(text, name = 'JSONKit.podspec.json')
file = temporary_directory + name file = temporary_directory + name
File.open(file, 'w') {|f| f.write(text) } File.open(file, 'w') {|f| f.write(text) }
file file
...@@ -31,7 +31,7 @@ module Pod ...@@ -31,7 +31,7 @@ module Pod
# @return [String] # @return [String]
# #
def stub_podspec(pattern = nil, replacement = nil) def stub_podspec(pattern = nil, replacement = nil)
spec = (fixture('spec-repos') + 'master/JSONKit/1.4/JSONKit.podspec').read spec = (fixture('spec-repos') + 'master/Specs/JSONKit/1.4/JSONKit.podspec.json').read
spec.gsub!(/https:\/\/github\.com\/johnezang\/JSONKit\.git/, fixture('integration/JSONKit').to_s) spec.gsub!(/https:\/\/github\.com\/johnezang\/JSONKit\.git/, fixture('integration/JSONKit').to_s)
spec.gsub!(pattern, replacement) if pattern && replacement spec.gsub!(pattern, replacement) if pattern && replacement
spec spec
...@@ -40,7 +40,7 @@ module Pod ...@@ -40,7 +40,7 @@ module Pod
# @return [Pathname] # @return [Pathname]
# #
def podspec_path def podspec_path
fixture('spec-repos') + 'master/JSONKit/1.4/JSONKit.podspec' fixture('spec-repos') + 'master/Specs/JSONKit/1.4/JSONKit.podspec.json'
end end
#-------------------------------------------------------------------------# #-------------------------------------------------------------------------#
...@@ -55,7 +55,7 @@ module Pod ...@@ -55,7 +55,7 @@ module Pod
end end
it "lints the podspec during validation" do it "lints the podspec during validation" do
podspec = stub_podspec(/s.name.*$/, 's.name = "TEST"') podspec = stub_podspec(/.*name.*/, '"name": "TEST",')
file = write_podspec(podspec) file = write_podspec(podspec)
sut = Validator.new(file) sut = Validator.new(file)
sut.quick = true sut.quick = true
...@@ -73,7 +73,7 @@ module Pod ...@@ -73,7 +73,7 @@ module Pod
end end
it "respects the only errors option" do it "respects the only errors option" do
podspec = stub_podspec(/s.summary.*/, "s.summary = 'A short description of'") podspec = stub_podspec(/.*summary.*/, '"summary": "A short description of",')
file = write_podspec(podspec) file = write_podspec(podspec)
sut = Validator.new(file) sut = Validator.new(file)
sut.quick = true sut.quick = true
...@@ -297,7 +297,7 @@ module Pod ...@@ -297,7 +297,7 @@ module Pod
end end
it "checks for file patterns" do it "checks for file patterns" do
file = write_podspec(stub_podspec(/s\.source_files = 'JSONKit\.\*'/, "s.source_files = 'wrong_paht.*'")) file = write_podspec(stub_podspec(/.*source_files.*/, '"source_files": "wrong_paht.*",'))
sut = Validator.new(file) sut = Validator.new(file)
sut.stubs(:build_pod) sut.stubs(:build_pod)
sut.stubs(:validate_url) sut.stubs(:validate_url)
...@@ -307,10 +307,10 @@ module Pod ...@@ -307,10 +307,10 @@ module Pod
end end
it "validates a podspec with dependencies" do it "validates a podspec with dependencies" do
podspec = stub_podspec(/s.name.*$/, 's.name = "ZKit"') podspec = stub_podspec(/.*name.*/, '"name": "ZKit",')
podspec.gsub!(/s.requires_arc/, "s.dependency 'SBJson', '~> 3.2'\n s.requires_arc") podspec.gsub!(/.*requires_arc.*/, '"dependencies": { "SBJson": [ "~> 3.2" ] }, "requires_arc": false')
podspec.gsub!(/s.license.*$/, 's.license = "Public Domain"') podspec.gsub!(/.*license.*$/, '"license": "Public Domain",')
file = write_podspec(podspec, "ZKit.podspec") file = write_podspec(podspec, "ZKit.podspec.json")
spec = Specification.from_file(file) spec = Specification.from_file(file)
sut = Validator.new(spec) sut = Validator.new(spec)
......
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