Commit 37f4f9bd authored by Eloy Duran's avatar Eloy Duran

Make pod install take an optional podspec file to install the dependencies of…

Make pod install take an optional podspec file to install the dependencies of instead of looking for ./Podfile
parent 260b4daf
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
*.swo *.swo
.DS_Store .DS_Store
tmp tmp
examples/Pods
Pod::Spec.new do
name 'TestLib'
version '1.0'
summary 'A spec of a lib, to test that it too can be used to develop the lib.'
source :git => 'http://example.local/test.git', :tag => 'v1.0'
dependency 'SSZipArchive', '> 0.1'
dependency 'JSONKit'
dependency 'ASIHTTPRequest', '1.8'
end
module Pod module Pod
class Command class Command
class Install < Command class Install < Command
def initialize(*argv)
if podspec = argv.shift
@podspec = Pathname.new(podspec)
end
super
end
def run def run
spec = nil
if @podspec
if @podspec.exist?
spec = Specification.from_podspec(@podspec)
else
raise "The specified podspec `#{@podspec}' doesn't exist."
end
else
if config.project_podfile.exist? if config.project_podfile.exist?
spec = Specification.from_podfile(config.project_podfile) spec = Specification.from_podfile(config.project_podfile)
Installer.new(spec, config.project_pods_root).install!
else else
$stderr.puts "No Podfile found in current working directory." raise "No Podfile found in current working directory."
end end
end end
Installer.new(spec, config.project_pods_root).install!
end
end end
end end
end 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