calatrava 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/.rvmrc +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +202 -0
- data/Plans.md +20 -0
- data/README.md +73 -0
- data/Rakefile +26 -0
- data/bin/calatrava +6 -0
- data/calatrava.gemspec +35 -0
- data/features/cli.feature +14 -0
- data/features/project.feature +48 -0
- data/features/step_definitions/template_steps.rb +8 -0
- data/features/support/env.rb +5 -0
- data/lib/calatrava/app.rb +30 -0
- data/lib/calatrava/manifest.rb +44 -0
- data/lib/calatrava/project.rb +218 -0
- data/lib/calatrava/resources_build_phase.rb +19 -0
- data/lib/calatrava/tasks/apache.rb +44 -0
- data/lib/calatrava/tasks/artifact.rb +24 -0
- data/lib/calatrava/tasks/assets.rb +6 -0
- data/lib/calatrava/tasks/automation.rb +38 -0
- data/lib/calatrava/tasks/bootstrap.rb +10 -0
- data/lib/calatrava/tasks/build.rb +1 -0
- data/lib/calatrava/tasks/configuration.rb +41 -0
- data/lib/calatrava/tasks/droid.rb +83 -0
- data/lib/calatrava/tasks/haml.rb +71 -0
- data/lib/calatrava/tasks/ios.rb +73 -0
- data/lib/calatrava/tasks/kernel.rb +52 -0
- data/lib/calatrava/tasks/precommit.rb +22 -0
- data/lib/calatrava/tasks/release.rb +17 -0
- data/lib/calatrava/tasks/shell.rb +17 -0
- data/lib/calatrava/tasks/web.rb +82 -0
- data/lib/calatrava/tasks.rb +93 -0
- data/lib/calatrava/template.rb +44 -0
- data/lib/calatrava/templates/.rvmrc.calatrava +2 -0
- data/lib/calatrava/templates/Gemfile.calatrava +4 -0
- data/lib/calatrava/templates/Rakefile +1 -0
- data/lib/calatrava/templates/assets/lib/ICanHaz.js +542 -0
- data/lib/calatrava/templates/assets/lib/underscore.js +1059 -0
- data/lib/calatrava/templates/assets/lib/zepto.js +1355 -0
- data/lib/calatrava/templates/build_env.sh +2 -0
- data/lib/calatrava/templates/config/environments.yml +17 -0
- data/lib/calatrava/templates/config/templates/env.coffee.erb +7 -0
- data/lib/calatrava/templates/config/templates/httpd.conf.erb +33 -0
- data/lib/calatrava/templates/droid/app/bridge.coffee +130 -0
- data/lib/calatrava/templates/droid/calatrava/ant/calatrava.xml +48 -0
- data/lib/calatrava/templates/droid/calatrava/calatrava-build.xml +91 -0
- data/lib/calatrava/templates/droid/calatrava/ivy.xml +8 -0
- data/lib/calatrava/templates/droid/calatrava/ivysettings.xml +12 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/CALATRAVA_TMPL/AndroidManifest.xml.calatrava +20 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/CALATRAVA_TMPL/ConversionForm.java.calatrava +27 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/CALATRAVA_TMPL/Title.java.calatrava +23 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/CalatravaPage.java +13 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/bridge/AjaxRequestManager.java +166 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/bridge/AssetRepository.java +17 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/bridge/KernelBridge.java +25 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/bridge/Launcher.java +85 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/bridge/PageRegistry.java +225 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/bridge/RegisteredActivity.java +86 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/bridge/RequestLoader.java +31 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/bridge/RhinoService.java +212 -0
- data/lib/calatrava/templates/droid/calatrava/src/com/calatrava/shell/WebViewActivity.java +247 -0
- data/lib/calatrava/templates/droid/manifest.yml +1 -0
- data/lib/calatrava/templates/ios/Podfile.calatrava +5 -0
- data/lib/calatrava/templates/ios/manifest.yml +1 -0
- data/lib/calatrava/templates/ios/res/js/bridge.js +249 -0
- data/lib/calatrava/templates/ios/res/xibs/ProgressViewController.xib +334 -0
- data/lib/calatrava/templates/ios/res/xibs/WebViewController.xib +173 -0
- data/lib/calatrava/templates/ios/src/AppDelegate.h +8 -0
- data/lib/calatrava/templates/ios/src/AppDelegate.m +56 -0
- data/lib/calatrava/templates/ios/src/CALATRAVA_TMPL-Info.plist +45 -0
- data/lib/calatrava/templates/ios/src/CALATRAVA_TMPL-Prefix.pch +14 -0
- data/lib/calatrava/templates/ios/src/ConversionFormViewController.h +16 -0
- data/lib/calatrava/templates/ios/src/ConversionFormViewController.m +179 -0
- data/lib/calatrava/templates/ios/src/ConversionFormViewController.xib +357 -0
- data/lib/calatrava/templates/ios/src/en.lproj/InfoPlist.strings +2 -0
- data/lib/calatrava/templates/ios/src/main.m +10 -0
- data/lib/calatrava/templates/ios/test/AJAXConnectionTest.m +21 -0
- data/lib/calatrava/templates/ios/test/AppTests-Prefix.pch +8 -0
- data/lib/calatrava/templates/ios/test/CalatravaiOSTests-Info.plist +22 -0
- data/lib/calatrava/templates/ios/test/TWBridgePageRegistryTest.m +15 -0
- data/lib/calatrava/templates/ios/test/en.lproj/InfoPlist.strings +2 -0
- data/lib/calatrava/templates/kernel/.gitignore +1 -0
- data/lib/calatrava/templates/kernel/app/calatrava.coffee +8 -0
- data/lib/calatrava/templates/kernel/app/converter/controller.converter.coffee +50 -0
- data/lib/calatrava/templates/kernel/app/converter/init.converter.coffee +11 -0
- data/lib/calatrava/templates/kernel/app/pageHelper.coffee +17 -0
- data/lib/calatrava/templates/kernel/features/support/bridge.coffee +124 -0
- data/lib/calatrava/templates/kernel/features/support/spec_helper.js +49 -0
- data/lib/calatrava/templates/kernel/spec/converter/controller.converter.spec.coffee +37 -0
- data/lib/calatrava/templates/kernel/spec/environment.spec_helper.coffee +25 -0
- data/lib/calatrava/templates/kernel/spec/spec_helper.js +49 -0
- data/lib/calatrava/templates/kernel/spec/stubView.coffee +18 -0
- data/lib/calatrava/templates/kernel/watchr.rb +17 -0
- data/lib/calatrava/templates/package.json +20 -0
- data/lib/calatrava/templates/shell/layouts/single_page.haml +23 -0
- data/lib/calatrava/templates/shell/pages/converter/conversionForm.haml +12 -0
- data/lib/calatrava/templates/shell/pages/converter/page.conversionForm.coffee +42 -0
- data/lib/calatrava/templates/shell/shell.scss +1 -0
- data/lib/calatrava/templates/shell/support/shell.coffee +21 -0
- data/lib/calatrava/templates/web/apache/conf/mime.types +1357 -0
- data/lib/calatrava/templates/web/app/source/bridge.coffee +158 -0
- data/lib/calatrava/templates/web/app/source/init.coffee +14 -0
- data/lib/calatrava/templates/web/app/views/index.haml +18 -0
- data/lib/calatrava/templates/web/deploy/instance.sh +10 -0
- data/lib/calatrava/templates/web/manifest.yml +1 -0
- data/lib/calatrava/version.rb +3 -0
- data/lib/calatrava.rb +5 -0
- metadata +302 -0
@@ -0,0 +1,179 @@
|
|
1
|
+
//
|
2
|
+
// ConversionFormViewController.m
|
3
|
+
// currencyConverter
|
4
|
+
//
|
5
|
+
// Created by Giles Alexander on 7/26/12.
|
6
|
+
// Copyright (c) 2012 ThoughtWorks. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "ConversionFormViewController.h"
|
10
|
+
|
11
|
+
@interface ConversionFormViewController (){
|
12
|
+
NSArray *_inCurrencyData;
|
13
|
+
NSArray *_outCurrencyData;
|
14
|
+
}
|
15
|
+
|
16
|
+
@property (retain, nonatomic) IBOutlet UIPickerView *outCurrencyPicker;
|
17
|
+
@property (retain, nonatomic) IBOutlet UIPickerView *inCurrencyPicker;
|
18
|
+
|
19
|
+
- (void)updateCurrencyPickerSelection:(UIPickerView *)pickerView usingData:(NSArray *)currencyData;
|
20
|
+
@end
|
21
|
+
|
22
|
+
@implementation ConversionFormViewController
|
23
|
+
@synthesize outCurrencyPicker;
|
24
|
+
@synthesize inCurrencyPicker;
|
25
|
+
|
26
|
+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
|
27
|
+
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
28
|
+
if (self) {
|
29
|
+
_inCurrencyData = [[NSArray alloc] init];
|
30
|
+
_outCurrencyData = [[NSArray alloc] init];
|
31
|
+
}
|
32
|
+
return self;
|
33
|
+
}
|
34
|
+
|
35
|
+
- (void)dealloc {
|
36
|
+
[outCurrencyPicker release];
|
37
|
+
[inCurrencyPicker release];
|
38
|
+
[_inCurrencyData release];
|
39
|
+
[_outCurrencyData release];
|
40
|
+
[super dealloc];
|
41
|
+
}
|
42
|
+
|
43
|
+
-(void)viewDidLoad{
|
44
|
+
[super viewDidLoad];
|
45
|
+
inCurrencyPicker.delegate = self;
|
46
|
+
inCurrencyPicker.dataSource = self;
|
47
|
+
outCurrencyPicker.delegate = self;
|
48
|
+
outCurrencyPicker.dataSource = self;
|
49
|
+
[inCurrencyPicker reloadAllComponents];
|
50
|
+
[outCurrencyPicker reloadAllComponents];
|
51
|
+
[self updateCurrencyPickerSelection:inCurrencyPicker usingData:_inCurrencyData];
|
52
|
+
[self updateCurrencyPickerSelection:outCurrencyPicker usingData:_outCurrencyData];
|
53
|
+
}
|
54
|
+
|
55
|
+
- (void)viewDidUnload
|
56
|
+
{
|
57
|
+
[self setOutCurrencyPicker:nil];
|
58
|
+
[self setInCurrencyPicker:nil];
|
59
|
+
[super viewDidUnload];
|
60
|
+
}
|
61
|
+
|
62
|
+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
63
|
+
{
|
64
|
+
return (interfaceOrientation == UIInterfaceOrientationPortrait);
|
65
|
+
}
|
66
|
+
|
67
|
+
- (void)updateCurrencyPickerSelection:(UIPickerView *)pickerView usingData:(NSArray *)currencyData
|
68
|
+
{
|
69
|
+
int i = -1;
|
70
|
+
for (NSDictionary *currencyDetails in currencyData) {
|
71
|
+
i++;
|
72
|
+
if ([[currencyDetails objectForKey:@"selected"] boolValue])
|
73
|
+
{
|
74
|
+
[pickerView selectRow:i inComponent:0 animated:NO];
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
- (void)renderCurrencyPicker:(UIPickerView *)pickerView usingData:(NSArray *)currencyData to:(NSArray **)pickerStore
|
80
|
+
{
|
81
|
+
[*pickerStore release];
|
82
|
+
*pickerStore = [currencyData copy];
|
83
|
+
if( pickerView ){
|
84
|
+
[pickerView reloadComponent:0];
|
85
|
+
[self updateCurrencyPickerSelection:pickerView usingData:currencyData];
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
- (void)render:(NSDictionary *)jsViewObject
|
90
|
+
{
|
91
|
+
for (NSString *key in jsViewObject)
|
92
|
+
{
|
93
|
+
id value = [jsViewObject objectForKey:key];
|
94
|
+
if( [key isEqualToString:@"inCurrencies"] )
|
95
|
+
{
|
96
|
+
[self renderCurrencyPicker:inCurrencyPicker usingData:value to:&_inCurrencyData];
|
97
|
+
}else if( [key isEqualToString:@"outCurrencies"] ){
|
98
|
+
[self renderCurrencyPicker:outCurrencyPicker usingData:value to:&_outCurrencyData];
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
|
104
|
+
return 1;
|
105
|
+
}
|
106
|
+
|
107
|
+
- (NSArray *)currenciesForPicker:(UIPickerView *)picker{
|
108
|
+
if( picker == self.inCurrencyPicker ){
|
109
|
+
return _inCurrencyData;
|
110
|
+
}else if( picker == self.outCurrencyPicker ){
|
111
|
+
return _outCurrencyData;
|
112
|
+
}else{
|
113
|
+
return nil;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
- (NSDictionary *)currencyDetailsForPickerView:(UIPickerView *)pickerView atRow:(NSInteger)row{
|
118
|
+
NSArray *currencies = [self currenciesForPicker:pickerView];
|
119
|
+
if( !currencies )
|
120
|
+
return nil;
|
121
|
+
|
122
|
+
return [currencies objectAtIndex:row];
|
123
|
+
}
|
124
|
+
|
125
|
+
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{
|
126
|
+
NSArray *currencies = [self currenciesForPicker:pickerView];
|
127
|
+
if( currencies )
|
128
|
+
return [currencies count];
|
129
|
+
else
|
130
|
+
return 0;
|
131
|
+
}
|
132
|
+
|
133
|
+
- (void)userSelectedCurrency:(NSDictionary *)details fromPicker:(UIPickerView *)picker
|
134
|
+
{
|
135
|
+
NSString *event = picker == inCurrencyPicker ? @"selectedInCurrency" : @"selectedOutCurrency";
|
136
|
+
|
137
|
+
NSString *currencyCode = [details objectForKey:@"code"];
|
138
|
+
[self dispatchEvent:event withArgs:[NSArray arrayWithObject:currencyCode]];
|
139
|
+
}
|
140
|
+
|
141
|
+
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
|
142
|
+
NSDictionary *currencyDetails = [self currencyDetailsForPickerView:pickerView atRow:row];
|
143
|
+
BOOL isValidSelection = [[currencyDetails objectForKey:@"enabled"] boolValue];
|
144
|
+
|
145
|
+
if (isValidSelection) {
|
146
|
+
[self userSelectedCurrency:currencyDetails fromPicker:pickerView];
|
147
|
+
} else {
|
148
|
+
int fallbackRow = (row == 0 ? row + 1 : row - 1);
|
149
|
+
[pickerView selectRow:fallbackRow inComponent:component animated:YES];
|
150
|
+
[self userSelectedCurrency:[self currencyDetailsForPickerView:pickerView atRow:fallbackRow] fromPicker:pickerView];
|
151
|
+
}
|
152
|
+
}
|
153
|
+
|
154
|
+
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
|
155
|
+
{
|
156
|
+
NSDictionary *currencyDetails = [self currencyDetailsForPickerView:pickerView atRow:row];
|
157
|
+
|
158
|
+
if (!view) {
|
159
|
+
view = [[UILabel alloc] init];
|
160
|
+
}
|
161
|
+
|
162
|
+
UILabel *label = (UILabel *)view;
|
163
|
+
[label setFrame:CGRectMake(9.0, 0.0, [pickerView frame].size.width - 40.0, 44.0)];
|
164
|
+
[label setText:[currencyDetails objectForKey:@"code"]];
|
165
|
+
[label setFont:[UIFont boldSystemFontOfSize:20.0]];
|
166
|
+
[label setBackgroundColor:[UIColor clearColor]];
|
167
|
+
[label setShadowColor:[UIColor whiteColor]];
|
168
|
+
[label setOpaque:NO];
|
169
|
+
[label setShadowOffset:CGSizeMake(1, 1)];
|
170
|
+
if ([[currencyDetails objectForKey:@"enabled"] boolValue])
|
171
|
+
{
|
172
|
+
[label setTextColor:[UIColor blackColor]];
|
173
|
+
} else {
|
174
|
+
[label setTextColor:[UIColor lightGrayColor]];
|
175
|
+
}
|
176
|
+
return label;
|
177
|
+
}
|
178
|
+
|
179
|
+
@end
|
@@ -0,0 +1,357 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
3
|
+
<data>
|
4
|
+
<int key="IBDocument.SystemTarget">1296</int>
|
5
|
+
<string key="IBDocument.SystemVersion">11D50d</string>
|
6
|
+
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
7
|
+
<string key="IBDocument.AppKitVersion">1138.32</string>
|
8
|
+
<string key="IBDocument.HIToolboxVersion">568.00</string>
|
9
|
+
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
10
|
+
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
11
|
+
<string key="NS.object.0">1181</string>
|
12
|
+
</object>
|
13
|
+
<array key="IBDocument.IntegratedClassDependencies">
|
14
|
+
<string>IBUIPickerView</string>
|
15
|
+
<string>IBUITextField</string>
|
16
|
+
<string>IBUIView</string>
|
17
|
+
<string>IBUILabel</string>
|
18
|
+
<string>IBProxyObject</string>
|
19
|
+
</array>
|
20
|
+
<array key="IBDocument.PluginDependencies">
|
21
|
+
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
22
|
+
</array>
|
23
|
+
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
24
|
+
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
25
|
+
<integer value="1" key="NS.object.0"/>
|
26
|
+
</object>
|
27
|
+
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
28
|
+
<object class="IBProxyObject" id="372490531">
|
29
|
+
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
30
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
31
|
+
</object>
|
32
|
+
<object class="IBProxyObject" id="975951072">
|
33
|
+
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
34
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
35
|
+
</object>
|
36
|
+
<object class="IBUIView" id="191373211">
|
37
|
+
<reference key="NSNextResponder"/>
|
38
|
+
<int key="NSvFlags">274</int>
|
39
|
+
<array class="NSMutableArray" key="NSSubviews">
|
40
|
+
<object class="IBUILabel" id="278875700">
|
41
|
+
<reference key="NSNextResponder" ref="191373211"/>
|
42
|
+
<int key="NSvFlags">292</int>
|
43
|
+
<string key="NSFrame">{{20, 344}, {203, 96}}</string>
|
44
|
+
<reference key="NSSuperview" ref="191373211"/>
|
45
|
+
<reference key="NSWindow"/>
|
46
|
+
<reference key="NSNextKeyView"/>
|
47
|
+
<string key="NSReuseIdentifierKey">_NS:9</string>
|
48
|
+
<bool key="IBUIOpaque">NO</bool>
|
49
|
+
<bool key="IBUIClipsSubviews">YES</bool>
|
50
|
+
<int key="IBUIContentMode">7</int>
|
51
|
+
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
52
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
53
|
+
<string key="IBUIText">SERIOUSLY THIS CURRENCY CONVERTER IS REALLY AWESOME</string>
|
54
|
+
<object class="NSColor" key="IBUITextColor">
|
55
|
+
<int key="NSColorSpace">1</int>
|
56
|
+
<bytes key="NSRGB">MC4yMDA0NzEyOTc2IDAuMjAwNDcxMjk3NiAwLjIwMDQ3MTI5NzYAA</bytes>
|
57
|
+
</object>
|
58
|
+
<nil key="IBUIHighlightedColor"/>
|
59
|
+
<int key="IBUIBaselineAdjustment">0</int>
|
60
|
+
<float key="IBUIMinimumFontSize">10</float>
|
61
|
+
<int key="IBUINumberOfLines">0</int>
|
62
|
+
<object class="IBUIFontDescription" key="IBUIFontDescription" id="628107554">
|
63
|
+
<int key="type">1</int>
|
64
|
+
<double key="pointSize">17</double>
|
65
|
+
</object>
|
66
|
+
<object class="NSFont" key="IBUIFont" id="267264194">
|
67
|
+
<string key="NSName">Helvetica</string>
|
68
|
+
<double key="NSSize">17</double>
|
69
|
+
<int key="NSfFlags">16</int>
|
70
|
+
</object>
|
71
|
+
</object>
|
72
|
+
<object class="IBUILabel" id="671683200">
|
73
|
+
<reference key="NSNextResponder" ref="191373211"/>
|
74
|
+
<int key="NSvFlags">292</int>
|
75
|
+
<string key="NSFrame">{{139, 83}, {43, 90}}</string>
|
76
|
+
<reference key="NSSuperview" ref="191373211"/>
|
77
|
+
<reference key="NSWindow"/>
|
78
|
+
<reference key="NSNextKeyView" ref="463978271"/>
|
79
|
+
<string key="NSReuseIdentifierKey">_NS:9</string>
|
80
|
+
<bool key="IBUIOpaque">NO</bool>
|
81
|
+
<bool key="IBUIClipsSubviews">YES</bool>
|
82
|
+
<int key="IBUIContentMode">7</int>
|
83
|
+
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
84
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
85
|
+
<string key="IBUIText">➜</string>
|
86
|
+
<object class="NSColor" key="IBUITextColor">
|
87
|
+
<int key="NSColorSpace">1</int>
|
88
|
+
<bytes key="NSRGB">MC4yMDA0NzEyOTc2IDAuMjAwNDcxMjk3NiAwLjIwMDQ3MTI5NzYAA</bytes>
|
89
|
+
</object>
|
90
|
+
<nil key="IBUIHighlightedColor"/>
|
91
|
+
<int key="IBUIBaselineAdjustment">0</int>
|
92
|
+
<float key="IBUIMinimumFontSize">10</float>
|
93
|
+
<int key="IBUINumberOfLines">0</int>
|
94
|
+
<int key="IBUITextAlignment">1</int>
|
95
|
+
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
96
|
+
<int key="type">1</int>
|
97
|
+
<double key="pointSize">46</double>
|
98
|
+
</object>
|
99
|
+
<object class="NSFont" key="IBUIFont">
|
100
|
+
<string key="NSName">Helvetica</string>
|
101
|
+
<double key="NSSize">46</double>
|
102
|
+
<int key="NSfFlags">16</int>
|
103
|
+
</object>
|
104
|
+
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
|
105
|
+
</object>
|
106
|
+
<object class="IBUILabel" id="544627895">
|
107
|
+
<reference key="NSNextResponder" ref="191373211"/>
|
108
|
+
<int key="NSvFlags">292</int>
|
109
|
+
<string key="NSFrame">{{32, 48}, {42, 21}}</string>
|
110
|
+
<reference key="NSSuperview" ref="191373211"/>
|
111
|
+
<reference key="NSWindow"/>
|
112
|
+
<reference key="NSNextKeyView" ref="671683200"/>
|
113
|
+
<string key="NSReuseIdentifierKey">_NS:9</string>
|
114
|
+
<bool key="IBUIOpaque">NO</bool>
|
115
|
+
<bool key="IBUIClipsSubviews">YES</bool>
|
116
|
+
<int key="IBUIContentMode">7</int>
|
117
|
+
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
118
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
119
|
+
<string key="IBUIText"/>
|
120
|
+
<object class="NSColor" key="IBUITextColor">
|
121
|
+
<int key="NSColorSpace">1</int>
|
122
|
+
<bytes key="NSRGB">MCAwIDAAA</bytes>
|
123
|
+
</object>
|
124
|
+
<nil key="IBUIHighlightedColor"/>
|
125
|
+
<int key="IBUIBaselineAdjustment">0</int>
|
126
|
+
<float key="IBUIMinimumFontSize">10</float>
|
127
|
+
<reference key="IBUIFontDescription" ref="628107554"/>
|
128
|
+
<reference key="IBUIFont" ref="267264194"/>
|
129
|
+
</object>
|
130
|
+
<object class="IBUIPickerView" id="313683017">
|
131
|
+
<reference key="NSNextResponder" ref="191373211"/>
|
132
|
+
<int key="NSvFlags">290</int>
|
133
|
+
<string key="NSFrame">{{20, 20}, {110, 216}}</string>
|
134
|
+
<reference key="NSSuperview" ref="191373211"/>
|
135
|
+
<reference key="NSWindow"/>
|
136
|
+
<reference key="NSNextKeyView" ref="544627895"/>
|
137
|
+
<string key="NSReuseIdentifierKey">_NS:9</string>
|
138
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
139
|
+
<bool key="IBUIShowsSelectionIndicator">YES</bool>
|
140
|
+
</object>
|
141
|
+
<object class="IBUIPickerView" id="463978271">
|
142
|
+
<reference key="NSNextResponder" ref="191373211"/>
|
143
|
+
<int key="NSvFlags">290</int>
|
144
|
+
<string key="NSFrame">{{190, 20}, {110, 216}}</string>
|
145
|
+
<reference key="NSSuperview" ref="191373211"/>
|
146
|
+
<reference key="NSWindow"/>
|
147
|
+
<reference key="NSNextKeyView" ref="557227880"/>
|
148
|
+
<string key="NSReuseIdentifierKey">_NS:9</string>
|
149
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
150
|
+
<bool key="IBUIShowsSelectionIndicator">YES</bool>
|
151
|
+
</object>
|
152
|
+
<object class="IBUITextField" id="557227880">
|
153
|
+
<reference key="NSNextResponder" ref="191373211"/>
|
154
|
+
<int key="NSvFlags">292</int>
|
155
|
+
<string key="NSFrame">{{112, 244}, {97, 31}}</string>
|
156
|
+
<reference key="NSSuperview" ref="191373211"/>
|
157
|
+
<reference key="NSWindow"/>
|
158
|
+
<reference key="NSNextKeyView" ref="278875700"/>
|
159
|
+
<string key="NSReuseIdentifierKey">_NS:9</string>
|
160
|
+
<bool key="IBUIOpaque">NO</bool>
|
161
|
+
<bool key="IBUIClipsSubviews">YES</bool>
|
162
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
163
|
+
<int key="IBUIContentVerticalAlignment">0</int>
|
164
|
+
<string key="IBUIText"/>
|
165
|
+
<int key="IBUIBorderStyle">3</int>
|
166
|
+
<string key="IBUIPlaceholder">Amount</string>
|
167
|
+
<object class="NSColor" key="IBUITextColor">
|
168
|
+
<int key="NSColorSpace">3</int>
|
169
|
+
<bytes key="NSWhite">MAA</bytes>
|
170
|
+
<object class="NSColorSpace" key="NSCustomColorSpace" id="348585157">
|
171
|
+
<int key="NSID">2</int>
|
172
|
+
</object>
|
173
|
+
</object>
|
174
|
+
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
|
175
|
+
<float key="IBUIMinimumFontSize">17</float>
|
176
|
+
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
|
177
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
178
|
+
</object>
|
179
|
+
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
180
|
+
<int key="type">1</int>
|
181
|
+
<double key="pointSize">14</double>
|
182
|
+
</object>
|
183
|
+
<object class="NSFont" key="IBUIFont">
|
184
|
+
<string key="NSName">Helvetica</string>
|
185
|
+
<double key="NSSize">14</double>
|
186
|
+
<int key="NSfFlags">16</int>
|
187
|
+
</object>
|
188
|
+
</object>
|
189
|
+
</array>
|
190
|
+
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
|
191
|
+
<reference key="NSSuperview"/>
|
192
|
+
<reference key="NSWindow"/>
|
193
|
+
<reference key="NSNextKeyView" ref="313683017"/>
|
194
|
+
<object class="NSColor" key="IBUIBackgroundColor">
|
195
|
+
<int key="NSColorSpace">3</int>
|
196
|
+
<bytes key="NSWhite">MQA</bytes>
|
197
|
+
<reference key="NSCustomColorSpace" ref="348585157"/>
|
198
|
+
</object>
|
199
|
+
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
200
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
201
|
+
</object>
|
202
|
+
</array>
|
203
|
+
<object class="IBObjectContainer" key="IBDocument.Objects">
|
204
|
+
<array class="NSMutableArray" key="connectionRecords">
|
205
|
+
<object class="IBConnectionRecord">
|
206
|
+
<object class="IBCocoaTouchOutletConnection" key="connection">
|
207
|
+
<string key="label">view</string>
|
208
|
+
<reference key="source" ref="372490531"/>
|
209
|
+
<reference key="destination" ref="191373211"/>
|
210
|
+
</object>
|
211
|
+
<int key="connectionID">3</int>
|
212
|
+
</object>
|
213
|
+
<object class="IBConnectionRecord">
|
214
|
+
<object class="IBCocoaTouchOutletConnection" key="connection">
|
215
|
+
<string key="label">outCurrencyPicker</string>
|
216
|
+
<reference key="source" ref="372490531"/>
|
217
|
+
<reference key="destination" ref="463978271"/>
|
218
|
+
</object>
|
219
|
+
<int key="connectionID">11</int>
|
220
|
+
</object>
|
221
|
+
<object class="IBConnectionRecord">
|
222
|
+
<object class="IBCocoaTouchOutletConnection" key="connection">
|
223
|
+
<string key="label">inCurrencyPicker</string>
|
224
|
+
<reference key="source" ref="372490531"/>
|
225
|
+
<reference key="destination" ref="313683017"/>
|
226
|
+
</object>
|
227
|
+
<int key="connectionID">12</int>
|
228
|
+
</object>
|
229
|
+
</array>
|
230
|
+
<object class="IBMutableOrderedSet" key="objectRecords">
|
231
|
+
<array key="orderedObjects">
|
232
|
+
<object class="IBObjectRecord">
|
233
|
+
<int key="objectID">0</int>
|
234
|
+
<array key="object" id="0"/>
|
235
|
+
<reference key="children" ref="1000"/>
|
236
|
+
<nil key="parent"/>
|
237
|
+
</object>
|
238
|
+
<object class="IBObjectRecord">
|
239
|
+
<int key="objectID">1</int>
|
240
|
+
<reference key="object" ref="191373211"/>
|
241
|
+
<array class="NSMutableArray" key="children">
|
242
|
+
<reference ref="278875700"/>
|
243
|
+
<reference ref="544627895"/>
|
244
|
+
<reference ref="313683017"/>
|
245
|
+
<reference ref="671683200"/>
|
246
|
+
<reference ref="463978271"/>
|
247
|
+
<reference ref="557227880"/>
|
248
|
+
</array>
|
249
|
+
<reference key="parent" ref="0"/>
|
250
|
+
</object>
|
251
|
+
<object class="IBObjectRecord">
|
252
|
+
<int key="objectID">-1</int>
|
253
|
+
<reference key="object" ref="372490531"/>
|
254
|
+
<reference key="parent" ref="0"/>
|
255
|
+
<string key="objectName">File's Owner</string>
|
256
|
+
</object>
|
257
|
+
<object class="IBObjectRecord">
|
258
|
+
<int key="objectID">-2</int>
|
259
|
+
<reference key="object" ref="975951072"/>
|
260
|
+
<reference key="parent" ref="0"/>
|
261
|
+
</object>
|
262
|
+
<object class="IBObjectRecord">
|
263
|
+
<int key="objectID">4</int>
|
264
|
+
<reference key="object" ref="278875700"/>
|
265
|
+
<reference key="parent" ref="191373211"/>
|
266
|
+
</object>
|
267
|
+
<object class="IBObjectRecord">
|
268
|
+
<int key="objectID">5</int>
|
269
|
+
<reference key="object" ref="544627895"/>
|
270
|
+
<reference key="parent" ref="191373211"/>
|
271
|
+
</object>
|
272
|
+
<object class="IBObjectRecord">
|
273
|
+
<int key="objectID">6</int>
|
274
|
+
<reference key="object" ref="313683017"/>
|
275
|
+
<reference key="parent" ref="191373211"/>
|
276
|
+
</object>
|
277
|
+
<object class="IBObjectRecord">
|
278
|
+
<int key="objectID">7</int>
|
279
|
+
<reference key="object" ref="671683200"/>
|
280
|
+
<reference key="parent" ref="191373211"/>
|
281
|
+
</object>
|
282
|
+
<object class="IBObjectRecord">
|
283
|
+
<int key="objectID">8</int>
|
284
|
+
<reference key="object" ref="463978271"/>
|
285
|
+
<reference key="parent" ref="191373211"/>
|
286
|
+
</object>
|
287
|
+
<object class="IBObjectRecord">
|
288
|
+
<int key="objectID">9</int>
|
289
|
+
<reference key="object" ref="557227880"/>
|
290
|
+
<reference key="parent" ref="191373211"/>
|
291
|
+
</object>
|
292
|
+
</array>
|
293
|
+
</object>
|
294
|
+
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
295
|
+
<string key="-1.CustomClassName">ConversionFormViewController</string>
|
296
|
+
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
297
|
+
<string key="-2.CustomClassName">UIResponder</string>
|
298
|
+
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
299
|
+
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
300
|
+
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
301
|
+
<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
302
|
+
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
303
|
+
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
304
|
+
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
305
|
+
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
306
|
+
</dictionary>
|
307
|
+
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
308
|
+
<nil key="activeLocalization"/>
|
309
|
+
<dictionary class="NSMutableDictionary" key="localizations"/>
|
310
|
+
<nil key="sourceID"/>
|
311
|
+
<int key="maxID">12</int>
|
312
|
+
</object>
|
313
|
+
<object class="IBClassDescriber" key="IBDocument.Classes">
|
314
|
+
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
315
|
+
<object class="IBPartialClassDescription">
|
316
|
+
<string key="className">BaseUIViewController</string>
|
317
|
+
<string key="superclassName">UIViewController</string>
|
318
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
319
|
+
<string key="majorKey">IBProjectSource</string>
|
320
|
+
<string key="minorKey">./Classes/BaseUIViewController.h</string>
|
321
|
+
</object>
|
322
|
+
</object>
|
323
|
+
<object class="IBPartialClassDescription">
|
324
|
+
<string key="className">ConversionFormViewController</string>
|
325
|
+
<string key="superclassName">BaseUIViewController</string>
|
326
|
+
<dictionary class="NSMutableDictionary" key="outlets">
|
327
|
+
<string key="inCurrencyPicker">UIPickerView</string>
|
328
|
+
<string key="outCurrencyPicker">UIPickerView</string>
|
329
|
+
</dictionary>
|
330
|
+
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
331
|
+
<object class="IBToOneOutletInfo" key="inCurrencyPicker">
|
332
|
+
<string key="name">inCurrencyPicker</string>
|
333
|
+
<string key="candidateClassName">UIPickerView</string>
|
334
|
+
</object>
|
335
|
+
<object class="IBToOneOutletInfo" key="outCurrencyPicker">
|
336
|
+
<string key="name">outCurrencyPicker</string>
|
337
|
+
<string key="candidateClassName">UIPickerView</string>
|
338
|
+
</object>
|
339
|
+
</dictionary>
|
340
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
341
|
+
<string key="majorKey">IBProjectSource</string>
|
342
|
+
<string key="minorKey">./Classes/ConversionFormViewController.h</string>
|
343
|
+
</object>
|
344
|
+
</object>
|
345
|
+
</array>
|
346
|
+
</object>
|
347
|
+
<int key="IBDocument.localizationMode">0</int>
|
348
|
+
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
349
|
+
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
350
|
+
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
351
|
+
<real value="1296" key="NS.object.0"/>
|
352
|
+
</object>
|
353
|
+
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
354
|
+
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
355
|
+
<string key="IBCocoaTouchPluginVersion">1181</string>
|
356
|
+
</data>
|
357
|
+
</archive>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#import "Kiwi.h"
|
2
|
+
#import "AJAXConnection.h"
|
3
|
+
|
4
|
+
SPEC_BEGIN(AJAXConnectionSpec)
|
5
|
+
|
6
|
+
describe(@"AJAXConnection", ^{
|
7
|
+
pending(@"should set request type", ^{
|
8
|
+
id urlConnection = [NSURLConnection mock];
|
9
|
+
id navController = [UINavigationController mock];
|
10
|
+
|
11
|
+
NSString *connectionMethod = @"GET";
|
12
|
+
NSString *connectionURL = @"http://example.com";
|
13
|
+
AJAXConnection *connection = [[AJAXConnection alloc] initWithRequestId:@"testRequest" url:connectionURL root:navController];
|
14
|
+
|
15
|
+
[connection setHttpMethod:connectionMethod];
|
16
|
+
|
17
|
+
[connection execute];
|
18
|
+
});
|
19
|
+
});
|
20
|
+
|
21
|
+
SPEC_END
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>${EXECUTABLE_NAME}</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>com.thoughtworks.${PRODUCT_NAME:rfc1034identifier}</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundlePackageType</key>
|
14
|
+
<string>BNDL</string>
|
15
|
+
<key>CFBundleShortVersionString</key>
|
16
|
+
<string>1.0</string>
|
17
|
+
<key>CFBundleSignature</key>
|
18
|
+
<string>????</string>
|
19
|
+
<key>CFBundleVersion</key>
|
20
|
+
<string>1</string>
|
21
|
+
</dict>
|
22
|
+
</plist>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#import "Kiwi.h"
|
2
|
+
#import "TWBridgePageRegistry.h"
|
3
|
+
|
4
|
+
SPEC_BEGIN(TWBridgePageRegistryTest)
|
5
|
+
describe(@"TWBridgePageRegistry", ^{
|
6
|
+
it(@"should provide a shared instance", ^{
|
7
|
+
id sharedRegistry = [TWBridgePageRegistry sharedRegistry];
|
8
|
+
|
9
|
+
[[sharedRegistry shouldNot] beNil];
|
10
|
+
|
11
|
+
[[[TWBridgePageRegistry sharedRegistry] should] equal:sharedRegistry];
|
12
|
+
});
|
13
|
+
});
|
14
|
+
|
15
|
+
SPEC_END
|
@@ -0,0 +1 @@
|
|
1
|
+
/public/*
|