vendor 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. data/.gitignore +12 -0
  2. data/.travis.yml +4 -0
  3. data/Gemfile +8 -0
  4. data/Gemfile.lock +68 -0
  5. data/LICENCE +19 -0
  6. data/Rakefile +11 -0
  7. data/Readme.markdown +109 -0
  8. data/bin/vendor +62 -0
  9. data/lib/vendor/api.rb +49 -0
  10. data/lib/vendor/cli/auth.rb +38 -0
  11. data/lib/vendor/cli.rb +23 -0
  12. data/lib/vendor/config.rb +51 -0
  13. data/lib/vendor/extensions/array.rb +7 -0
  14. data/lib/vendor/extensions/fixnum.rb +7 -0
  15. data/lib/vendor/extensions/hash.rb +10 -0
  16. data/lib/vendor/extensions/string.rb +11 -0
  17. data/lib/vendor/plist.rb +255 -0
  18. data/lib/vendor/vendor_spec/builder.rb +83 -0
  19. data/lib/vendor/vendor_spec/dsl.rb +39 -0
  20. data/lib/vendor/vendor_spec/loader.rb +23 -0
  21. data/lib/vendor/version.rb +5 -0
  22. data/lib/vendor/xcode/object.rb +102 -0
  23. data/lib/vendor/xcode/objects/pbx_build_file.rb +9 -0
  24. data/lib/vendor/xcode/objects/pbx_container_item_proxy.rb +8 -0
  25. data/lib/vendor/xcode/objects/pbx_file_reference.rb +21 -0
  26. data/lib/vendor/xcode/objects/pbx_frameworks_build_phase.rb +9 -0
  27. data/lib/vendor/xcode/objects/pbx_group.rb +13 -0
  28. data/lib/vendor/xcode/objects/pbx_native_target.rb +11 -0
  29. data/lib/vendor/xcode/objects/pbx_project.rb +12 -0
  30. data/lib/vendor/xcode/objects/pbx_resources_build_phase.rb +7 -0
  31. data/lib/vendor/xcode/objects/pbx_shell_script_build_phase.rb +7 -0
  32. data/lib/vendor/xcode/objects/pbx_sources_build_phase.rb +9 -0
  33. data/lib/vendor/xcode/objects/pbx_target_dependency.rb +7 -0
  34. data/lib/vendor/xcode/objects/pbx_variant_group.rb +7 -0
  35. data/lib/vendor/xcode/objects/xc_build_configuration.rb +7 -0
  36. data/lib/vendor/xcode/objects/xc_configuration_list.rb +9 -0
  37. data/lib/vendor/xcode/project.rb +130 -0
  38. data/lib/vendor.rb +33 -0
  39. data/spec/spec_helper.rb +17 -0
  40. data/spec/support/api_stubs.rb +12 -0
  41. data/spec/support/resources/files/SecondViewController.h +13 -0
  42. data/spec/support/resources/files/SecondViewController.m +43 -0
  43. data/spec/support/resources/projects/ProjectWithSpecs/ProjectWithSpecs.xcodeproj/project.pbxproj +320 -0
  44. data/spec/support/resources/projects/TabBarWithUnitTests/TabBarWithUnitTests.xcodeproj/project.pbxproj +473 -0
  45. data/spec/support/resources/vendors/DKBenchmark/DKBenchmark.h +18 -0
  46. data/spec/support/resources/vendors/DKBenchmark/DKBenchmark.m +73 -0
  47. data/spec/support/resources/vendors/DKBenchmark/DKBenchmark.vendorspec +11 -0
  48. data/spec/support/resources/vendors/DKBenchmarkUnsafe/DKBenchmark.h +18 -0
  49. data/spec/support/resources/vendors/DKBenchmarkUnsafe/DKBenchmark.m +73 -0
  50. data/spec/support/resources/vendors/DKBenchmarkUnsafe/DKBenchmark.vendorspec +11 -0
  51. data/spec/support/temp_project.rb +21 -0
  52. data/spec/vendor/api_spec.rb +25 -0
  53. data/spec/vendor/cli/auth_spec.rb +54 -0
  54. data/spec/vendor/config_spec.rb +62 -0
  55. data/spec/vendor/vendor_spec/builder_spec.rb +86 -0
  56. data/spec/vendor/vendor_spec/dsl_spec.rb +67 -0
  57. data/spec/vendor/vendor_spec/loader_spec.rb +41 -0
  58. data/spec/vendor/xcode/object_spec.rb +76 -0
  59. data/spec/vendor/xcode/objects/pbx_project_spec.rb +26 -0
  60. data/spec/vendor/xcode/project_spec.rb +211 -0
  61. data/vendor.gemspec +33 -0
  62. metadata +234 -0
@@ -0,0 +1,473 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ 53FA525A1415C530001D35FA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FA52591415C530001D35FA /* UIKit.framework */; };
11
+ 53FA525C1415C530001D35FA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FA525B1415C530001D35FA /* Foundation.framework */; };
12
+ 53FA525E1415C530001D35FA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FA525D1415C530001D35FA /* CoreGraphics.framework */; };
13
+ 53FA52641415C530001D35FA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 53FA52621415C530001D35FA /* InfoPlist.strings */; };
14
+ 53FA52661415C530001D35FA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 53FA52651415C530001D35FA /* main.m */; };
15
+ 53FA526A1415C530001D35FA /* TabBarWithUnitTestsAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 53FA52691415C530001D35FA /* TabBarWithUnitTestsAppDelegate.m */; };
16
+ 53FA526D1415C530001D35FA /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 53FA526B1415C530001D35FA /* MainWindow.xib */; };
17
+ 53FA52701415C530001D35FA /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 53FA526F1415C530001D35FA /* FirstViewController.m */; };
18
+ 53FA52731415C530001D35FA /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 53FA52721415C530001D35FA /* SecondViewController.m */; };
19
+ 53FA52761415C530001D35FA /* FirstView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 53FA52741415C530001D35FA /* FirstView.xib */; };
20
+ 53FA52791415C530001D35FA /* SecondView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 53FA52771415C530001D35FA /* SecondView.xib */; };
21
+ 53FA52811415C530001D35FA /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FA52801415C530001D35FA /* SenTestingKit.framework */; };
22
+ 53FA52821415C530001D35FA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FA52591415C530001D35FA /* UIKit.framework */; };
23
+ 53FA52831415C530001D35FA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FA525B1415C530001D35FA /* Foundation.framework */; };
24
+ 53FA52841415C530001D35FA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FA525D1415C530001D35FA /* CoreGraphics.framework */; };
25
+ 53FA528C1415C530001D35FA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 53FA528A1415C530001D35FA /* InfoPlist.strings */; };
26
+ 53FA528E1415C530001D35FA /* TabBarWithUnitTestsTests.h in Resources */ = {isa = PBXBuildFile; fileRef = 53FA528D1415C530001D35FA /* TabBarWithUnitTestsTests.h */; };
27
+ 53FA52901415C530001D35FA /* TabBarWithUnitTestsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 53FA528F1415C530001D35FA /* TabBarWithUnitTestsTests.m */; };
28
+ /* End PBXBuildFile section */
29
+
30
+ /* Begin PBXContainerItemProxy section */
31
+ 53FA52851415C530001D35FA /* PBXContainerItemProxy */ = {
32
+ isa = PBXContainerItemProxy;
33
+ containerPortal = 53FA524C1415C530001D35FA /* Project object */;
34
+ proxyType = 1;
35
+ remoteGlobalIDString = 53FA52541415C530001D35FA;
36
+ remoteInfo = TabBarWithUnitTests;
37
+ };
38
+ /* End PBXContainerItemProxy section */
39
+
40
+ /* Begin PBXFileReference section */
41
+ 53FA52551415C530001D35FA /* TabBarWithUnitTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TabBarWithUnitTests.app; sourceTree = BUILT_PRODUCTS_DIR; };
42
+ 53FA52591415C530001D35FA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
43
+ 53FA525B1415C530001D35FA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
44
+ 53FA525D1415C530001D35FA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
45
+ 53FA52611415C530001D35FA /* TabBarWithUnitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TabBarWithUnitTests-Info.plist"; sourceTree = "<group>"; };
46
+ 53FA52631415C530001D35FA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
47
+ 53FA52651415C530001D35FA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
48
+ 53FA52671415C530001D35FA /* TabBarWithUnitTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TabBarWithUnitTests-Prefix.pch"; sourceTree = "<group>"; };
49
+ 53FA52681415C530001D35FA /* TabBarWithUnitTestsAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TabBarWithUnitTestsAppDelegate.h; sourceTree = "<group>"; };
50
+ 53FA52691415C530001D35FA /* TabBarWithUnitTestsAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TabBarWithUnitTestsAppDelegate.m; sourceTree = "<group>"; };
51
+ 53FA526C1415C530001D35FA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = "<group>"; };
52
+ 53FA526E1415C530001D35FA /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = "<group>"; };
53
+ 53FA526F1415C530001D35FA /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = "<group>"; };
54
+ 53FA52711415C530001D35FA /* SecondViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = "<group>"; };
55
+ 53FA52721415C530001D35FA /* SecondViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = "<group>"; };
56
+ 53FA52751415C530001D35FA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/FirstView.xib; sourceTree = "<group>"; };
57
+ 53FA52781415C530001D35FA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/SecondView.xib; sourceTree = "<group>"; };
58
+ 53FA527F1415C530001D35FA /* TabBarWithUnitTestsTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TabBarWithUnitTestsTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
59
+ 53FA52801415C530001D35FA /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
60
+ 53FA52891415C530001D35FA /* TabBarWithUnitTestsTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TabBarWithUnitTestsTests-Info.plist"; sourceTree = "<group>"; };
61
+ 53FA528B1415C530001D35FA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
62
+ 53FA528D1415C530001D35FA /* TabBarWithUnitTestsTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TabBarWithUnitTestsTests.h; sourceTree = "<group>"; };
63
+ 53FA528F1415C530001D35FA /* TabBarWithUnitTestsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TabBarWithUnitTestsTests.m; sourceTree = "<group>"; };
64
+ /* End PBXFileReference section */
65
+
66
+ /* Begin PBXFrameworksBuildPhase section */
67
+ 53FA52521415C530001D35FA /* Frameworks */ = {
68
+ isa = PBXFrameworksBuildPhase;
69
+ buildActionMask = 2147483647;
70
+ files = (
71
+ 53FA525A1415C530001D35FA /* UIKit.framework in Frameworks */,
72
+ 53FA525C1415C530001D35FA /* Foundation.framework in Frameworks */,
73
+ 53FA525E1415C530001D35FA /* CoreGraphics.framework in Frameworks */,
74
+ );
75
+ runOnlyForDeploymentPostprocessing = 0;
76
+ };
77
+ 53FA527B1415C530001D35FA /* Frameworks */ = {
78
+ isa = PBXFrameworksBuildPhase;
79
+ buildActionMask = 2147483647;
80
+ files = (
81
+ 53FA52811415C530001D35FA /* SenTestingKit.framework in Frameworks */,
82
+ 53FA52821415C530001D35FA /* UIKit.framework in Frameworks */,
83
+ 53FA52831415C530001D35FA /* Foundation.framework in Frameworks */,
84
+ 53FA52841415C530001D35FA /* CoreGraphics.framework in Frameworks */,
85
+ );
86
+ runOnlyForDeploymentPostprocessing = 0;
87
+ };
88
+ /* End PBXFrameworksBuildPhase section */
89
+
90
+ /* Begin PBXGroup section */
91
+ 53FA524A1415C530001D35FA = {
92
+ isa = PBXGroup;
93
+ children = (
94
+ 53FA525F1415C530001D35FA /* TabBarWithUnitTests */,
95
+ 53FA52871415C530001D35FA /* TabBarWithUnitTestsTests */,
96
+ 53FA52581415C530001D35FA /* Frameworks */,
97
+ 53FA52561415C530001D35FA /* Products */,
98
+ );
99
+ sourceTree = "<group>";
100
+ };
101
+ 53FA52561415C530001D35FA /* Products */ = {
102
+ isa = PBXGroup;
103
+ children = (
104
+ 53FA52551415C530001D35FA /* TabBarWithUnitTests.app */,
105
+ 53FA527F1415C530001D35FA /* TabBarWithUnitTestsTests.octest */,
106
+ );
107
+ name = Products;
108
+ sourceTree = "<group>";
109
+ };
110
+ 53FA52581415C530001D35FA /* Frameworks */ = {
111
+ isa = PBXGroup;
112
+ children = (
113
+ 53FA52591415C530001D35FA /* UIKit.framework */,
114
+ 53FA525B1415C530001D35FA /* Foundation.framework */,
115
+ 53FA525D1415C530001D35FA /* CoreGraphics.framework */,
116
+ 53FA52801415C530001D35FA /* SenTestingKit.framework */,
117
+ );
118
+ name = Frameworks;
119
+ sourceTree = "<group>";
120
+ };
121
+ 53FA525F1415C530001D35FA /* TabBarWithUnitTests */ = {
122
+ isa = PBXGroup;
123
+ children = (
124
+ 53FA52681415C530001D35FA /* TabBarWithUnitTestsAppDelegate.h */,
125
+ 53FA52691415C530001D35FA /* TabBarWithUnitTestsAppDelegate.m */,
126
+ 53FA526B1415C530001D35FA /* MainWindow.xib */,
127
+ 53FA526E1415C530001D35FA /* FirstViewController.h */,
128
+ 53FA526F1415C530001D35FA /* FirstViewController.m */,
129
+ 53FA52711415C530001D35FA /* SecondViewController.h */,
130
+ 53FA52721415C530001D35FA /* SecondViewController.m */,
131
+ 53FA52741415C530001D35FA /* FirstView.xib */,
132
+ 53FA52771415C530001D35FA /* SecondView.xib */,
133
+ 53FA52601415C530001D35FA /* Supporting Files */,
134
+ );
135
+ path = TabBarWithUnitTests;
136
+ sourceTree = "<group>";
137
+ };
138
+ 53FA52601415C530001D35FA /* Supporting Files */ = {
139
+ isa = PBXGroup;
140
+ children = (
141
+ 53FA52611415C530001D35FA /* TabBarWithUnitTests-Info.plist */,
142
+ 53FA52621415C530001D35FA /* InfoPlist.strings */,
143
+ 53FA52651415C530001D35FA /* main.m */,
144
+ 53FA52671415C530001D35FA /* TabBarWithUnitTests-Prefix.pch */,
145
+ );
146
+ name = "Supporting Files";
147
+ sourceTree = "<group>";
148
+ };
149
+ 53FA52871415C530001D35FA /* TabBarWithUnitTestsTests */ = {
150
+ isa = PBXGroup;
151
+ children = (
152
+ 53FA528D1415C530001D35FA /* TabBarWithUnitTestsTests.h */,
153
+ 53FA528F1415C530001D35FA /* TabBarWithUnitTestsTests.m */,
154
+ 53FA52881415C530001D35FA /* Supporting Files */,
155
+ );
156
+ path = TabBarWithUnitTestsTests;
157
+ sourceTree = "<group>";
158
+ };
159
+ 53FA52881415C530001D35FA /* Supporting Files */ = {
160
+ isa = PBXGroup;
161
+ children = (
162
+ 53FA52891415C530001D35FA /* TabBarWithUnitTestsTests-Info.plist */,
163
+ 53FA528A1415C530001D35FA /* InfoPlist.strings */,
164
+ );
165
+ name = "Supporting Files";
166
+ sourceTree = "<group>";
167
+ };
168
+ /* End PBXGroup section */
169
+
170
+ /* Begin PBXNativeTarget section */
171
+ 53FA52541415C530001D35FA /* TabBarWithUnitTests */ = {
172
+ isa = PBXNativeTarget;
173
+ buildConfigurationList = 53FA52931415C530001D35FA /* Build configuration list for PBXNativeTarget "TabBarWithUnitTests" */;
174
+ buildPhases = (
175
+ 53FA52511415C530001D35FA /* Sources */,
176
+ 53FA52521415C530001D35FA /* Frameworks */,
177
+ 53FA52531415C530001D35FA /* Resources */,
178
+ );
179
+ buildRules = (
180
+ );
181
+ dependencies = (
182
+ );
183
+ name = TabBarWithUnitTests;
184
+ productName = TabBarWithUnitTests;
185
+ productReference = 53FA52551415C530001D35FA /* TabBarWithUnitTests.app */;
186
+ productType = "com.apple.product-type.application";
187
+ };
188
+ 53FA527E1415C530001D35FA /* TabBarWithUnitTestsTests */ = {
189
+ isa = PBXNativeTarget;
190
+ buildConfigurationList = 53FA52961415C530001D35FA /* Build configuration list for PBXNativeTarget "TabBarWithUnitTestsTests" */;
191
+ buildPhases = (
192
+ 53FA527A1415C530001D35FA /* Sources */,
193
+ 53FA527B1415C530001D35FA /* Frameworks */,
194
+ 53FA527C1415C530001D35FA /* Resources */,
195
+ 53FA527D1415C530001D35FA /* ShellScript */,
196
+ );
197
+ buildRules = (
198
+ );
199
+ dependencies = (
200
+ 53FA52861415C530001D35FA /* PBXTargetDependency */,
201
+ );
202
+ name = TabBarWithUnitTestsTests;
203
+ productName = TabBarWithUnitTestsTests;
204
+ productReference = 53FA527F1415C530001D35FA /* TabBarWithUnitTestsTests.octest */;
205
+ productType = "com.apple.product-type.bundle";
206
+ };
207
+ /* End PBXNativeTarget section */
208
+
209
+ /* Begin PBXProject section */
210
+ 53FA524C1415C530001D35FA /* Project object */ = {
211
+ isa = PBXProject;
212
+ buildConfigurationList = 53FA524F1415C530001D35FA /* Build configuration list for PBXProject "TabBarWithUnitTests" */;
213
+ compatibilityVersion = "Xcode 3.2";
214
+ developmentRegion = English;
215
+ hasScannedForEncodings = 0;
216
+ knownRegions = (
217
+ en,
218
+ );
219
+ mainGroup = 53FA524A1415C530001D35FA;
220
+ productRefGroup = 53FA52561415C530001D35FA /* Products */;
221
+ projectDirPath = "";
222
+ projectRoot = "";
223
+ targets = (
224
+ 53FA52541415C530001D35FA /* TabBarWithUnitTests */,
225
+ 53FA527E1415C530001D35FA /* TabBarWithUnitTestsTests */,
226
+ );
227
+ };
228
+ /* End PBXProject section */
229
+
230
+ /* Begin PBXResourcesBuildPhase section */
231
+ 53FA52531415C530001D35FA /* Resources */ = {
232
+ isa = PBXResourcesBuildPhase;
233
+ buildActionMask = 2147483647;
234
+ files = (
235
+ 53FA52641415C530001D35FA /* InfoPlist.strings in Resources */,
236
+ 53FA526D1415C530001D35FA /* MainWindow.xib in Resources */,
237
+ 53FA52761415C530001D35FA /* FirstView.xib in Resources */,
238
+ 53FA52791415C530001D35FA /* SecondView.xib in Resources */,
239
+ );
240
+ runOnlyForDeploymentPostprocessing = 0;
241
+ };
242
+ 53FA527C1415C530001D35FA /* Resources */ = {
243
+ isa = PBXResourcesBuildPhase;
244
+ buildActionMask = 2147483647;
245
+ files = (
246
+ 53FA528C1415C530001D35FA /* InfoPlist.strings in Resources */,
247
+ 53FA528E1415C530001D35FA /* TabBarWithUnitTestsTests.h in Resources */,
248
+ );
249
+ runOnlyForDeploymentPostprocessing = 0;
250
+ };
251
+ /* End PBXResourcesBuildPhase section */
252
+
253
+ /* Begin PBXShellScriptBuildPhase section */
254
+ 53FA527D1415C530001D35FA /* ShellScript */ = {
255
+ isa = PBXShellScriptBuildPhase;
256
+ buildActionMask = 2147483647;
257
+ files = (
258
+ );
259
+ inputPaths = (
260
+ );
261
+ outputPaths = (
262
+ );
263
+ runOnlyForDeploymentPostprocessing = 0;
264
+ shellPath = /bin/sh;
265
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
266
+ };
267
+ /* End PBXShellScriptBuildPhase section */
268
+
269
+ /* Begin PBXSourcesBuildPhase section */
270
+ 53FA52511415C530001D35FA /* Sources */ = {
271
+ isa = PBXSourcesBuildPhase;
272
+ buildActionMask = 2147483647;
273
+ files = (
274
+ 53FA52661415C530001D35FA /* main.m in Sources */,
275
+ 53FA526A1415C530001D35FA /* TabBarWithUnitTestsAppDelegate.m in Sources */,
276
+ 53FA52701415C530001D35FA /* FirstViewController.m in Sources */,
277
+ 53FA52731415C530001D35FA /* SecondViewController.m in Sources */,
278
+ );
279
+ runOnlyForDeploymentPostprocessing = 0;
280
+ };
281
+ 53FA527A1415C530001D35FA /* Sources */ = {
282
+ isa = PBXSourcesBuildPhase;
283
+ buildActionMask = 2147483647;
284
+ files = (
285
+ 53FA52901415C530001D35FA /* TabBarWithUnitTestsTests.m in Sources */,
286
+ );
287
+ runOnlyForDeploymentPostprocessing = 0;
288
+ };
289
+ /* End PBXSourcesBuildPhase section */
290
+
291
+ /* Begin PBXTargetDependency section */
292
+ 53FA52861415C530001D35FA /* PBXTargetDependency */ = {
293
+ isa = PBXTargetDependency;
294
+ target = 53FA52541415C530001D35FA /* TabBarWithUnitTests */;
295
+ targetProxy = 53FA52851415C530001D35FA /* PBXContainerItemProxy */;
296
+ };
297
+ /* End PBXTargetDependency section */
298
+
299
+ /* Begin PBXVariantGroup section */
300
+ 53FA52621415C530001D35FA /* InfoPlist.strings */ = {
301
+ isa = PBXVariantGroup;
302
+ children = (
303
+ 53FA52631415C530001D35FA /* en */,
304
+ );
305
+ name = InfoPlist.strings;
306
+ sourceTree = "<group>";
307
+ };
308
+ 53FA526B1415C530001D35FA /* MainWindow.xib */ = {
309
+ isa = PBXVariantGroup;
310
+ children = (
311
+ 53FA526C1415C530001D35FA /* en */,
312
+ );
313
+ name = MainWindow.xib;
314
+ sourceTree = "<group>";
315
+ };
316
+ 53FA52741415C530001D35FA /* FirstView.xib */ = {
317
+ isa = PBXVariantGroup;
318
+ children = (
319
+ 53FA52751415C530001D35FA /* en */,
320
+ );
321
+ name = FirstView.xib;
322
+ sourceTree = "<group>";
323
+ };
324
+ 53FA52771415C530001D35FA /* SecondView.xib */ = {
325
+ isa = PBXVariantGroup;
326
+ children = (
327
+ 53FA52781415C530001D35FA /* en */,
328
+ );
329
+ name = SecondView.xib;
330
+ sourceTree = "<group>";
331
+ };
332
+ 53FA528A1415C530001D35FA /* InfoPlist.strings */ = {
333
+ isa = PBXVariantGroup;
334
+ children = (
335
+ 53FA528B1415C530001D35FA /* en */,
336
+ );
337
+ name = InfoPlist.strings;
338
+ sourceTree = "<group>";
339
+ };
340
+ /* End PBXVariantGroup section */
341
+
342
+ /* Begin XCBuildConfiguration section */
343
+ 53FA52911415C530001D35FA /* Debug */ = {
344
+ isa = XCBuildConfiguration;
345
+ buildSettings = {
346
+ ALWAYS_SEARCH_USER_PATHS = NO;
347
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
348
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
349
+ COPY_PHASE_STRIP = NO;
350
+ GCC_C_LANGUAGE_STANDARD = gnu99;
351
+ GCC_DYNAMIC_NO_PIC = NO;
352
+ GCC_OPTIMIZATION_LEVEL = 0;
353
+ GCC_PREPROCESSOR_DEFINITIONS = (
354
+ "DEBUG=1",
355
+ "$(inherited)",
356
+ );
357
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
358
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
359
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
360
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
361
+ GCC_WARN_UNUSED_VARIABLE = YES;
362
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
363
+ SDKROOT = iphoneos;
364
+ };
365
+ name = Debug;
366
+ };
367
+ 53FA52921415C530001D35FA /* Release */ = {
368
+ isa = XCBuildConfiguration;
369
+ buildSettings = {
370
+ ALWAYS_SEARCH_USER_PATHS = NO;
371
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
372
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
373
+ COPY_PHASE_STRIP = YES;
374
+ GCC_C_LANGUAGE_STANDARD = gnu99;
375
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
376
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
377
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
378
+ GCC_WARN_UNUSED_VARIABLE = YES;
379
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
380
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
381
+ SDKROOT = iphoneos;
382
+ VALIDATE_PRODUCT = YES;
383
+ };
384
+ name = Release;
385
+ };
386
+ 53FA52941415C530001D35FA /* Debug */ = {
387
+ isa = XCBuildConfiguration;
388
+ buildSettings = {
389
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
390
+ GCC_PREFIX_HEADER = "TabBarWithUnitTests/TabBarWithUnitTests-Prefix.pch";
391
+ INFOPLIST_FILE = "TabBarWithUnitTests/TabBarWithUnitTests-Info.plist";
392
+ PRODUCT_NAME = "$(TARGET_NAME)";
393
+ WRAPPER_EXTENSION = app;
394
+ };
395
+ name = Debug;
396
+ };
397
+ 53FA52951415C530001D35FA /* Release */ = {
398
+ isa = XCBuildConfiguration;
399
+ buildSettings = {
400
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
401
+ GCC_PREFIX_HEADER = "TabBarWithUnitTests/TabBarWithUnitTests-Prefix.pch";
402
+ INFOPLIST_FILE = "TabBarWithUnitTests/TabBarWithUnitTests-Info.plist";
403
+ PRODUCT_NAME = "$(TARGET_NAME)";
404
+ WRAPPER_EXTENSION = app;
405
+ };
406
+ name = Release;
407
+ };
408
+ 53FA52971415C530001D35FA /* Debug */ = {
409
+ isa = XCBuildConfiguration;
410
+ buildSettings = {
411
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TabBarWithUnitTests.app/TabBarWithUnitTests";
412
+ FRAMEWORK_SEARCH_PATHS = (
413
+ "$(SDKROOT)/Developer/Library/Frameworks",
414
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
415
+ );
416
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
417
+ GCC_PREFIX_HEADER = "TabBarWithUnitTests/TabBarWithUnitTests-Prefix.pch";
418
+ INFOPLIST_FILE = "TabBarWithUnitTestsTests/TabBarWithUnitTestsTests-Info.plist";
419
+ PRODUCT_NAME = "$(TARGET_NAME)";
420
+ TEST_HOST = "$(BUNDLE_LOADER)";
421
+ WRAPPER_EXTENSION = octest;
422
+ };
423
+ name = Debug;
424
+ };
425
+ 53FA52981415C530001D35FA /* Release */ = {
426
+ isa = XCBuildConfiguration;
427
+ buildSettings = {
428
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TabBarWithUnitTests.app/TabBarWithUnitTests";
429
+ FRAMEWORK_SEARCH_PATHS = (
430
+ "$(SDKROOT)/Developer/Library/Frameworks",
431
+ "$(DEVELOPER_LIBRARY_DIR)/Frameworks",
432
+ );
433
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
434
+ GCC_PREFIX_HEADER = "TabBarWithUnitTests/TabBarWithUnitTests-Prefix.pch";
435
+ INFOPLIST_FILE = "TabBarWithUnitTestsTests/TabBarWithUnitTestsTests-Info.plist";
436
+ PRODUCT_NAME = "$(TARGET_NAME)";
437
+ TEST_HOST = "$(BUNDLE_LOADER)";
438
+ WRAPPER_EXTENSION = octest;
439
+ };
440
+ name = Release;
441
+ };
442
+ /* End XCBuildConfiguration section */
443
+
444
+ /* Begin XCConfigurationList section */
445
+ 53FA524F1415C530001D35FA /* Build configuration list for PBXProject "TabBarWithUnitTests" */ = {
446
+ isa = XCConfigurationList;
447
+ buildConfigurations = (
448
+ 53FA52911415C530001D35FA /* Debug */,
449
+ 53FA52921415C530001D35FA /* Release */,
450
+ );
451
+ defaultConfigurationIsVisible = 0;
452
+ defaultConfigurationName = Release;
453
+ };
454
+ 53FA52931415C530001D35FA /* Build configuration list for PBXNativeTarget "TabBarWithUnitTests" */ = {
455
+ isa = XCConfigurationList;
456
+ buildConfigurations = (
457
+ 53FA52941415C530001D35FA /* Debug */,
458
+ 53FA52951415C530001D35FA /* Release */,
459
+ );
460
+ defaultConfigurationIsVisible = 0;
461
+ };
462
+ 53FA52961415C530001D35FA /* Build configuration list for PBXNativeTarget "TabBarWithUnitTestsTests" */ = {
463
+ isa = XCConfigurationList;
464
+ buildConfigurations = (
465
+ 53FA52971415C530001D35FA /* Debug */,
466
+ 53FA52981415C530001D35FA /* Release */,
467
+ );
468
+ defaultConfigurationIsVisible = 0;
469
+ };
470
+ /* End XCConfigurationList section */
471
+ };
472
+ rootObject = 53FA524C1415C530001D35FA /* Project object */;
473
+ }
@@ -0,0 +1,18 @@
1
+ //
2
+ // DKBenchmark.h
3
+ // DiscoKit
4
+ //
5
+ // Created by Keith Pitt on 30/06/11.
6
+ // Copyright 2011 Mostly Disco. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ typedef void (^DKBenchmarkBlock)(void);
12
+
13
+ @interface DKBenchmark : NSObject
14
+
15
+ + (void)benchmark:(NSString *)name block:(DKBenchmarkBlock)block;
16
+ + (void)benchmark:(NSString *)name iterations:(NSInteger)iterations block:(DKBenchmarkBlock)block;
17
+
18
+ @end
@@ -0,0 +1,73 @@
1
+ //
2
+ // DKBenchmark.m
3
+ // DiscoKit
4
+ //
5
+ // Created by Keith Pitt on 30/06/11.
6
+ // Copyright 2011 Mostly Disco. All rights reserved.
7
+ //
8
+
9
+ #import "DKBenchmark.h"
10
+
11
+ @implementation DKBenchmark
12
+
13
+ + (void)benchmark:(NSString *)name block:(DKBenchmarkBlock)block {
14
+
15
+ // If you don't specify an iterations loop, lets just default
16
+ // it to 100.
17
+ [self benchmark:name iterations:100 block:block];
18
+
19
+ }
20
+
21
+ + (void)benchmark:(NSString *)name iterations:(NSInteger)iterations block:(DKBenchmarkBlock)block {
22
+
23
+ // Store the results of the iteration in this array
24
+ NSMutableArray * results = [[NSMutableArray alloc] init];
25
+
26
+ // Define variables that we're going to use in the loop.
27
+ NSDate * date;
28
+ NSTimeInterval timePassed;
29
+
30
+ for (NSInteger i = 0; i < iterations; i++) {
31
+
32
+ // Grab the current date
33
+ date = [[NSDate alloc] init];
34
+
35
+ // Run the block
36
+ block();
37
+
38
+ // Calcualte the time that has passed, and convert to a
39
+ // signed integer by * -1
40
+ timePassed = [date timeIntervalSinceNow] * -1;
41
+
42
+ // Release the date
43
+ [date release], date = nil;
44
+
45
+ // Add the result
46
+ [results addObject:[NSNumber numberWithDouble:timePassed]];
47
+
48
+ }
49
+
50
+ // Start at 0
51
+ NSDecimalNumber * average = [NSDecimalNumber decimalNumberWithDecimal:
52
+ [[NSNumber numberWithInt:0] decimalValue]];
53
+
54
+ // Add all our results together
55
+ for (NSNumber * timePassed in results) {
56
+ average = [average decimalNumberByAdding:
57
+ [NSDecimalNumber decimalNumberWithDecimal:
58
+ [timePassed decimalValue]]];
59
+ }
60
+
61
+ // Divide them by the total
62
+ average = [average decimalNumberByDividingBy:
63
+ [NSDecimalNumber decimalNumberWithDecimal:
64
+ [[NSNumber numberWithInt:iterations] decimalValue]]];
65
+
66
+ // Show the results
67
+ NSLog(@"[DKBenchmark] \"%@\" took %@ seconds on average with (%i iterations)", name, average, iterations);
68
+
69
+ [results release];
70
+
71
+ }
72
+
73
+ @end
@@ -0,0 +1,11 @@
1
+ name "DKBenchmark"
2
+ version "0.1"
3
+
4
+ authors "keithpitt"
5
+ email "me@keithpitt.com"
6
+ homepage "http://www.keithpitt.com"
7
+ description "Easy benchmarking in Objective-C using blocks"
8
+
9
+ github "https://github.com/keithpitt/DKBenchmark"
10
+
11
+ files [ "DKBenchmark.h", "DKBenchmark.m" ]
@@ -0,0 +1,18 @@
1
+ //
2
+ // DKBenchmark.h
3
+ // DiscoKit
4
+ //
5
+ // Created by Keith Pitt on 30/06/11.
6
+ // Copyright 2011 Mostly Disco. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ typedef void (^DKBenchmarkBlock)(void);
12
+
13
+ @interface DKBenchmark : NSObject
14
+
15
+ + (void)benchmark:(NSString *)name block:(DKBenchmarkBlock)block;
16
+ + (void)benchmark:(NSString *)name iterations:(NSInteger)iterations block:(DKBenchmarkBlock)block;
17
+
18
+ @end
@@ -0,0 +1,73 @@
1
+ //
2
+ // DKBenchmark.m
3
+ // DiscoKit
4
+ //
5
+ // Created by Keith Pitt on 30/06/11.
6
+ // Copyright 2011 Mostly Disco. All rights reserved.
7
+ //
8
+
9
+ #import "DKBenchmark.h"
10
+
11
+ @implementation DKBenchmark
12
+
13
+ + (void)benchmark:(NSString *)name block:(DKBenchmarkBlock)block {
14
+
15
+ // If you don't specify an iterations loop, lets just default
16
+ // it to 100.
17
+ [self benchmark:name iterations:100 block:block];
18
+
19
+ }
20
+
21
+ + (void)benchmark:(NSString *)name iterations:(NSInteger)iterations block:(DKBenchmarkBlock)block {
22
+
23
+ // Store the results of the iteration in this array
24
+ NSMutableArray * results = [[NSMutableArray alloc] init];
25
+
26
+ // Define variables that we're going to use in the loop.
27
+ NSDate * date;
28
+ NSTimeInterval timePassed;
29
+
30
+ for (NSInteger i = 0; i < iterations; i++) {
31
+
32
+ // Grab the current date
33
+ date = [[NSDate alloc] init];
34
+
35
+ // Run the block
36
+ block();
37
+
38
+ // Calcualte the time that has passed, and convert to a
39
+ // signed integer by * -1
40
+ timePassed = [date timeIntervalSinceNow] * -1;
41
+
42
+ // Release the date
43
+ [date release], date = nil;
44
+
45
+ // Add the result
46
+ [results addObject:[NSNumber numberWithDouble:timePassed]];
47
+
48
+ }
49
+
50
+ // Start at 0
51
+ NSDecimalNumber * average = [NSDecimalNumber decimalNumberWithDecimal:
52
+ [[NSNumber numberWithInt:0] decimalValue]];
53
+
54
+ // Add all our results together
55
+ for (NSNumber * timePassed in results) {
56
+ average = [average decimalNumberByAdding:
57
+ [NSDecimalNumber decimalNumberWithDecimal:
58
+ [timePassed decimalValue]]];
59
+ }
60
+
61
+ // Divide them by the total
62
+ average = [average decimalNumberByDividingBy:
63
+ [NSDecimalNumber decimalNumberWithDecimal:
64
+ [[NSNumber numberWithInt:iterations] decimalValue]]];
65
+
66
+ // Show the results
67
+ NSLog(@"[DKBenchmark] \"%@\" took %@ seconds on average with (%i iterations)", name, average, iterations);
68
+
69
+ [results release];
70
+
71
+ }
72
+
73
+ @end
@@ -0,0 +1,11 @@
1
+ name "DKBen!/asdf535chmark"
2
+ version "0.1/asdf52fs"
3
+
4
+ authors "keithpitt"
5
+ email "me@keithpitt.com"
6
+ homepage "http://www.keithpitt.com"
7
+ description "Easy benchmarking in Objective-C using blocks"
8
+
9
+ github "https://github.com/keithpitt/DKBenchmark"
10
+
11
+ files [ "DKBenchmark.h", "DKBenchmark.m" ]