alloy/cocoapods — Issue #47: Install directly from repo
Author: alloy
Created: 2011-11-07 09:57:26+00:00
State: open

With most of the pressing issues done and fleshed out, it’s time to start supporting more loose ways to get libraries in an app project. We should make it so that it's very easy for users to contribute specs to the community, because although it’s nice for the user that they can fetch any library, it doesn’t help the community if these stay hidden in application repos.

So I propose the following:

* If the repo contains a podspec (and it is assumed to be up-to-date for the repo's state), then the user only has to specify the remote. CocoaPods will then fetch this repo first and use the podspec from the checkout to resolve dependencies.

```Ruby
dependency "Kiwi", :git => https://github.com/allending/Kiwi.git, :commit => "93088050d8d68797578ab99c41c07492e4ebd51c"
```

* If the repo does not contain a podspec, or it's not working with the current state of the repo, then the user can specify the proper attributes by, in essence, building a podspec. This means we don’t have to invent yet another API and it’s easy to move out working posdpecs to the specs repo.

```Ruby
dependency do |s|
# `s` is an instance of Pod::Specification
s.name = "JSONKit"
s.version = '1.5'
s.source = { :git => https://github.com/johnezang/JSONKit.git, :commit => "c2ef69242b60dc2475328b08131f9aa3078a51fb" }
s.source_files = "JSONKit.*"

end
```