Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified tagSurf/.DS_Store
Binary file not shown.
50 changes: 50 additions & 0 deletions tagSurf/.irb-history
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
query("UIWebview")
query("webView")
qstr = "webView css:'user_email#user[email]'"
query(qstr)
query("webView css:'input#user_email'")
qsrt = "webView css:'input#user_email'"
touch(qsrt)
keyboard_enter_text("Paul@tagsurf.co")
exit
start_test_server_in_background
qsrt = "webView css:'input#user_email'"
touch(qsrt)
keyboard_enter_text("Paul@tagsurf.co")
keyboard_enter_text("Delete")
keyboard_enter_text(Delete)
keyboard_enter_text("surfdemo@tagsurf.co")
qstr = "webView css:'input#user_password'"
touch(qstr)
keyboard_enter_text("swiperight")
qstr = "webView css:'input#ts-login-btn'"
touch(qstr)
qstr = "webView css:'div#nav'"
screen = query(qstr)
screen.any?
screen = query("wer")
screen.any?
exit
start_test_server_in_background
query("view")
query("UIWebView")
query("UIWebView css:"input#new_user")
query("webView css:"input#new_user")
query("webView css:'input#new_user'")
start_test_server_in_background
query("webView css:'input#new_user'")
query("UIWebView css:'input#new_user'")
query("UIWebView css:'input#new-user'")
query("UIWebView css:'form#new_user'")
exit
start_test_server_in_background
query(
start_test_server_in_background
query("webView css:'div#nav'")
query("webView css:'div#na'")
query("webView css:'div#nav'")
query("webView css:'input#ts-login-btn'")
query("webView css:'input#ts-login-btn'")
touch("webView css:'input#ts-login-btn'")
q
exit
1 change: 1 addition & 0 deletions tagSurf/calabash.framework/Headers
1 change: 1 addition & 0 deletions tagSurf/calabash.framework/Resources
1 change: 1 addition & 0 deletions tagSurf/calabash.framework/Versions/0.14.3
14 changes: 14 additions & 0 deletions tagSurf/calabash.framework/Versions/A/Headers/CalabashServer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Created by Karl Krukow on 11/08/11.
// Copyright 2011 LessPainful. All rights reserved.

#import <Foundation/Foundation.h>

@class LPHTTPServer;

@interface CalabashServer : NSObject {
LPHTTPServer *_httpServer;
}

+ (void) start;

@end
16 changes: 16 additions & 0 deletions tagSurf/calabash.framework/Versions/A/Headers/LPCORSResponse.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// LPCORSResponse.h
// LPSimpleExample
//
// Created by Karl Krukow on 3/3/14.
// Copyright (c) 2014 Xamarin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LPHTTPResponse.h"
#import "LPHTTPDataResponse.h"


@interface LPCORSResponse : LPHTTPDataResponse

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#import <Foundation/Foundation.h>
#import "LPHTTPResponse.h"

@class LPHTTPConnection;

/**
* This is an asynchronous version of LPHTTPFileResponse.
* It reads data from the given file asynchronously via LPGCD.
*
* It may be overriden to allow custom post-processing of the data that has been read from the file.
* An example of this is the LPHTTPDynamicFileResponse class.
**/

@interface LPHTTPAsyncFileResponse : NSObject <LPHTTPResponse>
{
LPHTTPConnection *connection;

NSString *filePath;
UInt64 fileLength;
UInt64 fileOffset; // File offset as pertains to data given to connection
UInt64 readOffset; // File offset as pertains to data read from file (but maybe not returned to connection)

BOOL aborted;

NSData *data;

int fileFD;
void *readBuffer;
NSUInteger readBufferSize; // Malloced size of readBuffer
NSUInteger readBufferOffset; // Offset within readBuffer where the end of existing data is
NSUInteger readRequestLength;
dispatch_queue_t readQueue;
dispatch_source_t readSource;
BOOL readSourceSuspended;
}

- (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection;
- (NSString *)filePath;

@end

/**
* Explanation of Variables (excluding those that are obvious)
*
* fileOffset
* This is the number of bytes that have been returned to the connection via the readDataOfLength method.
* If 1KB of data has been read from the file, but none of that data has yet been returned to the connection,
* then the fileOffset variable remains at zero.
* This variable is used in the calculation of the isDone method.
* Only after all data has been returned to the connection are we actually done.
*
* readOffset
* Represents the offset of the file descriptor.
* In other words, the file position indidcator for our read stream.
* It might be easy to think of it as the total number of bytes that have been read from the file.
* However, this isn't entirely accurate, as the setOffset: method may have caused us to
* jump ahead in the file (lseek).
*
* readBuffer
* Malloc'd buffer to hold data read from the file.
*
* readBufferSize
* Total allocation size of malloc'd buffer.
*
* readBufferOffset
* Represents the position in the readBuffer where we should store new bytes.
*
* readRequestLength
* The total number of bytes that were requested from the connection.
* It's OK if we return a lesser number of bytes to the connection.
* It's NOT OK if we return a greater number of bytes to the connection.
* Doing so would disrupt proper support for range requests.
* If, however, the response is chunked then we don't need to worry about this.
* Chunked responses inheritly don't support range requests.
**/
13 changes: 13 additions & 0 deletions tagSurf/calabash.framework/Versions/A/Headers/LPHTTPDataResponse.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#import <Foundation/Foundation.h>
#import "LPHTTPResponse.h"


@interface LPHTTPDataResponse : NSObject <LPHTTPResponse>
{
NSUInteger offset;
NSData *data;
}

- (id)initWithData:(NSData *)data;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#import <Foundation/Foundation.h>
#import "LPHTTPResponse.h"
#import "LPHTTPAsyncFileResponse.h"

/**
* This class is designed to assist with dynamic content.
* Imagine you have a file that you want to make dynamic:
*
* <html>
* <body>
* <h1>ComputerName Control Panel</h1>
* ...
* <li>System Time: SysTime</li>
* </body>
* </html>
*
* Now you could generate the entire file in Objective-C,
* but this would be a horribly tedious process.
* Beside, you want to design the file with professional tools to make it look pretty.
*
* So all you have to do is escape your dynamic content like this:
*
* ...
* <h1>%%ComputerName%% Control Panel</h1>
* ...
* <li>System Time: %%SysTime%%</li>
*
* And then you create an instance of this class with:
*
* - separator = @"%%"
* - replacementDictionary = { "ComputerName"="Black MacBook", "SysTime"="2010-04-30 03:18:24" }
*
* This class will then perform the replacements for you, on the fly, as it reads the file data.
* This class is also asynchronous, so it will perform the file IO using its own LPGCD queue.
**/

@interface LPHTTPDynamicFileResponse : LPHTTPAsyncFileResponse
{
NSData *separator;
NSDictionary *replacementDict;
}

- (id)initWithFilePath:(NSString *)filePath
forConnection:(LPHTTPConnection *)connection
separator:(NSString *)separatorStr
replacementDictionary:(NSDictionary *)dictionary;

@end
25 changes: 25 additions & 0 deletions tagSurf/calabash.framework/Versions/A/Headers/LPHTTPFileResponse.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#import <Foundation/Foundation.h>
#import "LPHTTPResponse.h"

@class LPHTTPConnection;


@interface LPHTTPFileResponse : NSObject <LPHTTPResponse>
{
LPHTTPConnection *connection;

NSString *filePath;
UInt64 fileLength;
UInt64 fileOffset;

BOOL aborted;

int fileFD;
void *buffer;
NSUInteger bufferSize;
}

- (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection;
- (NSString *)filePath;

@end
Loading