Commit eeeef232 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'master' of github.com:CocoaPods/CocoaPods

* 'master' of github.com:CocoaPods/CocoaPods:
  Fix integration spec, which was trying to assign a source to subspecs.
  Fix spec that was using a newer version of lib than expected.
  Update spec repo fixture to latest 0.6 and fix CP version checking.
  Fix a RubyGems specific version spec failure.
  Update SSToolkit fixture submodule.
  Fix version number.

Conflicts:
	lib/cocoapods/command/repo.rb
parents 8a1a5d30 d230d8e3
Encoding.default_external = Encoding::UTF_8 if RUBY_VERSION > '1.8.7'
module Pod
VERSION = '0.6.0rc1'
VERSION = '0.6.0.rc1'
class Informative < StandardError
def message
......
......@@ -89,9 +89,12 @@ module Pod
else
add_master_repo_command.run
end
hook = config.repos_dir + 'master/.git/hooks/pre-commit'
# Mainly so the specs run with submodule repos
if (dir + '.git/hooks').exist?
hook = dir + '.git/hooks/pre-commit'
hook.open('w') { |f| f << "#!/bin/sh\nrake lint" }
`chmod +x '#{hook}'`
end
puts "Setup completed (#{push? ? "push" : "read-only"} access)" unless config.silent
end
end
......
......@@ -270,6 +270,10 @@ module Pod
@parent ? @parent.top_level_parent : self
end
def subspec?
!@parent.nil?
end
def subspec(name, &block)
subspec = Specification.new(self, name, &block)
@subspecs << subspec
......
......@@ -7,7 +7,12 @@ describe "Pod::Command::Setup" do
extend SpecHelper::TemporaryRepos
it "runs with correct parameters" do
begin
before, config.repos_dir = config.repos_dir, fixture('spec-repos')
lambda { run_command('setup') }.should.not.raise
ensure
config.repos_dir = before
end
end
it "complains for wrong parameters" do
......
......@@ -9,6 +9,7 @@ module SpecHelper
def specs_by_target
@specs_by_target ||= super.tap do |hash|
hash.values.flatten.each do |spec|
next if spec.subspec?
source = spec.source
source[:git] = SpecHelper.fixture("integration/#{spec.name}").to_s
spec.source = source
......@@ -167,8 +168,16 @@ else
installer = SpecHelper::Installer.new(podfile)
installer.install!
# TODO might be nicer looking to not show the dependencies of the top level spec for each subspec (Reachability).
YAML.load(installer.lock_file.read).should == {
"PODS" => [{ "ASIHTTPRequest (1.8.1)" => ["Reachability"] }, "JSONKit (1.4)", "Reachability (3.0.0)"],
"PODS" => [{ "ASIHTTPRequest (1.8.1)" => ["ASIHTTPRequest/ASIWebPageRequest (= 1.8.1)",
"ASIHTTPRequest/CloudFiles (= 1.8.1)",
"ASIHTTPRequest/S3 (= 1.8.1)",
"Reachability"]},
{ "ASIHTTPRequest/ASIWebPageRequest (1.8.1)" => ["Reachability"] },
{ "ASIHTTPRequest/CloudFiles (1.8.1)" => ["Reachability"] },
{ "ASIHTTPRequest/S3 (1.8.1)" => ["Reachability"] },
"JSONKit (1.4)", "Reachability (3.0.0)"],
"DEPENDENCIES" => ["ASIHTTPRequest", "JSONKit (= 1.4)"]
}
......@@ -193,7 +202,7 @@ else
self.platform :ios
xcodeproj 'dummy'
dependency 'JSONKit', '1.4'
dependency 'SSToolkit'
dependency 'SSToolkit', '1.0.0'
end
installer = SpecHelper::Installer.new(podfile)
installer.install!
......
......@@ -250,7 +250,7 @@ describe "A Pod::Specification, hierarchy" do
it "uses the spec version for the dependencies" do
@spec.dependencies.
select { |d| d.name =~ /MainSpec/ }.
all? { |d| d.requirement === Pod::Version.new('0.999') }.
all? { |d| d.requirement.to_s == '= 0.999' }.
should.be.true
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