Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added rake install and uninstall tasks

 - removed old cedar file templates
 - added new cedar file template & project templates
 - install task builds necessary frameworks for project templates
 - installs snippets, file template, project templates and frameworks into user's Xcode library
 - uninstall task removes these items.
 - in order to identify cedar snippets to be removed, sentinel value isCedarSnippet has been added to them
 - installCodeSnippetsAndTemplates now just leverages rake install task
  • Loading branch information...
commit b34e4648c6ab3328350694a2ee8a745a9533d65e 1 parent b4e4c5f
Luke Metz & Sam Coward authored idoru committed
Showing with 909 additions and 85 deletions.
  1. +3 −1 CodeSnippetsAndTemplates/CodeSnippets/caft.codesnippet
  2. +2 −0  CodeSnippetsAndTemplates/CodeSnippets/cbef.codesnippet
  3. +2 −0  CodeSnippetsAndTemplates/CodeSnippets/ccont.codesnippet
  4. +2 −0  CodeSnippetsAndTemplates/CodeSnippets/cdesc.codesnippet
  5. +2 −0  CodeSnippetsAndTemplates/CodeSnippets/cexpandpend.codesnippet
  6. +2 −0  CodeSnippetsAndTemplates/CodeSnippets/cit.codesnippet
  7. +3 −1 CodeSnippetsAndTemplates/CodeSnippets/clog.codesnippet
  8. +2 −0  CodeSnippetsAndTemplates/CodeSnippets/cpend.codesnippet
  9. +2 −0  CodeSnippetsAndTemplates/CodeSnippets/cshare.codesnippet
  10. BIN  CodeSnippetsAndTemplates/Templates/Cedar Domain Spec.xctemplate/TemplateIcon.icns
  11. +0 −44 CodeSnippetsAndTemplates/Templates/Cedar UI Spec.xctemplate/TemplateInfo.plist
  12. +0 −18 CodeSnippetsAndTemplates/Templates/Cedar UI Spec.xctemplate/___FILEBASENAME___Spec.mm
  13. 0  ...es/Templates/{Cedar UI Spec.xctemplate → File Templates/Cedar/Cedar Spec.xctemplate}/TemplateIcon.icns
  14. +3 −2 ...mplates/{Cedar Domain Spec.xctemplate → File Templates/Cedar/Cedar Spec.xctemplate}/TemplateInfo.plist
  15. +1 −3 .../{Cedar Domain Spec.xctemplate → File Templates/Cedar/Cedar Spec.xctemplate}/___FILEBASENAME___Spec.mm
  16. +40 −0 CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/Cedar Example Spec.xctemplate/ExampleSpec.mm
  17. +28 −0 CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/Cedar Example Spec.xctemplate/TemplateInfo.plist
  18. +64 −0 CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/Cedar Testing Bundle.xctemplate/TemplateInfo.plist
  19. BIN  CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/OSX Cedar Spec Suite.xctemplate/TemplateIcon.tiff
  20. +112 −0 CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/OSX Cedar Spec Suite.xctemplate/TemplateInfo.plist
  21. BIN  ...nippetsAndTemplates/Templates/Project Templates/Cedar/OSX Cedar Testing Bundle.xctemplate/TemplateIcon.tiff
  22. +90 −0 ...ippetsAndTemplates/Templates/Project Templates/Cedar/OSX Cedar Testing Bundle.xctemplate/TemplateInfo.plist
  23. +67 −0 CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/OSX OCMock.xctemplate/TemplateInfo.plist
  24. BIN  CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/iOS Cedar Spec Suite.xctemplate/TemplateIcon.tiff
  25. +252 −0 CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/iOS Cedar Spec Suite.xctemplate/TemplateInfo.plist
  26. BIN  ...nippetsAndTemplates/Templates/Project Templates/Cedar/iOS Cedar Testing Bundle.xctemplate/TemplateIcon.tiff
  27. +106 −0 ...ippetsAndTemplates/Templates/Project Templates/Cedar/iOS Cedar Testing Bundle.xctemplate/TemplateInfo.plist
  28. +67 −0 CodeSnippetsAndTemplates/Templates/Project Templates/Cedar/iOS OCMock.xctemplate/TemplateInfo.plist
  29. +51 −1 Rakefile
  30. +8 −15 installCodeSnippetsAndTemplates
View
4 CodeSnippetsAndTemplates/CodeSnippets/caft.codesnippet
@@ -23,6 +23,8 @@
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
- <integer>2</integer>
+ <integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
2  CodeSnippetsAndTemplates/CodeSnippets/cbef.codesnippet
@@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
2  CodeSnippetsAndTemplates/CodeSnippets/ccont.codesnippet
@@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
2  CodeSnippetsAndTemplates/CodeSnippets/cdesc.codesnippet
@@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
2  CodeSnippetsAndTemplates/CodeSnippets/cexpandpend.codesnippet
@@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
2  CodeSnippetsAndTemplates/CodeSnippets/cit.codesnippet
@@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
4 CodeSnippetsAndTemplates/CodeSnippets/clog.codesnippet
@@ -21,6 +21,8 @@
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
- <integer>0</integer>
+ <integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
2  CodeSnippetsAndTemplates/CodeSnippets/cpend.codesnippet
@@ -22,5 +22,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
2  CodeSnippetsAndTemplates/CodeSnippets/cshare.codesnippet
@@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
+ <key>isCedarSnippet</key>
+ <true/>
</dict>
</plist>
View
BIN  CodeSnippetsAndTemplates/Templates/Cedar Domain Spec.xctemplate/TemplateIcon.icns
Binary file not shown
View
44 CodeSnippetsAndTemplates/Templates/Cedar UI Spec.xctemplate/TemplateInfo.plist
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>AllowedTypes</key>
- <array>
- <string>public.objective-c-source</string>
- <string>public.objective-c-plus-plus-source</string>
- </array>
- <key>DefaultCompletionName</key>
- <string>MyClass</string>
- <key>Description</key>
- <string>A Cedar UI Spec File</string>
- <key>Kind</key>
- <string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string>
- <key>MainTemplateFile</key>
- <string>___FILEBASENAME___Spec.m</string>
- <key>Options</key>
- <array>
- <dict>
- <key>Description</key>
- <string>The name of the class to spec</string>
- <key>Identifier</key>
- <string>productName</string>
- <key>Name</key>
- <string>Class to Spec</string>
- <key>NotPersisted</key>
- <true/>
- <key>Required</key>
- <true/>
- <key>Type</key>
- <string>text</string>
- </dict>
- </array>
- <key>Platforms</key>
- <array>
- <string>com.apple.platform.iphoneos</string>
- </array>
- <key>SortOrder</key>
- <string>1</string>
- <key>Summary</key>
- <string>A Cedar UI Spec</string>
-</dict>
-</plist>
View
18 CodeSnippetsAndTemplates/Templates/Cedar UI Spec.xctemplate/___FILEBASENAME___Spec.mm
@@ -1,18 +0,0 @@
-#import "SpecHelper.h"
-#import "OCMock.h"
-
-#import "___FILEBASENAME___.h"
-
-using namespace Cedar::Matchers;
-
-SPEC_BEGIN(___FILEBASENAMEASIDENTIFIER___Spec)
-
-describe(@"___FILEBASENAMEASIDENTIFIER___", ^{
- __block ___FILEBASENAMEASIDENTIFIER___ *controller;
-
- beforeEach(^{
-
- });
-});
-
-SPEC_END
View
0  ...edar UI Spec.xctemplate/TemplateIcon.icns → ...r/Cedar Spec.xctemplate/TemplateIcon.icns
File renamed without changes
View
5 ...Domain Spec.xctemplate/TemplateInfo.plist → .../Cedar Spec.xctemplate/TemplateInfo.plist
@@ -9,7 +9,7 @@
<key>DefaultCompletionName</key>
<string>MyClass</string>
<key>Description</key>
- <string>A Cedar Domain Spec File</string>
+ <string>A Cedar Spec File</string>
<key>Kind</key>
<string>Xcode.IDEKit.TextSubstitutionFileTemplateKind</string>
<key>MainTemplateFile</key>
@@ -34,10 +34,11 @@
<key>Platforms</key>
<array>
<string>com.apple.platform.iphoneos</string>
+ <string>com.apple.platform.macosx</string>
</array>
<key>SortOrder</key>
<string>1</string>
<key>Summary</key>
- <string>A Cedar Domain Spec</string>
+ <string>A Cedar Spec</string>
</dict>
</plist>
View
4 ...Spec.xctemplate/___FILEBASENAME___Spec.mm → ...Spec.xctemplate/___FILEBASENAME___Spec.mm
@@ -1,9 +1,7 @@
-#import <Cedar/SpecHelper.h>
-#import <OCMock/OCMock.h>
-
#import "___FILEBASENAME___.h"
using namespace Cedar::Matchers;
+using namespace Cedar::Doubles;
SPEC_BEGIN(___FILEBASENAMEASIDENTIFIER___Spec)
View
40 ...dTemplates/Templates/Project Templates/Cedar/Cedar Example Spec.xctemplate/ExampleSpec.mm
@@ -0,0 +1,40 @@
+using namespace Cedar::Matchers;
+using namespace Cedar::Doubles;
+
+SPEC_BEGIN(ExampleSpec)
+
+/* This is not an exhaustive list of usages.
+ For more information, please visit https://github.com/pivotal/cedar */
+
+describe(@"Example specs on NSString", ^{
+
+ it(@"lowercaseString returns a new string with everything in lower case", ^{
+ expect([@"FOOBar" lowercaseString]).to(equal(@"foobar"));
+ });
+
+ it(@"length returns the number of characters in the string", ^{
+ expect([@"internationalization" length]).to(equal(20));
+ });
+
+ describe(@"isEqualToString:", ^{
+
+ it(@"should return true if the strings are the same", ^{
+ expect([@"someString" isEqualToString:@"someString"]).to(be_truthy());
+ });
+
+ it(@"should return false if the strings are not the same", ^{
+ expect([@"someString" isEqualToString:@"anotherString"]).to_not(be_truthy());
+ });
+
+ });
+
+ describe(@"NSMutableString", ^{
+ it(@"should be a kind of NSString", ^{
+ expect([NSMutableString string]).to(be_instance_of([NSString class]).or_any_subclass());
+ });
+ });
+
+});
+
+SPEC_END
+
View
28 ...plates/Templates/Project Templates/Cedar/Cedar Example Spec.xctemplate/TemplateInfo.plist
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Identifier</key>
+ <string>com.pivotallabs.cedar.exampleSpec</string>
+ <key>InjectionTargets</key>
+ <array>
+ <string>com.pivotallabs.cedar.testingBundle</string>
+ <string>com.pivotallabs.cedar.iOSSpecSuite</string>
+ <string>com.pivotallabs.cedar.OSXSpecSuite</string>
+ </array>
+ <key>Kind</key>
+ <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
+ <key>Nodes</key>
+ <array>
+ <string>ExampleSpec.mm</string>
+ </array>
+ <key>Definitions</key>
+ <dict>
+ <key>ExampleSpec.mm</key>
+ <dict>
+ <key>Path</key>
+ <string>ExampleSpec.mm</string>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
64 ...ates/Templates/Project Templates/Cedar/Cedar Testing Bundle.xctemplate/TemplateInfo.plist
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Kind</key>
+ <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
+ <key>Identifier</key>
+ <string>com.pivotallabs.cedar.testingBundle</string>
+ <key>TargetOnly</key>
+ <true/>
+ <key>Ancestors</key>
+ <array>
+ <string>com.apple.dt.unit.bundleBase</string>
+ </array>
+ <key>Targets</key>
+ <array>
+ <dict>
+ <key>ProductType</key>
+ <string>com.apple.product-type.bundle</string>
+ <key>SharedSettings</key>
+ <dict>
+ <key>WRAPPER_EXTENSION</key>
+ <string>octest</string>
+ <key>FRAMEWORK_SEARCH_PATHS</key>
+ <string>$(DEVELOPER_LIBRARY_DIR)/Frameworks</string>
+ </dict>
+ <key>Configurations</key>
+ <dict>
+ <key>Debug</key>
+ <dict/>
+ <key>Release</key>
+ <dict/>
+ </dict>
+ <key>Frameworks</key>
+ <array>
+ <string>SenTestingKit</string>
+ </array>
+ </dict>
+ </array>
+ <key>Nodes</key>
+ <array>
+ <string>___PACKAGENAME___-Info.plist:UnitTesting</string>
+ </array>
+ <key>Definitions</key>
+ <dict>
+ <key>___PACKAGENAME___-Info.plist:UnitTesting</key>
+ <string>&lt;key&gt;CFBundleExecutable&lt;/key&gt;
+&lt;string&gt;${EXECUTABLE_NAME}&lt;/string&gt;
+&lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
+&lt;string&gt;6.0&lt;/string&gt;
+&lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
+&lt;string&gt;1.0&lt;/string&gt;
+&lt;key&gt;CFBundleVersion&lt;/key&gt;
+&lt;string&gt;1&lt;/string&gt;
+&lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt;
+&lt;string&gt;en&lt;/string&gt;
+&lt;key&gt;CFBundlePackageType&lt;/key&gt;
+&lt;string&gt;BNDL&lt;/string&gt;
+&lt;key&gt;CFBundleSignature&lt;/key&gt;
+&lt;string&gt;????&lt;/string&gt;
+</string>
+ </dict>
+</dict>
+</plist>
View
BIN  ...lates/Templates/Project Templates/Cedar/OSX Cedar Spec Suite.xctemplate/TemplateIcon.tiff
Binary file not shown
View
112 ...ates/Templates/Project Templates/Cedar/OSX Cedar Spec Suite.xctemplate/TemplateInfo.plist
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Kind</key>
+ <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
+ <key>Nodes</key>
+ <array>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importCedar</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importOCMock</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importFoundation</string>
+ <string>Frameworks/Cedar.framework</string>
+ <string>main.m:include</string>
+ <string>main.m:main:content</string>
+ </array>
+ <key>Identifier</key>
+ <string>com.pivotallabs.cedar.OSXSpecSuite</string>
+ <key>Concrete</key>
+ <true/>
+ <key>Description</key>
+ <string>Creates a command-line target which runs Cedar specs.</string>
+ <key>Ancestors</key>
+ <array>
+ <string>com.apple.dt.unit.base</string>
+ <string>com.apple.dt.unit.macBase</string>
+ <string>com.apple.dt.unit.macReferenceCounting</string>
+ </array>
+ <key>Targets</key>
+ <array>
+ <dict>
+ <key>SharedSettings</key>
+ <dict>
+ <key>GCC_PRECOMPILE_PREFIX_HEADER</key>
+ <string>YES</string>
+ <key>GCC_PREFIX_HEADER</key>
+ <string>___PACKAGENAME___/___PACKAGENAME___-Prefix.pch</string>
+ </dict>
+ <key>Frameworks</key>
+ <array>
+ <string>Foundation</string>
+ </array>
+ <key>ProductType</key>
+ <string>com.apple.product-type.tool</string>
+ <key>BuildPhases</key>
+ <array>
+ <dict>
+ <key>Class</key>
+ <string>ShellScript</string>
+ <key>ShellPath</key>
+ <string>/bin/sh</string>
+ <key>ShellScript</key>
+ <string>cp -R &quot;${TARGET_NAME}&quot;/Frameworks/Cedar.framework &quot;${BUILT_PRODUCTS_DIR}&quot;
+if test -d &quot;${TARGET_NAME}&quot;/Frameworks/OCMock.framework ; then cp -R &quot;${TARGET_NAME}&quot;/Frameworks/OCMock.framework &quot;${BUILT_PRODUCTS_DIR}&quot; ; fi</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>Sources</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>Frameworks</string>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ <key>Options</key>
+ <array>
+ <dict>
+ <key>Identifier</key>
+ <string>useARC</string>
+ <key>Units</key>
+ <dict>
+ <key>false</key>
+ <array>
+ <dict>
+ <key>Project</key>
+ <dict>
+ <key>SharedSettings</key>
+ <dict>
+ <key>CLANG_ENABLE_OBJC_ARC</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ </array>
+ <key>Definitions</key>
+ <dict>
+ <key>*:*:importOCMock</key>
+ <string>___CEDAR_IMPORT_OCMOCK___</string>
+ <key>*:*:importCedar</key>
+ <string>#import &lt;Cedar/SpecHelper.h&gt;</string>
+ <key>main.m:include</key>
+ <string>#import &lt;Cedar/Cedar.h&gt;
+</string>
+ <key>main.m:main:content</key>
+ <string>int main (int argc, const char *argv[]) {
+ return runSpecs();
+}</string>
+ <key>Frameworks/Cedar.framework</key>
+ <dict>
+ <key>Path</key>
+ <string>Cedar.framework</string>
+ </dict>
+ <key>*:*:importFoundation</key>
+ <string>#import &lt;Foundation/Foundation.h&gt;
+</string>
+ </dict>
+</dict>
+</plist>
View
BIN  ...s/Templates/Project Templates/Cedar/OSX Cedar Testing Bundle.xctemplate/TemplateIcon.tiff
Binary file not shown
View
90 .../Templates/Project Templates/Cedar/OSX Cedar Testing Bundle.xctemplate/TemplateInfo.plist
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Kind</key>
+ <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
+ <key>Definitions</key>
+ <dict>
+ <key>*:*:importCedar</key>
+ <string>#import &lt;Cedar/SpecHelper.h&gt;</string>
+ <key>*:*:importOCMock</key>
+ <string>___CEDAR_IMPORT_OCMOCK___</string>
+ <key>Frameworks/Cedar.framework</key>
+ <dict>
+ <key>Path</key>
+ <string>Cedar.framework</string>
+ </dict>
+ </dict>
+ <key>Identifier</key>
+ <string>com.pivotallabs.cedar.OSXTestingBundle</string>
+ <key>Concrete</key>
+ <true/>
+ <key>Description</key>
+ <string>This target builds a unit test bundle that uses Cedar</string>
+ <key>SortOrder</key>
+ <integer>1</integer>
+ <key>Ancestors</key>
+ <array>
+ <string>com.pivotallabs.cedar.testingBundle</string>
+ <string>com.apple.dt.unit.macBase</string>
+ <string>com.apple.dt.unit.macReferenceCounting</string>
+ </array>
+ <key>Targets</key>
+ <array>
+ <dict>
+ <key>BuildPhases</key>
+ <array>
+ <dict>
+ <key>Class</key>
+ <string>Sources</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>Frameworks</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>Resources</string>
+ </dict>
+ <dict>
+ <key>ShellScript</key>
+ <string>cp -R &quot;${TARGET_NAME}&quot;/Frameworks/Cedar.framework &quot;${BUILT_PRODUCTS_DIR}&quot;
+if test -d &quot;${TARGET_NAME}&quot;/Frameworks/OCMock.framework ; then cp -R &quot;${TARGET_NAME}&quot;/Frameworks/OCMock.framework &quot;${BUILT_PRODUCTS_DIR}&quot; ; fi</string>
+ <key>ShellPath</key>
+ <string>/bin/sh</string>
+ <key>Class</key>
+ <string>ShellScript</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>ShellScript</string>
+ <key>ShellPath</key>
+ <string>/bin/sh</string>
+ <key>ShellScript</key>
+ <string># Run the unit tests in this test bundle.
+&quot;${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests&quot;
+</string>
+ </dict>
+ </array>
+ <key>Frameworks</key>
+ <array>
+ <string>Cocoa</string>
+ </array>
+ <key>OtherFrameworks</key>
+ <array>
+ <string>AppKit</string>
+ <string>CoreData</string>
+ <string>Foundation</string>
+ </array>
+ </dict>
+ </array>
+ <key>Nodes</key>
+ <array>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importCocoa</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importCedar</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importOCMock</string>
+ <string>Frameworks/Cedar.framework</string>
+ </array>
+</dict>
+</plist>
View
67 ...tsAndTemplates/Templates/Project Templates/Cedar/OSX OCMock.xctemplate/TemplateInfo.plist
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Identifier</key>
+ <string>com.pivotallabs.cedar.OCMock</string>
+ <key>InjectionTargets</key>
+ <array>
+ <string>com.pivotallabs.cedar.OSXSpecSuite</string>
+ <string>com.pivotallabs.cedar.OSXTestingBundle</string>
+ </array>
+ <key>Kind</key>
+ <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
+ <key>Options</key>
+ <array>
+ <dict>
+ <key>Default</key>
+ <string>false</string>
+ <key>Description</key>
+ <string>Whether or not to include OCMock for mocking and stubbing objects</string>
+ <key>Identifier</key>
+ <string>useOCMock</string>
+ <key>Name</key>
+ <string>Use OCMock</string>
+ <key>SortOrder</key>
+ <integer>2</integer>
+ <key>Type</key>
+ <string>checkbox</string>
+ <key>Units</key>
+ <dict>
+ <key>false</key>
+ <array>
+ <dict>
+ <key>Macros</key>
+ <dict>
+ <key>CEDAR_IMPORT_OCMOCK</key>
+ <string></string>
+ </dict>
+ </dict>
+ </array>
+ <key>true</key>
+ <array>
+ <dict>
+ <key>Macros</key>
+ <dict>
+ <key>CEDAR_IMPORT_OCMOCK</key>
+ <string>#import &lt;OCMock/OCMock.h&gt;</string>
+ </dict>
+ <key>Nodes</key>
+ <array>
+ <string>Frameworks/OCMock.framework</string>
+ </array>
+ <key>Definitions</key>
+ <dict>
+ <key>Frameworks/OCMock.framework</key>
+ <dict>
+ <key>Path</key>
+ <string>OCMock.framework</string>
+ </dict>
+ </dict>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ </array>
+</dict>
+</plist>
View
BIN  ...lates/Templates/Project Templates/Cedar/iOS Cedar Spec Suite.xctemplate/TemplateIcon.tiff
Binary file not shown
View
252 ...ates/Templates/Project Templates/Cedar/iOS Cedar Spec Suite.xctemplate/TemplateInfo.plist
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Ancestors</key>
+ <array>
+ <string>com.apple.dt.unit.objectiveCApplication</string>
+ <string>com.apple.dt.unit.iPhoneBase</string>
+ <string>com.apple.dt.unit.prefixable</string>
+ </array>
+ <key>Concrete</key>
+ <true/>
+ <key>Definitions</key>
+ <dict>
+ <key>___PACKAGENAME___-Prefix.pch:objC:importCedar</key>
+ <string>#import &lt;Cedar-iOS/SpecHelper.h&gt;</string>
+ <key>___PACKAGENAME___-Prefix.pch:objC:importOCMock</key>
+ <string>___CEDAR_IMPORT_OCMOCK___</string>
+ <key>Frameworks/Cedar-iOS.framework</key>
+ <dict>
+ <key>Path</key>
+ <string>Cedar-iOS.framework</string>
+ </dict>
+ <key>*:implementation:shouldAutorotateToInterfaceOrientation</key>
+ <dict>
+ <key>Beginning</key>
+ <string>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{</string>
+ <key>End</key>
+ <string>}
+</string>
+ <key>Indent</key>
+ <integer>1</integer>
+ </dict>
+ <key>*:implementation:viewDidLoad</key>
+ <dict>
+ <key>Beginning</key>
+ <string>- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.</string>
+ <key>End</key>
+ <string>}
+</string>
+ <key>Indent</key>
+ <integer>1</integer>
+ </dict>
+ <key>*:implementation:viewDidUnload</key>
+ <dict>
+ <key>Beginning</key>
+ <string>- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.</string>
+ <key>End</key>
+ <string>}
+</string>
+ <key>Indent</key>
+ <integer>1</integer>
+ </dict>
+ <key>*:implementation:viewDidUnload:*</key>
+ <string>self.___*___ = nil;</string>
+ <key>*:viewControllerInterface</key>
+ <dict>
+ <key>Beginning</key>
+ <string>//
+// ___FILENAME___
+// ___PACKAGENAME___
+//
+// Created by ___FULLUSERNAME___ on ___DATE___.
+// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
+//
+
+#import &lt;UIKit/UIKit.h&gt;
+
+@interface ___FILEBASENAME___ : UIViewController
+</string>
+ <key>End</key>
+ <string>@end</string>
+ </dict>
+ <key>___PACKAGENAME___-Info.plist:iPhone</key>
+ <string>&lt;key&gt;CFBundleDisplayName&lt;/key&gt;
+&lt;string&gt;${PRODUCT_NAME}&lt;/string&gt;
+&lt;key&gt;CFBundleVersion&lt;/key&gt;
+&lt;string&gt;1.0&lt;/string&gt;
+&lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
+&lt;string&gt;1.0&lt;/string&gt;
+&lt;key&gt;LSRequiresIPhoneOS&lt;/key&gt;
+&lt;true/&gt;
+&lt;key&gt;UIRequiredDeviceCapabilities&lt;/key&gt;
+&lt;array&gt;
+ &lt;string&gt;armv7&lt;/string&gt;
+&lt;/array&gt;</string>
+ <key>___PACKAGENAME___-Prefix.pch:Availability:iPhoneAvailability:*</key>
+ <string>#import &lt;Availability.h&gt;
+
+#ifndef __IPHONE____*____0
+#warning &quot;This project uses features only available in iOS SDK ___*___.0 and later.&quot;
+#endif
+</string>
+ <key>main.m:main:UIApplicationMain</key>
+ <string>@autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, @&quot;CedarApplicationDelegate&quot;);
+}
+</string>
+ <key>main.m:import:Cedar-iOS</key>
+ <string>#import &lt;Cedar-iOS/Cedar-iOS.h&gt;
+</string>
+ </dict>
+ <key>Identifier</key>
+ <string>com.pivotallabs.cedar.iOSSpecSuite</string>
+ <key>Kind</key>
+ <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
+ <key>Nodes</key>
+ <array>
+ <string>main.m:import:Cedar-iOS</string>
+ <string>main.m:main:UIApplicationMain</string>
+ <string>___PACKAGENAME___-Info.plist:iPhone</string>
+ <string>___PACKAGENAME___-Info.plist:NSMainNibFile</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importFoundation</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importCedar</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importOCMock</string>
+ <string>___PACKAGENAME___-Prefix.pch:Availability:iPhoneAvailability</string>
+ <string>Frameworks/Cedar-iOS.framework</string>
+ </array>
+ <key>Options</key>
+ <array>
+ <dict>
+ <key>Identifier</key>
+ <string>useARC</string>
+ <key>Units</key>
+ <dict>
+ <key>false</key>
+ <array>
+ <dict>
+ <key>Project</key>
+ <dict>
+ <key>SharedSettings</key>
+ <dict>
+ <key>CLANG_ENABLE_OBJC_ARC</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ <dict>
+ <key>Default</key>
+ <string>Universal</string>
+ <key>Description</key>
+ <string>Which device family to create a project for</string>
+ <key>Identifier</key>
+ <string>universalDeviceFamily</string>
+ <key>Name</key>
+ <string>Device Family</string>
+ <key>SortOrder</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>popup</string>
+ <key>Units</key>
+ <dict>
+ <key>Universal</key>
+ <dict>
+ <key>Definitions</key>
+ <dict>
+ <key>*:implementation:shouldAutorotateToInterfaceOrientation:return</key>
+ <string>if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+} else {
+ return YES;
+}</string>
+ </dict>
+ <key>Nodes</key>
+ <array>
+ <string>___PACKAGENAME___-Info.plist:UISupportedInterfaceOrientations~iPhone</string>
+ <string>___PACKAGENAME___-Info.plist:UISupportedInterfaceOrientations~iPad</string>
+ </array>
+ <key>Project</key>
+ <dict>
+ <key>SharedSettings</key>
+ <dict>
+ <key>TARGETED_DEVICE_FAMILY</key>
+ <string>1,2</string>
+ </dict>
+ </dict>
+ </dict>
+ <key>iPad</key>
+ <dict>
+ <key>Definitions</key>
+ <dict>
+ <key>*:implementation:shouldAutorotateToInterfaceOrientation:return</key>
+ <string>return YES;</string>
+ </dict>
+ <key>Nodes</key>
+ <array>
+ <string>___PACKAGENAME___-Info.plist:UISupportedInterfaceOrientations~iPad</string>
+ </array>
+ <key>Project</key>
+ <dict>
+ <key>SharedSettings</key>
+ <dict>
+ <key>TARGETED_DEVICE_FAMILY</key>
+ <string>2</string>
+ </dict>
+ </dict>
+ </dict>
+ <key>iPhone</key>
+ <dict>
+ <key>Definitions</key>
+ <dict>
+ <key>*:implementation:shouldAutorotateToInterfaceOrientation:return</key>
+ <string>return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);</string>
+ </dict>
+ <key>Nodes</key>
+ <array>
+ <string>___PACKAGENAME___-Info.plist:UISupportedInterfaceOrientations~iPhone</string>
+ </array>
+ </dict>
+ </dict>
+ </dict>
+ </array>
+ <key>Targets</key>
+ <array>
+ <dict>
+ <key>SharedSettings</key>
+ <dict>
+ <key>OTHER_LDFLAGS</key>
+ <string>-ObjC -all_load -lstdc++</string>
+ <key>CODE_SIGN_IDENTITY[sdk=iphoneos*]</key>
+ <string>iPhone Developer</string>
+ </dict>
+ <key>Configurations</key>
+ <dict>
+ <key>Release</key>
+ <dict>
+ <key>OTHER_CFLAGS</key>
+ <string>-DNS_BLOCK_ASSERTIONS=1</string>
+ </dict>
+ </dict>
+ <key>Frameworks</key>
+ <array>
+ <string>UIKit</string>
+ <string>Foundation</string>
+ <string>CoreGraphics</string>
+ </array>
+ </dict>
+ </array>
+ <key>Description</key>
+ <string>Creates an iOS application which runs Cedar specs.</string>
+</dict>
+</plist>
View
BIN  ...s/Templates/Project Templates/Cedar/iOS Cedar Testing Bundle.xctemplate/TemplateIcon.tiff
Binary file not shown
View
106 .../Templates/Project Templates/Cedar/iOS Cedar Testing Bundle.xctemplate/TemplateInfo.plist
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Ancestors</key>
+ <array>
+ <string>com.pivotallabs.cedar.testingBundle</string>
+ <string>com.apple.dt.unit.iPhoneBase</string>
+ </array>
+ <key>Concrete</key>
+ <true/>
+ <key>Options</key>
+ <array>
+ <dict>
+ <key>Default</key>
+ <string></string>
+ <key>Required</key>
+ <true/>
+ <key>NotPersisted</key>
+ <true/>
+ <key>Identifier</key>
+ <string>testTargetName</string>
+ <key>Name</key>
+ <string>Test Target</string>
+ <key>Description</key>
+ <string>The name of the project target this test suite is for</string>
+ <key>Type</key>
+ <string>text</string>
+ </dict>
+ </array>
+ <key>Description</key>
+ <string>This target builds a unit test bundle that uses Cedar</string>
+ <key>Identifier</key>
+ <string>com.pivotallabs.cedar.iOSTestingBundle</string>
+ <key>Definitions</key>
+ <dict>
+ <key>___PACKAGENAME___-Prefix.pch:objC:importOCMock</key>
+ <string>___CEDAR_IMPORT_OCMOCK___</string>
+ <key>___PACKAGENAME___-Prefix.pch:objC:importCedar</key>
+ <string>#import &lt;Cedar-iOS/SpecHelper.h&gt;</string>
+ <key>Frameworks/Cedar-iOS.framework</key>
+ <dict>
+ <key>Path</key>
+ <string>Cedar-iOS.framework</string>
+ </dict>
+ </dict>
+ <key>Kind</key>
+ <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
+ <key>Nodes</key>
+ <array>
+ <string>Frameworks/Cedar-iOS.framework</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importCocoa</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importFoundation</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importCedar</string>
+ <string>___PACKAGENAME___-Prefix.pch:objC:importOCMock</string>
+ </array>
+ <key>SortOrder</key>
+ <integer>1</integer>
+ <key>Targets</key>
+ <array>
+ <dict>
+ <key>BuildPhases</key>
+ <array>
+ <dict>
+ <key>Class</key>
+ <string>Sources</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>Frameworks</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>Resources</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>ShellScript</string>
+ <key>ShellPath</key>
+ <string>/bin/sh</string>
+ <key>ShellScript</key>
+ <string># Run the unit tests in this test bundle.
+&quot;${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests&quot;
+</string>
+ </dict>
+ </array>
+ <key>Frameworks</key>
+ <array>
+ <string>UIKit</string>
+ <string>Foundation</string>
+ </array>
+ <key>SharedSettings</key>
+ <dict>
+ <key>BUNDLE_LOADER</key>
+ <string>$(BUILT_PRODUCTS_DIR)/___VARIABLE_testTargetName___.app/___VARIABLE_testTargetName___</string>
+ <key>TEST_HOST</key>
+ <string>$(BUNDLE_LOADER)</string>
+ <key>FRAMEWORK_SEARCH_PATHS</key>
+ <string>$(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks</string>
+ <key>OTHER_LDFLAGS</key>
+ <string>-ObjC -all_load -lstdc++</string>
+ </dict>
+ </dict>
+ </array>
+</dict>
+</plist>
View
67 ...tsAndTemplates/Templates/Project Templates/Cedar/iOS OCMock.xctemplate/TemplateInfo.plist
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Identifier</key>
+ <string>com.pivotallabs.cedar.iOSOCMock</string>
+ <key>InjectionTargets</key>
+ <array>
+ <string>com.pivotallabs.cedar.iOSSpecSuite</string>
+ <string>com.pivotallabs.cedar.iOSTestingBundle</string>
+ </array>
+ <key>Kind</key>
+ <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
+ <key>Options</key>
+ <array>
+ <dict>
+ <key>Default</key>
+ <string>false</string>
+ <key>Description</key>
+ <string>Whether or not to include OCMock for mocking and stubbing objects</string>
+ <key>Identifier</key>
+ <string>useOCMock</string>
+ <key>Name</key>
+ <string>Use OCMock</string>
+ <key>SortOrder</key>
+ <integer>2</integer>
+ <key>Type</key>
+ <string>checkbox</string>
+ <key>Units</key>
+ <dict>
+ <key>false</key>
+ <array>
+ <dict>
+ <key>Macros</key>
+ <dict>
+ <key>CEDAR_IMPORT_OCMOCK</key>
+ <string></string>
+ </dict>
+ </dict>
+ </array>
+ <key>true</key>
+ <array>
+ <dict>
+ <key>Macros</key>
+ <dict>
+ <key>CEDAR_IMPORT_OCMOCK</key>
+ <string>#import &lt;OCMock-iPhone/OCMock.h&gt;</string>
+ </dict>
+ <key>Nodes</key>
+ <array>
+ <string>Frameworks/OCMock-iPhone.framework</string>
+ </array>
+ <key>Definitions</key>
+ <dict>
+ <key>Frameworks/OCMock-iPhone.framework</key>
+ <dict>
+ <key>Path</key>
+ <string>OCMock-iPhone.framework</string>
+ </dict>
+ </dict>
+ </dict>
+ </array>
+ </dict>
+ </dict>
+ </array>
+</dict>
+</plist>
View
52 Rakefile
@@ -8,8 +8,19 @@ UI_SPECS_TARGET_NAME = "iOSSpecs"
OCUNIT_LOGIC_SPECS_TARGET_NAME = "OCUnitAppLogicTests"
OCUNIT_APPLICATION_SPECS_TARGET_NAME = "OCUnitAppTests"
+OCMOCK_PROJECT_PATH = "Externals/OCMock/Source/OCMock.xcodeproj"
+OCMOCK_FRAMEWORK_TARGET_NAME = "OCMock"
+OCMOCK_IOS_FRAMEWORK_TARGET_NAME = "OCMock-iPhone"
+CEDAR_FRAMEWORK_TARGET_NAME = "Cedar"
+CEDAR_IOS_FRAMEWORK_TARGET_NAME = "Cedar-iOS"
+XCODE_TEMPLATES_PATH = "#{ENV['HOME']}/Library/Developer/Xcode/Templates"
+XCODE_SNIPPETS_PATH = "#{ENV['HOME']}/Library/Developer/Xcode/UserData/CodeSnippets"
+
SDK_VERSION = "4.3"
BUILD_DIR = File.join(File.dirname(__FILE__), "build")
+TEMPLATES_DIR = File.join(File.dirname(__FILE__), "CodeSnippetsAndTemplates", "Templates")
+SNIPPETS_DIR = File.join(File.dirname(__FILE__), "CodeSnippetsAndTemplates", "CodeSnippets")
+SNIPPET_SENTINEL_VALUE = "isCedarSnippet"
def sdk_dir
"#{xcode_developer_dir}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator#{SDK_VERSION}.sdk"
@@ -94,6 +105,14 @@ task :build_all do
system_or_exit "xcodebuild -project #{PROJECT_NAME}.xcodeproj -alltargets -configuration #{CONFIGURATION} build TEST_AFTER_BUILD=NO SYMROOT=#{BUILD_DIR}", output_file("build_all")
end
+desc "Build Cedar and Cedar-iOS frameworks"
+task :build_frameworks do
+ system_or_exit "xcodebuild -project #{PROJECT_NAME}.xcodeproj -target #{CEDAR_FRAMEWORK_TARGET_NAME} -configuration #{CONFIGURATION} build SYMROOT=#{BUILD_DIR}", output_file("build_cedar")
+ system_or_exit "xcodebuild -project #{PROJECT_NAME}.xcodeproj -target #{CEDAR_IOS_FRAMEWORK_TARGET_NAME} -configuration #{CONFIGURATION} build SYMROOT=#{BUILD_DIR}", output_file("build_cedar_ios")
+ system_or_exit "xcodebuild -project #{OCMOCK_PROJECT_PATH} -target #{OCMOCK_FRAMEWORK_TARGET_NAME} -configuration #{CONFIGURATION} build SYMROOT=#{BUILD_DIR}", output_file("build_ocmock")
+ system_or_exit "xcodebuild -project #{OCMOCK_PROJECT_PATH} -target #{OCMOCK_IOS_FRAMEWORK_TARGET_NAME} -configuration #{CONFIGURATION} build SYMROOT=#{BUILD_DIR}", output_file("build_ocmock_ios")
+end
+
desc "Run specs"
task :specs => :build_specs do
build_dir = build_dir("")
@@ -133,7 +152,6 @@ task :uispecs => :build_uispecs do
end
end
-
desc "Build and run OCUnit logic and application specs"
task :ocunit => ["ocunit:logic", "ocunit:application"]
@@ -168,3 +186,35 @@ namespace :ocunit do
end
end
end
+
+desc "Build frameworks and install templates and code snippets"
+task :install => ["install:templates", "install:snippets"]
+
+desc "Remove code snippets and templates"
+task :uninstall do
+ system_or_exit "rm -rf \"#{XCODE_TEMPLATES_PATH}/File Templates/Cedar\""
+ system_or_exit "rm -rf \"#{XCODE_TEMPLATES_PATH}/Project Templates/Cedar\""
+ system_or_exit "grep -Rl #{SNIPPET_SENTINEL_VALUE} #{XCODE_SNIPPETS_PATH} | xargs -I{} rm -f \"{}\""
+end
+
+namespace :install do
+ task :templates => :build_frameworks do
+ Dir.mkdir(XCODE_TEMPLATES_PATH) unless File.exists?(XCODE_TEMPLATES_PATH)
+ system_or_exit "cp -R \"#{TEMPLATES_DIR}\"/* \"#{XCODE_TEMPLATES_PATH}\""
+
+ system_or_exit "cp -R \"#{BUILD_DIR}\"/Release-iphoneuniversal/Cedar-iOS.framework \"#{XCODE_TEMPLATES_PATH}/Project Templates/Cedar/iOS Cedar Spec Suite.xctemplate/\""
+ system_or_exit "cp -R \"#{BUILD_DIR}\"/Release-iphoneuniversal/Cedar-iOS.framework \"#{XCODE_TEMPLATES_PATH}/Project Templates/Cedar/iOS Cedar Testing Bundle.xctemplate/\""
+
+ system_or_exit "cp -R \"#{BUILD_DIR}\"/Release/Cedar.framework \"#{XCODE_TEMPLATES_PATH}/Project Templates/Cedar/OSX Cedar Spec Suite.xctemplate/\""
+ system_or_exit "cp -R \"#{BUILD_DIR}\"/Release/Cedar.framework \"#{XCODE_TEMPLATES_PATH}/Project Templates/Cedar/OSX Cedar Testing Bundle.xctemplate/\""
+
+ system_or_exit "cp -R \"#{BUILD_DIR}\"/Release-iphoneuniversal/OCMock-iPhone.framework \"#{XCODE_TEMPLATES_PATH}/Project Templates/Cedar/iOS OCMock.xctemplate/\""
+ system_or_exit "cp -R \"#{BUILD_DIR}\"/Release/OCMock.framework \"#{XCODE_TEMPLATES_PATH}/Project Templates/Cedar/OSX OCMock.xctemplate/\""
+ end
+
+ task :snippets do
+ Dir.mkdir(XCODE_SNIPPETS_PATH) unless File.exists?(XCODE_SNIPPETS_PATH)
+ system_or_exit "cp \"#{SNIPPETS_DIR}\"/* \"#{XCODE_SNIPPETS_PATH}\""
+ end
+end
+
View
23 installCodeSnippetsAndTemplates
@@ -1,17 +1,10 @@
#!/bin/sh
-echo "\n===== Installing Code Snippets ====="
-echo "Creating code snippets directory if necessary..."
-mkdir -p ~/Library/Developer/XCode/UserData/CodeSnippets
-
-echo "Copying and installing Cedar code snippets..."
-cp CodeSnippetsAndTemplates/CodeSnippets/* ~/Library/Developer/XCode/UserData/CodeSnippets
-
-echo "\n===== Installing Templates ====="
-echo "Creating templates directory if necessary..."
-mkdir -p "$HOME/Library/Developer/Xcode/Templates/File Templates/Specs"
-
-echo "Copying and installing Cedar templates..."
-cp -r CodeSnippetsAndTemplates/Templates/ "$HOME/Library/Developer/Xcode/Templates/File Templates/Specs/"
-
-echo "\n*** Restart Xcode to load the new code snippets and templates. The templates are available under the specs section. ***\n"
+echo "\n===== Installing Code Snippets and Templates =====\n"
+
+if rake clean uninstall install
+then
+ echo "\n*** Restart Xcode to load the new code snippets and templates. The templates are available under the Cedar section. ***\n"
+else
+ echo "\n*** It seems something went wrong installing the code snippets and templates. Check the build output for errors. ***\n"
+fi
Please sign in to comment.
Something went wrong with that request. Please try again.