Permalink
Browse files

Cloned, and renamed Worker Bee

  • Loading branch information...
1 parent 881b1c6 commit e5b1e3206a05b36d740b5d482f23e167dedec61f @snej snej committed Oct 4, 2011
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -11,4 +11,7 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
+
+ #import <Couchbase/CouchbaseMobile.h>
+ #import <CouchCocoa/CouchCocoa.h>
#endif
File renamed without changes.
@@ -1,30 +0,0 @@
-//
-// CouchTestCase.h
-// Empty App
-//
-// Created by Jens Alfke on 9/26/11.
-// Copyright (c) 2011 Couchbase, Inc. All rights reserved.
-//
-
-#import <SenTestingKit/SenTestingKit.h>
-@class CouchDatabase;
-
-
-// Utility that waits for a RESTOperation to complete and raises an assertion failure if
-// it got an error. Else returns the operation.
-#define AssertWait(OP) ({RESTOperation* i_op = (OP);\
- STAssertTrue([i_op wait], @"%@ failed: %@", i_op, i_op.error);\
- i_op = i_op;})
-
-
-/** A base unit-test class for CouchCocoa apps.
- Provides an accessor for the database. */
-@interface CouchTestCase : SenTestCase
-{
- CouchDatabase* _db;
-}
-
-/** The database the AppDelegate is using. */
-@property (nonatomic, readonly) CouchDatabase* db;
-
-@end
@@ -1,38 +0,0 @@
-//
-// CouchTestCase.m
-// Empty App
-//
-// Created by Jens Alfke on 9/26/11.
-// Copyright (c) 2011 Couchbase, Inc. All rights reserved.
-//
-
-#import "CouchTestCase.h"
-#import "AppDelegate.h"
-#import <CouchCocoa/CouchCocoa.h>
-
-@implementation CouchTestCase
-
-@synthesize db = _db;
-
-- (void)setUp
-{
- [super setUp];
-
- // The unit tests will probably start running before the Couchbase Mobile server thread is
- // ready. So wait till the app delegate sets up its database:
- AppDelegate* appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
- STAssertNotNil(appDelegate, @"Missing app delegate");
- _db = appDelegate.database;
- if (!_db) {
- NSLog(@"Empty_AppTests: Waiting for database...");
- NSDate* timeout = [NSDate dateWithTimeIntervalSinceNow: 10.0];
- while (!_db && [timeout timeIntervalSinceNow] > 0) {
- [[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.5]];
- _db = appDelegate.database;
- }
- STAssertNotNil(_db, @"Couchbase Mobile failed to start", nil);
- NSLog(@"Empty_AppTests: Database ready!\n\n");
- }
-}
-
-@end
@@ -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.example.${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>
@@ -1,41 +0,0 @@
-//
-// Empty_AppTests.m
-// Empty AppTests
-//
-// Created by Jens Alfke on 9/26/11.
-// Copyright (c) 2011 Couchbase, Inc. All rights reserved.
-//
-
-#import "CouchTestCase.h"
-#import <CouchCocoa/CouchCocoa.h>
-
-
-@interface Empty_AppTests : CouchTestCase
-@end
-
-
-@implementation Empty_AppTests
-
-- (void)setUp
-{
- [super setUp];
-
- // Set-up code here.
-}
-
-- (void)tearDown
-{
- // Tear-down code here.
-
- [super tearDown];
-}
-
-- (void)testExample
-{
- // As a simple example, test that a basic GET of the database works.
- RESTOperation* op = AssertWait([self.db GET]);
- NSDictionary* info = op.responseBody.fromJSON;
- NSLog(@"Database info = %@", info);
-}
-
-@end
@@ -1,2 +0,0 @@
-/* Localized versions of Info.plist keys */
-
View
@@ -1,26 +1,24 @@
-## Couchbase Mobile Empty App Template
+## Couchbase Mobile Workflow Test App
-This is an absolutely minimal iOS application incorporating the [Couchbase Mobile][1] framework to run [Apache CouchDB][2]. On launch it simply starts up the database server, creates a database, and then does nothing. It also contains a unit-tests target that runs one simple test against the database.
-
-This is a starting point for your own development, not a demo (if you want to see a demo, look at [GrocerySync][7]). If you're beginning a new project, you can copy the repository, rename things and start adding code; or you can just look at this code for reference on what you need to add to an existing app to support Couchbase Mobile.
+This iOS app is a shell for long-running workflow tests of the [Couchbase Mobile][1] framework.
## Getting Started
-These instructions assume you are familiar with how to make an iPhone app. Please follow them fully and in order the first time you build.
+These instructions assume you are familiar with how to make an iOS app. Please follow them fully and in order the first time you build.
If you have questions or get stuck or just want to say hi, please visit the [Mobile Couchbase group][4] on Google Groups.
Prerequisite: Xcode 4.0.2 or later with the SDK for iOS 4 or later. (It's possible the project might still work with Xcode 3, but we're not testing or supporting this anymore.)
-## Building The Empty App
+## Building The App
### Download or clone the repository
-You can [download a Zip archive of the current source code][8].
+You can [download a Zip archive of the current source code][8].
Or you can clone the repo with git:
- git clone git://github.com/couchbaselabs/iOS-EmptyApp.git
+ git clone git://github.com/couchbaselabs/WorkerBee.git
### Get the frameworks (Couchbase and CouchCocoa)
@@ -32,21 +30,13 @@ This project isn't quite standalone; it links against the Couchbase Mobile and C
### Open the Xcode project
- open 'Empty App.xcodeproj'
+ open 'Worker Bee.xcodeproj'
-### Build and run the empty app
+### Build and run the app
1. Select the appropriate destination (an iOS device or simulator) from the pop-up menu in the Xcode toolbar.
2. Click the Run button
-Nothing much will happen; you'll see a white screen on the device/simulator. More importantly, in the log output you'll see a line like:
-
- Empty App[10761:b903] Couchbase is ready, go!
-
-## To add the frameworks to your existing Xcode project
-
-Please see the documentation on the [Couchbase Mobile][1] home page.
-
## License
Portions under Apache, Erlang, and other licenses.
@@ -57,9 +47,7 @@ Copyright 2011, Couchbase, Inc.
[1]: http://www.couchbase.org/get/couchbase-mobile-for-ios/current
-[2]: http://couchdb.apache.org
[4]: https://groups.google.com/group/mobile-couchbase
[5]: https://github.com/couchbaselabs/CouchCocoa/downloads
[6]: https://github.com/couchbaselabs/CouchCocoa/
-[7]: https://github.com/couchbaselabs/iOS-Couchbase-Demo
-[8]: https://github.com/couchbaselabs/iOS-EmptyApp/zipball/master
+[8]: https://github.com/couchbaselabs/WorkerBee/zipball/master
Oops, something went wrong.

0 comments on commit e5b1e32

Please sign in to comment.