Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 182 lines (125 sloc) 6.973 kB
8bebec6 @keithpitt Update Readme.markdown
authored
1 # Vendor – an iOS library management system [![Build Status](https://secure.travis-ci.org/keithpitt/vendor.png)](http://travis-ci.org/keithpitt/vendor)
c88546f @keithpitt Include build status from Travis
authored
2
eeccbbb @keithpitt More updates to the README
authored
3 __Note: This software is currently in super alpha. I've been testing it
7d5b664 @keithpitt Updated README
authored
4 with my own projects, and its seemed to work so far. If you have any
5 problems, feel free to create an issue. If your having a problem with
6 installing the vendor libraries into XCode, could you also provide me
7 with your .xcodeproj file, you don't need to give me the source files
8 just the project file is all I need.__
9
f3be459 @keithpitt Edited Readme.markdown via GitHub
authored
10 Vendor makes the process of using and managing libraries in iOS easy. Vendor is modeled after [Bundler](https://github.com/carlhuda/bundler). Vendor streamlines the installation and update process for dependent libraries. It also tracks versions and manages dependencies between libraries.
57f0d64 @keithpitt Added Readme and Licence
authored
11
12 ## Installation
13
f3be459 @keithpitt Edited Readme.markdown via GitHub
authored
14 If you have [RVM](http://beginrescueend.com/rvm/install/) installed, simply run:
15
16 ```bash
17 $ gem install vendor
18 ```
19
c64eef9 @keithpitt Edited Readme.markdown via GitHub
authored
20 Otherwise, you'll need to:
21
22 ```bash
88d0064 @keithpitt Edited Readme.markdown via GitHub
authored
23 $ sudo gem install vendor
c64eef9 @keithpitt Edited Readme.markdown via GitHub
authored
24 ```
57f0d64 @keithpitt Added Readme and Licence
authored
25
0e98dfc @keithpitt Work on the README
authored
26 ## Installing Libraries
57f0d64 @keithpitt Added Readme and Licence
authored
27
23d1a5e @keithpitt Small style change to the README
authored
28 ### Step 1: Specify dependencies
0e98dfc @keithpitt Work on the README
authored
29
30 Specify your dependencies in a Vendors file in your project's root.
31
32 ```ruby
813f1c3 @keithpitt Some documentation updates
authored
33 # Downloads the latest version of DKBenchmark from
c5aef49 @keithpitt Renaming http://vendorforge.org to http://vendorkit.com
authored
34 # http://vendorkit.com
4653f62 @keithpitt Edited Readme.markdown via GitHub
authored
35 lib "DKBenchmark"
813f1c3 @keithpitt Some documentation updates
authored
36
37 # Downloads version 0.5 of DKPredicateBuilder from
c5aef49 @keithpitt Renaming http://vendorforge.org to http://vendorkit.com
authored
38 # http://vendorkit.com
8bd76c0 @keithpitt More updates to the README
authored
39 lib "DKPredicateBuilder", '0.5'
40
813f1c3 @keithpitt Some documentation updates
authored
41 # Include all the source files found in ~/Development/DKRest/Classes
42 # This is usefull when developing your own libraries
43 lib "DKRest", :path => "~/Development/DKRest", :require => "Classes"
44
45 # Checks out the git repo and includes all the files found in the
46 # AFNetworking folder in the repo. The require option is handy for
47 # repo's that haven't created vendor libraries and pushed them to
c5aef49 @keithpitt Renaming http://vendorforge.org to http://vendorkit.com
authored
48 # VendorKit.com
813f1c3 @keithpitt Some documentation updates
authored
49 lib "DKRest", :git => "git://github.com/gowalla/AFNetworking.git", :require => "AFNetworking"
50
691f4a1 @keithpitt Added more comments to the example Vendorfile in the README
authored
51 # The Vendorfile allows you to specify targets to add your libraries to.
52 # By default, each library will be added to all targets, but if you have
53 # library that you only wanted to use in the "Integration Tests" target,
54 # you could do the following
8bd76c0 @keithpitt More updates to the README
authored
55 target "Integration Tests" do
56 lib "cedar", '0.2'
57 end
691f4a1 @keithpitt Added more comments to the example Vendorfile in the README
authored
58
59 # These lines are an alternative syntax to the target specification above
60 lib "OCMock", :targets => [ "Integration Tests", "Specs" ]
61 lib "Kiwi", :target => "Specs"
0e98dfc @keithpitt Work on the README
authored
62 ```
63
4653f62 @keithpitt Edited Readme.markdown via GitHub
authored
64 You can do this by either creating a `Vendorfile` manually, or by running:
f3be459 @keithpitt Edited Readme.markdown via GitHub
authored
65
66 ```bash
67 $ vendor init
68 ```
69
23d1a5e @keithpitt Small style change to the README
authored
70 ### Step 2: Install dependencies
0e98dfc @keithpitt Work on the README
authored
71
f3be459 @keithpitt Edited Readme.markdown via GitHub
authored
72 ```bash
0e98dfc @keithpitt Work on the README
authored
73 $ vendor install
74 $ git add Vendors.lock
75 ```
76
7a21181 @keithpitt Small style change to readme
authored
77 Installing a vendor library gets the latest version of the code, and adds them directly to your project in a `Vendor` group.
4653f62 @keithpitt Edited Readme.markdown via GitHub
authored
78
79 As part of the installation process the required frameworks are added aswell as any compiler/linker flags. The installed version of the library is captured in the Vendors.lock file.
f3be459 @keithpitt Edited Readme.markdown via GitHub
authored
80
15e7357 @keithpitt Updated README
authored
81 ### Step 3: There is no spoon
f3be459 @keithpitt Edited Readme.markdown via GitHub
authored
82
15e7357 @keithpitt Updated README
authored
83 Or step 3 for that matter!
0e98dfc @keithpitt Work on the README
authored
84
85 ## Creating Libraries
86
36280ed @keithpitt Typo fixes to the README
authored
87 If a vendor library has no framework dependencies, has no required additional compiler/linker flags, and has an XCode project, it doesn’t require a "vendorspec". An example is JSONKit, which may be specified as below. However, if another Vendor library requires JSONKit, JSONKit must have a vendorspec.
bd93b5b @keithpitt Updates to the README
authored
88
89 ```ruby
90 lib "JSONKit", :git => "https://github.com/johnezang/JSONKit.git"
91 ```
92
36280ed @keithpitt Typo fixes to the README
authored
93 However, if the vendor library requires frameworks or has dependencies on other Vendor libraries, it must have a vendorspec. As with Rubygems, a vendorspec is some declarative Ruby code that is open source and centrally managed.
bd93b5b @keithpitt Updates to the README
authored
94
36280ed @keithpitt Typo fixes to the README
authored
95 To create a vendorspec, simply run:
bd93b5b @keithpitt Updates to the README
authored
96
c64eef9 @keithpitt Edited Readme.markdown via GitHub
authored
97 ```bash
e03a2f1 @keithpitt Improved templates to support ERB parsing. Adding a vendorspec template
authored
98 $ vendor library init
c64eef9 @keithpitt Edited Readme.markdown via GitHub
authored
99 ```
100
bd93b5b @keithpitt Updates to the README
authored
101 This command will create a blank `.vendorspec` file that looks something like this:
0e98dfc @keithpitt Work on the README
authored
102
103 ```ruby
2871e44 @keithpitt Updated the syntax of vendor specs to be more like ruby gems
authored
104 Vendor::Spec.new do |s|
0e98dfc @keithpitt Work on the README
authored
105
19dcd92 @keithpitt Updated format of the vendorspecs. Now allow to set frameworks and bu…
authored
106 s.name "DKBenchmark"
107 s.version "0.1"
0e98dfc @keithpitt Work on the README
authored
108
19dcd92 @keithpitt Updated format of the vendorspecs. Now allow to set frameworks and bu…
authored
109 s.authors "keithpitt"
110 s.email "me@keithpitt.com"
111 s.description "Easy benchmarking in Objective-C using blocks"
0e98dfc @keithpitt Work on the README
authored
112
19dcd92 @keithpitt Updated format of the vendorspecs. Now allow to set frameworks and bu…
authored
113 s.homepage "http://www.keithpitt.com"
114 s.source "https://github.com/keithpitt/DKBenchmark"
115 s.docs "https://github.com/keithpitt/DKBenchmark/wiki"
2871e44 @keithpitt Updated the syntax of vendor specs to be more like ruby gems
authored
116
a7aff61 @burtlo Resources and Static Libraries
burtlo authored
117 s.files [ "DKBenchmark.h", "DKBenchmark.m", "static-lib.a" ]
fcdec42 @burtlo Resources added to Vendor Spec
burtlo authored
118 s.resources [ "images/loading.png", "images/loading@2x.png" ]
2871e44 @keithpitt Updated the syntax of vendor specs to be more like ruby gems
authored
119
19dcd92 @keithpitt Updated format of the vendorspecs. Now allow to set frameworks and bu…
authored
120 s.build_setting :other_linker_flags, [ "-ObjC", "+lsdd" ]
121 s.build_setting "CLANG_WARN_OBJCPP_ARC_ABI", false
122 s.build_setting "GCC_PRECOMPILE_PREFIX_HEADER", "YES"
123
124 s.framework "CoreGraphics.framework"
125 s.framework "UIKit.framework"
126
127 s.dependency "JSONKit", "0.5"
128 s.dependency "ASIHTTPRequest", "~> 4.2"
129 s.dependency "AFINetworking", "<= 2.5.a"
2871e44 @keithpitt Updated the syntax of vendor specs to be more like ruby gems
authored
130
131 end
0e98dfc @keithpitt Work on the README
authored
132 ```
133
fc7882b @keithpitt Added further instructions on creating packaged vendors
authored
134 Change what you need to match your project, then build a packaged
135 vendor library by running:
0e98dfc @keithpitt Work on the README
authored
136
737e864 @keithpitt Edited Readme.markdown via GitHub
authored
137 ```bash
fc7882b @keithpitt Added further instructions on creating packaged vendors
authored
138 $ vendor library build my_library.vendorspec
139 ```
140
c5aef49 @keithpitt Renaming http://vendorforge.org to http://vendorkit.com
authored
141 Now that you have a packaged library, you can push it to [http://vendorkit.com](http://vendorkit.com) by
fc7882b @keithpitt Added further instructions on creating packaged vendors
authored
142 running:
143
144 ```bash
26a28fe @keithpitt Fixed a few bugs the library publisher
authored
145 $ vendor library push my_library.vendor
737e864 @keithpitt Edited Readme.markdown via GitHub
authored
146 ```
57f0d64 @keithpitt Added Readme and Licence
authored
147
bb10ffe @keithpitt Edited Readme.markdown via GitHub
authored
148 ## History
149
e559a83 @keithpitt Edited Readme.markdown via GitHub
authored
150 Vendor was inspired by a blog post entitled [Vendor – Bringing Bundler to iOS](http://engineering.gomiso.com/2011/08/08/vendor-the-best-way-to-manage-ios-libraries/). I had started working on Vendor after they started doing it themselves. Their repo can be found here [https://github.com/bazaarlabs/vendor](https://github.com/bazaarlabs/vendor). I took many of the ideas (and parts of this Readme) from their code.
bb10ffe @keithpitt Edited Readme.markdown via GitHub
authored
151
72c058c @keithpitt Edited Readme.markdown via GitHub
authored
152 After reading [this blog post](http://www.germanforblack.com/articles/false-fears) by Ben Schwarz, I decided just to start something.
bb10ffe @keithpitt Edited Readme.markdown via GitHub
authored
153
e559a83 @keithpitt Edited Readme.markdown via GitHub
authored
154 > There is no value in hoarding away your treasures. If you’re genuinely creating things that you want to share with other people, then put them out there, fail, make mistakes and poor judgements... but for gods sake, do something!
155
c64eef9 @keithpitt Edited Readme.markdown via GitHub
authored
156 So I've probably made mistake or two. But thats OK, because at least I have *something* working. If you see something you think could be done better, feel free to fork and submit a pull request :)
72c058c @keithpitt Edited Readme.markdown via GitHub
authored
157
813f1c3 @keithpitt Some documentation updates
authored
158 ## Special Thanks
159
e906900 @keithpitt Updated contributers list
authored
160 Thanks to the following libraries and people, without their
161 contributions to open source, Vendor would have never been...
813f1c3 @keithpitt Some documentation updates
authored
162
424c7a0 @keithpitt Copied the version class from rubygems and added specs
authored
163 * [Rubygems](http://rubyforge.org/projects/rubygems/)
164 * [Bundler](https://github.com/carlhuda/bundler)
813f1c3 @keithpitt Some documentation updates
authored
165 * [CocoaPods](https://github.com/alloy/cocoapods)
166 * [Kit](https://github.com/nkpart/kit)
167 * [Vendor](https://github.com/bazaarlabs/vendor)
e906900 @keithpitt Updated contributers list
authored
168 * [Jari Bakken](https://github.com/jarib/plist/blob/master/lib/plist/ascii.rb)
169 * [Tim Lee](http://twitter.com/#!/timothy1ee)
813f1c3 @keithpitt Some documentation updates
authored
170
57f0d64 @keithpitt Added Readme and Licence
authored
171 ## Note on Patches/Pull Requests
172
173 1. Fork the project.
174 2. Make your feature addition or bug fix.
175 3. Add tests for it. This is important so I don't break it in a future version unintentionally.
176 4. Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
177 5. Send me a pull request. Bonus points for topic branches.
178
179 ## Copyright
180
9c037e1 @keithpitt Updates to the README
authored
181 Copyright &copy; 2011 Keith Pitt. See LICENSE for details.
Something went wrong with that request. Please try again.