Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Actually build the generated static library project in the integratio…

…n spec.
  • Loading branch information...
commit 1139295fc2194b8a8d53aafe3e11a2ba5c4e2743 1 parent d3f9746
@alloy alloy authored
View
2  lib/cocoa_pods/command/install.rb
@@ -41,7 +41,7 @@ def run
raise Help, "No Podfile found in current working directory."
end
end
- Installer.new(spec, config.project_pods_root).install!
+ Installer.new(spec).install!
end
end
end
View
10 lib/cocoa_pods/installer.rb
@@ -4,8 +4,8 @@ module Pod
class Installer
include Config::Mixin
- def initialize(top_level_specification, pods_root)
- @top_level_specification, @pods_root = top_level_specification, pods_root
+ def initialize(top_level_specification)
+ @top_level_specification = top_level_specification
end
def dependent_specification_sets
@@ -55,7 +55,7 @@ def generate_project
pattern = pattern + '*.{h,m,mm,c,cpp}' if pattern.directory?
Dir.glob(pattern.to_s).each do |file|
file = Pathname.new(file)
- file = file.relative_path_from(@pods_root)
+ file = file.relative_path_from(config.project_pods_root)
xproj.add_source_file(file)
end
end
@@ -64,8 +64,8 @@ def generate_project
end
def write_files!
- xproj.create_in(@pods_root)
- xcconfig.create_in(@pods_root)
+ xproj.create_in(config.project_pods_root)
+ xcconfig.create_in(config.project_pods_root)
end
end
end
View
17 spec/integration_spec.rb
@@ -31,7 +31,7 @@ def set.specification
Pod::Source.reset!
Pod::Spec::Set.reset!
fixture('spec-repos/master') # ensure the archive is unpacked
- config.project_pods_root = SpecHelper.temporary_directory + 'Pods'
+ config.project_pods_root = temporary_directory + 'Pods'
config.repos_dir = fixture('spec-repos')
end
@@ -40,27 +40,36 @@ def set.specification
config.repos_dir = SpecHelper.tmp_repos_path
end
- it "should work" do
+ it "should activate required pods and create a working static library xcode project" do
spec = Pod::Spec.new do
dependency 'ASIWebPageRequest', '< 1.8.1'
dependency 'JSONKit', '>= 1.0'
dependency 'SSZipArchive', '< 2'
end
- installer = SpecHelper::Installer.new(spec, SpecHelper.temporary_directory)
+
+ installer = SpecHelper::Installer.new(spec)
installer.install!
+
(config.project_pods_root + 'Reachability.podspec').should.exist
(config.project_pods_root + 'ASIHTTPRequest.podspec').should.exist
(config.project_pods_root + 'ASIWebPageRequest.podspec').should.exist
(config.project_pods_root + 'JSONKit.podspec').should.exist
(config.project_pods_root + 'SSZipArchive.podspec').should.exist
+
+ puts "\n[!] Compiling static library..."
+ Dir.chdir(config.project_pods_root) do
+ system("xcodebuild > /dev/null 2>&1").should == true
+ end
end
it "does not activate pods that are only part of other pods" do
spec = Pod::Spec.new do
dependency 'Reachability'
end
- installer = SpecHelper::Installer.new(spec, SpecHelper.temporary_directory)
+
+ installer = SpecHelper::Installer.new(spec)
installer.install!
+
(config.project_pods_root + 'Reachability.podspec').should.exist
(config.project_pods_root + 'ASIHTTPRequest.podspec').should.not.exist
end
Please sign in to comment.
Something went wrong with that request. Please try again.