Commit 40dcc859 authored by Eloy Duran's avatar Eloy Duran

Remove references about installing from a podspec from `pod install', we only…

Remove references about installing from a podspec from `pod install', we only install from a Podfile. Closes #78.
parent 537ba242
...@@ -2,15 +2,18 @@ module Pod ...@@ -2,15 +2,18 @@ module Pod
class Command class Command
class Install < Command class Install < Command
def self.banner def self.banner
%{Installing dependencies of a pod spec: %{Installing dependencies of a project:
$ pod install [NAME] [PROJECT] $ pod install [PROJECT]
Downloads all dependencies of the specified podspec file `NAME', Downloads all dependencies defined in `Podfile' and creates an Xcode
creates an Xcode Pods library project in `./Pods', and sets up `PROJECT' Pods library project in `./Pods'.
to use the specified pods (if `PROJECT' is given). In case `NAME' is
omitted it defaults to either `Podfile' or `*.podspec' in the current In case `PROJECT' is given, it configures it to use the specified Pods
working directory. and generates a workspace with the Pods project and `PROJECT'. (It is
important that once you have run this you open the workspace instead of
`PROJECT'.) You usually specify `PROJECT' only the first time that you
run `pod install'.
} }
end end
...@@ -21,27 +24,15 @@ module Pod ...@@ -21,27 +24,15 @@ module Pod
def initialize(argv) def initialize(argv)
config.clean = !argv.option('--no-clean') config.clean = !argv.option('--no-clean')
projpath = argv.shift_argument @projpath = argv.shift_argument
projpath =~ /\.xcodeproj\/?$/ ? @projpath = projpath : podspec = projpath
@podspec = Pathname.new(podspec) if podspec
@projpath ||= argv.shift_argument
super unless argv.empty? super unless argv.empty?
end end
def run def run
spec = nil unless podfile = config.rootspec
if @podspec raise Informative, "No `Podfile' found in the current working directory."
if @podspec.exist?
spec = Specification.from_file(@podspec)
else
raise Informative, "The specified podspec `#{@podspec}' doesn't exist."
end
else
unless spec = config.rootspec
raise Informative, "No `Podfile' or `.podspec' file found in the current working directory."
end
end end
installer = Installer.new(spec) installer = Installer.new(podfile)
installer.install! installer.install!
installer.configure_project(@projpath) if @projpath installer.configure_project(@projpath) if @projpath
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