Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renamed project in various source files

  • Loading branch information...
commit 7977e788e45fa7027c40f503518f81beb7507e00 1 parent b6830a0
@onecrayon authored
View
8 Info.plist
@@ -7,11 +7,11 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleName</key>
- <string>JSCocoaLoader</string>
+ <string>Spice</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>com.onecrayon.jscocoaloader</string>
+ <string>com.onecrayon.spice</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
@@ -19,8 +19,8 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0b2</string>
+ <string>1.0b3</string>
<key>NSPrincipalClass</key>
- <string>JSCocoaLoader</string>
+ <string>Spice</string>
</dict>
</plist>
View
2  Prefix.pch
@@ -1,5 +1,5 @@
//
-// Prefix header for all source files of the 'JSCocoaLoader.sugar' target in the 'JSCocoaLoader.sugar' project.
+// Prefix header for all source files of the 'Spice.sugar' target in the 'Spice.sugar' project.
//
#ifdef __OBJC__
View
32 Spice-sugar.xcodeproj/project.pbxproj
@@ -7,7 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
- 7AB5643E0FFFBA22003DC051 /* JSCocoaLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AB5643D0FFFBA22003DC051 /* JSCocoaLoader.m */; };
+ 7AD8AF60105D5589006D68AB /* Spice.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AD8AF5F105D5589006D68AB /* Spice.m */; };
7AFA3C6C100E32BE00835DBA /* JSCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AFA3C6B100E32BE00835DBA /* JSCocoa.framework */; };
7AFA3C73100E32F500835DBA /* JSCocoa.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 7AFA3C6B100E32BE00835DBA /* JSCocoa.framework */; };
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
@@ -34,12 +34,12 @@
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
32DBCF630370AF2F00C91783 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = "<group>"; };
- 7AB5643C0FFFBA22003DC051 /* JSCocoaLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSCocoaLoader.h; path = source/JSCocoaLoader.h; sourceTree = "<group>"; };
- 7AB5643D0FFFBA22003DC051 /* JSCocoaLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JSCocoaLoader.m; path = source/JSCocoaLoader.m; sourceTree = "<group>"; };
+ 7AD8AF5E105D5589006D68AB /* Spice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Spice.h; path = source/Spice.h; sourceTree = "<group>"; };
+ 7AD8AF5F105D5589006D68AB /* Spice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Spice.m; path = source/Spice.m; sourceTree = "<group>"; };
7ADF548A1011679500804298 /* mootools-server.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "mootools-server.js"; sourceTree = "<group>"; };
7AF62CF71018ACA500990C5B /* bootstrap_JSCocoaLoader.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = bootstrap_JSCocoaLoader.js; sourceTree = "<group>"; };
7AFA3C6B100E32BE00835DBA /* JSCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JSCocoa.framework; sourceTree = "<group>"; };
- 8D5B49B6048680CD000E48DA /* JSCocoaLoader.sugar */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JSCocoaLoader.sugar; sourceTree = BUILT_PRODUCTS_DIR; };
+ 8D5B49B6048680CD000E48DA /* Spice.sugar */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Spice.sugar; sourceTree = BUILT_PRODUCTS_DIR; };
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
@@ -92,8 +92,8 @@
08FB77AFFE84173DC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
- 7AB5643C0FFFBA22003DC051 /* JSCocoaLoader.h */,
- 7AB5643D0FFFBA22003DC051 /* JSCocoaLoader.m */,
+ 7AD8AF5E105D5589006D68AB /* Spice.h */,
+ 7AD8AF5F105D5589006D68AB /* Spice.m */,
);
name = Classes;
sourceTree = "<group>";
@@ -119,7 +119,7 @@
19C28FB8FE9D52D311CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
- 8D5B49B6048680CD000E48DA /* JSCocoaLoader.sugar */,
+ 8D5B49B6048680CD000E48DA /* Spice.sugar */,
);
name = Products;
sourceTree = "<group>";
@@ -153,9 +153,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
- 8D5B49AC048680CD000E48DA /* JSCocoaLoader.sugar */ = {
+ 8D5B49AC048680CD000E48DA /* Spice.sugar */ = {
isa = PBXNativeTarget;
- buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "JSCocoaLoader.sugar" */;
+ buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Spice.sugar" */;
buildPhases = (
8D5B49AF048680CD000E48DA /* Resources */,
8D5B49B1048680CD000E48DA /* Sources */,
@@ -167,10 +167,10 @@
);
dependencies = (
);
- name = JSCocoaLoader.sugar;
+ name = Spice.sugar;
productInstallPath = "$(HOME)/Library/Bundles";
productName = JSCocoaLoader.sugar;
- productReference = 8D5B49B6048680CD000E48DA /* JSCocoaLoader.sugar */;
+ productReference = 8D5B49B6048680CD000E48DA /* Spice.sugar */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
@@ -185,7 +185,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
- 8D5B49AC048680CD000E48DA /* JSCocoaLoader.sugar */,
+ 8D5B49AC048680CD000E48DA /* Spice.sugar */,
);
};
/* End PBXProject section */
@@ -224,7 +224,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 7AB5643E0FFFBA22003DC051 /* JSCocoaLoader.m in Sources */,
+ 7AD8AF60105D5589006D68AB /* Spice.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -259,7 +259,7 @@
GCC_PREFIX_HEADER = Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
- PRODUCT_NAME = JSCocoaLoader;
+ PRODUCT_NAME = Spice;
SDKROOT = macosx10.5;
WRAPPER_EXTENSION = sugar;
};
@@ -279,7 +279,7 @@
GCC_PREFIX_HEADER = Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
- PRODUCT_NAME = JSCocoaLoader;
+ PRODUCT_NAME = Spice;
SDKROOT = macosx10.5;
VALID_ARCHS = "i386 ppc ppc7400 ppc970";
WRAPPER_EXTENSION = sugar;
@@ -323,7 +323,7 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "JSCocoaLoader.sugar" */ = {
+ 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Spice.sugar" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB913B08733D840010E9CD /* Debug */,
View
10 source/Spice.h
@@ -1,16 +1,16 @@
//
-// JSCocoaLoader.h
-// JSCocoaLoader.sugar
+// Spice.h
+// Spice.sugar
//
// Created by Ian Beck
-// http://onecrayon.com
+// http://onecrayon.com/spice/
//
// MIT License
#import <Cocoa/Cocoa.h>
-@interface JSCocoaLoader : NSObject {
+@interface Spice : NSObject {
// Name of the script to run
NSString *script;
NSArray *supportPaths;
@@ -24,7 +24,7 @@
NSString *syntaxContext;
// Bundle path is useful for finding scripts in multiple locations
NSString *bundlePath;
- // Used to bypass JSCocoaLoader's Javascript system and just run the script straight up
+ // Used to bypass Spice's Javascript system and just run the script straight up
BOOL noFrills;
}
View
26 source/Spice.m
@@ -1,13 +1,13 @@
//
-// JSCocoaLoader.m
-// JSCocoaLoader.sugar
+// Spice.m
+// Spice.sugar
//
// Created by Ian Beck
-// http://onecrayon.com
+// http://onecrayon.com/spice/
//
// MIT License
-#import "JSCocoaLoader.h"
+#import "Spice.h"
#import <JSCocoa/JSCocoa.h>
#import <EspressoTextActions.h>
@@ -16,7 +16,7 @@
#import <EspressoSyntaxCore.h>
// This allows us to set private setters for these variables
-@interface JSCocoaLoader ()
+@interface Spice ()
@property (readwrite,copy) NSString* script;
@property (readwrite,retain) NSArray* arguments;
@property (readwrite,copy) NSString* syntaxContext;
@@ -26,7 +26,7 @@ @interface JSCocoaLoader ()
@end
// The actual implementation of the class
-@implementation JSCocoaLoader
+@implementation Spice
@synthesize script;
@synthesize supportPaths;
@@ -69,8 +69,8 @@ - (id)initWithDictionary:(NSDictionary *)dictionary bundlePath:(NSString *)myBun
[[self bundlePath] stringByAppendingPathComponent:@"Support"],
nil
];
- // This path might need to be searched if we aren't in the JSCocoaLoader bundle
- NSString *jclPath = [[NSBundle bundleWithIdentifier:@"com.onecrayon.jscocoaloader"] bundlePath];
+ // This path might need to be searched if we aren't in the Spice bundle
+ NSString *jclPath = [[NSBundle bundleWithIdentifier:@"com.onecrayon.spice"] bundlePath];
if ([[self bundlePath] compare:jclPath] != NSOrderedSame) {
[self setSupportPaths:[default_paths arrayByAddingObject:[jclPath stringByAppendingPathComponent:@"Support"]]];
} else {
@@ -96,13 +96,13 @@ - (BOOL)canPerformActionWithContext:(id)context {
- (BOOL)performActionWithContext:(id)context error:(NSError **)outError
{
if ([self script] == nil) {
- NSLog(@"JSCocoaLoader Error: Missing script tag in XML");
+ NSLog(@"Spice Error: Missing script tag in XML");
return NO;
}
// Time to initialize JSCocoa
JSCocoaController *jsc = [JSCocoa new];
- [jsc setObject:self withName:@"JSCocoaLoaderController"];
+ [jsc setObject:self withName:@"SpiceController"];
[jsc setObject:context withName:@"context"];
[jsc setObject:[MRRangeSet class] withName:@"MRRangeSet"];
[jsc setObject:[CETextRecipe class] withName:@"CETextRecipe"];
@@ -115,7 +115,7 @@ - (BOOL)performActionWithContext:(id)context error:(NSError **)outError
if ([self noFrills]) {
NSString *path = [self findScript:[self script] inFolders:[NSArray arrayWithObject:@"Scripts"]];
if (path == nil) {
- [self throwAlert:@"Error: could not find script" withMessage:@"JSCocoaLoader could not find the script associated with this action. Please contact the action's Sugar developer, or make sure your custom user script is defined here:\n\n~/Library/Application Support/Espresso/Support/lib/" inContext:context];
+ [self throwAlert:@"Error: could not find script" withMessage:@"Spice could not find the script associated with this action. Please contact the action's Sugar developer, or make sure your custom user script is defined here:\n\n~/Library/Application Support/Espresso/Support/Scripts/" inContext:context];
return NO;
}
@@ -141,10 +141,10 @@ - (BOOL)performActionWithContext:(id)context error:(NSError **)outError
}
} else {
// Pass off handling to the Javascript system
- [jsc evalJSFile:[self findScript:@"bootstrap_JSCocoaLoader.js" inFolders:[NSArray arrayWithObject:@"Library"]]];
+ [jsc evalJSFile:[self findScript:@"bootstrap_Spice.js" inFolders:[NSArray arrayWithObject:@"Library"]]];
// Run the bootstrapping function, which handles all further execution of scripts
- JSValueRef returnValue = [jsc callJSFunctionNamed:@"bootstrap_JSCocoaLoader" withArguments:[self script], [self arguments], nil];
+ JSValueRef returnValue = [jsc callJSFunctionNamed:@"bootstrap_Spice" withArguments:[self script], [self arguments], nil];
if (![jsc unboxJSValueRef:returnValue]) {
result = NO;
}
Please sign in to comment.
Something went wrong with that request. Please try again.