Skip to content

Commit

Permalink
Added rake install and uninstall tasks
Browse files Browse the repository at this point in the history
 - 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
Luke Metz & Sam Coward authored and idoru committed Jul 8, 2012
1 parent b4e4c5f commit b34e464
Show file tree
Hide file tree
Showing 30 changed files with 909 additions and 85 deletions.
4 changes: 3 additions & 1 deletion CodeSnippetsAndTemplates/CodeSnippets/caft.codesnippet
Expand Up @@ -23,6 +23,8 @@
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions CodeSnippetsAndTemplates/CodeSnippets/cbef.codesnippet
Expand Up @@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions CodeSnippetsAndTemplates/CodeSnippets/ccont.codesnippet
Expand Up @@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions CodeSnippetsAndTemplates/CodeSnippets/cdesc.codesnippet
Expand Up @@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions CodeSnippetsAndTemplates/CodeSnippets/cexpandpend.codesnippet
Expand Up @@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions CodeSnippetsAndTemplates/CodeSnippets/cit.codesnippet
Expand Up @@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
4 changes: 3 additions & 1 deletion CodeSnippetsAndTemplates/CodeSnippets/clog.codesnippet
Expand Up @@ -21,6 +21,8 @@
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>0</integer>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions CodeSnippetsAndTemplates/CodeSnippets/cpend.codesnippet
Expand Up @@ -22,5 +22,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions CodeSnippetsAndTemplates/CodeSnippets/cshare.codesnippet
Expand Up @@ -24,5 +24,7 @@
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
<key>isCedarSnippet</key>
<true/>
</dict>
</plist>
Binary file not shown.

This file was deleted.

This file was deleted.

Expand Up @@ -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>
Expand All @@ -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>
@@ -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)

Expand Down
@@ -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

@@ -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>
@@ -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>
Binary file not shown.

0 comments on commit b34e464

Please sign in to comment.