Permalink
Browse files

Project cleanup, and bumped version to 0.3

  • Loading branch information...
snej committed Jan 10, 2012
1 parent c79d553 commit 2bc94da2761063bc0deca25528ff44769cc39ae9
View
@@ -20,25 +20,26 @@ More documentation is available on the [wiki][2].
## Requirements ##
* It's written in Objective-C.
- * Xcode 4.2 is required to build it.
+ * Xcode 4.2+ is required to build it.
* Runtime system requirements are iOS 5+, or Mac OS X 10.7.2+.
## License ##
* TouchDB is under the Apache License 2.0.
* [FMDB][5], by [Gus Mueller][8], is under the MIT License.
+ * [CocoaHTTPServer][9], by Robbie Hanson, is under the BSD License.
* [MYUtilities][6] (portions of which are copied into the vendor/MYUtilities directory) is under the BSD License. (But note that I, Jens, wrote MYUtilities and would have no problem re-licensing it under Apache for use here.)
## Development Status ##
-Currently [Dec. 2011] pre-alpha, but undergoing full-time development. I hope to have a beta release in early 2012.
+Currently [Jan. 2012] undergoing full-time development, nearing alpha. I hope to have a beta release in early 2012.
## Building TouchDB ##
For full details see the [wiki page][7]. The gist of it is:
1. Clone the TouchDB repository to your local disk.
- 2. In that directory run "`git submodule init`" and then "`git submodule update`". This will clone the [FMDB][5] library (an Objective-C wrapper for sqlite) into vendor/FMDB.
+ 2. In that directory run "`git submodule init`" and then "`git submodule update`". This will clone the [FMDB][5] and [CocoaHTTPServer][9] repos into the vendor/ subdirectory.
3. Open the Xcode project and build the "Mac Framework" and/or "iOS Framework" schemes.
@@ -50,4 +51,4 @@ For full details see the [wiki page][7]. The gist of it is:
[6]: https://bitbucket.org/snej/myutilities/overview
[7]: https://github.com/couchbaselabs/TouchDB-iOS/wiki/Building-TouchDB
[8]: https://github.com/ccgus/
-
+[9]: https://github.com/robbiehanson/CocoaHTTPServer
@@ -57,7 +57,7 @@ - (void) setResponseLocation: (NSURL*)url {
- (TDStatus) do_GETRoot {
NSDictionary* info = $dict({@"TouchDB", @"Welcome"},
{@"couchdb", @"Welcome"}, // for compatibility
- {@"version", kTDVersionString});
+ {@"version", [[self class] versionString]});
_response.body = [TDBody bodyWithProperties: info];
return 200;
}
View
@@ -10,9 +10,6 @@
@class TDServer, TDResponse, TDBody;
-extern NSString* const kTDVersionString;
-
-
typedef void (^OnResponseReadyBlock)(TDResponse*);
typedef void (^OnDataAvailableBlock)(NSData*);
typedef void (^OnFinishedBlock)();
@@ -48,6 +45,8 @@ typedef void (^OnFinishedBlock)();
- (void) start;
- (void) stop;
++ (NSString*) versionString;
+
@end
View
@@ -21,12 +21,17 @@
#import <objc/message.h>
-NSString* const kTDVersionString = @"0.2";
+extern double TouchDBVersionNumber; // Defined in generated TouchDB_vers.c
@implementation TDRouter
++ (NSString*) versionString {
+ return $sprintf(@"%g", TouchDBVersionNumber);
+}
+
+
- (id) initWithServer: (TDServer*)server request: (NSURLRequest*)request {
NSParameterAssert(server);
NSParameterAssert(request);
@@ -306,7 +311,7 @@ - (void) start {
if (_response.body.isValidJSON)
[_response setValue: @"application/json" ofHeader: @"Content-Type"];
- [_response.headers setObject: $sprintf(@"TouchDB %@", kTDVersionString)
+ [_response.headers setObject: $sprintf(@"TouchDB %g", TouchDBVersionNumber)
forKey: @"Server"];
// If response is ready (nonzero status), tell my client about it:
View
@@ -74,7 +74,7 @@ static id Send(TDServer* server, NSString* method, NSString* path,
TDServer* server = [TDServer createEmptyAtPath: @"/tmp/TDRouterTest"];
Send(server, @"GET", @"/", 200, $dict({@"TouchDB", @"Welcome"},
{@"couchdb", @"Welcome"},
- {@"version", kTDVersionString}));
+ {@"version", [TDRouter versionString]}));
Send(server, @"GET", @"/_all_dbs", 200, $array());
Send(server, @"GET", @"/non-existent", 404, nil);
Send(server, @"GET", @"/BadName", 400, nil);
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>1.0</string>
+ <string>${CURRENT_PROJECT_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1</string>
+ <string>${CURRENT_PROJECT_VERSION}</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2011 Couchbase, Inc. All rights reserved.</string>
<key>NSPrincipalClass</key>
@@ -1,22 +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>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIdentifier</key>
- <string>com.mooseyard.${PRODUCT_NAME:rfc1034identifier}</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
-</dict>
-</plist>
View
@@ -1,13 +0,0 @@
-//
-// TouchDBTests.h
-// TouchDBTests
-//
-// Created by Jens Alfke on 12/2/11.
-// Copyright (c) 2011 Couchbase, Inc. All rights reserved.
-//
-
-#import <SenTestingKit/SenTestingKit.h>
-
-@interface TouchDBTests : SenTestCase
-
-@end
View
@@ -1,32 +0,0 @@
-//
-// TouchDBTests.m
-// TouchDBTests
-//
-// Created by Jens Alfke on 12/2/11.
-// Copyright (c) 2011 Couchbase, Inc. All rights reserved.
-//
-
-#import "TouchDBTests.h"
-
-@implementation TouchDBTests
-
-- (void)setUp
-{
- [super setUp];
-
- // Set-up code here.
-}
-
-- (void)tearDown
-{
- // Tear-down code here.
-
- [super tearDown];
-}
-
-- (void)testExample
-{
- STFail(@"Unit tests are not implemented yet in TouchDBTests");
-}
-
-@end
@@ -1,2 +0,0 @@
-/* Localized versions of Info.plist keys */
-
Oops, something went wrong.

0 comments on commit 2bc94da

Please sign in to comment.