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
if config.project_podfile.exist? spec = nil
spec = Specification.from_podfile(config.project_podfile) if @podspec
Installer.new(spec, config.project_pods_root).install! if @podspec.exist?
spec = Specification.from_podspec(@podspec)
else
raise "The specified podspec `#{@podspec}' doesn't exist."
end
else else
$stderr.puts "No Podfile found in current working directory." if config.project_podfile.exist?
spec = Specification.from_podfile(config.project_podfile)
else
raise "No Podfile found in current working directory."
end
end end
Installer.new(spec, config.project_pods_root).install!
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