Skip to content

Commit

Permalink
Merge branch 'master' of github.com:typhoon-framework/Typhoon
Browse files Browse the repository at this point in the history
Conflicts:
	Source/Factory/Block/TyphoonAssemblyAdviser.m
	Tests/Factory/Block/BlockComponentFactory/TyphoonBlockComponentFactory_CollectionTests.m
  • Loading branch information
rhgills committed Jan 1, 2014
2 parents c9b9d28 + dae4289 commit 05703a6
Show file tree
Hide file tree
Showing 136 changed files with 23,856 additions and 2,676 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ profile
*.moved-aside
DerivedData

Tests/Pods/Pods.xcodeproj/project.pbxproj

# Xcode-Dacted
*.xccheckout



.DS_Store

# AppCode
Expand Down
2 changes: 1 addition & 1 deletion .scripts/pod-update-checksum.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9b10aefd433c20fdfb09cfb9fe90472a6f5d8d19
d2e50f799258d2a9e04259ac76a4e65863c9d4c6
28 changes: 15 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (3.2.15)
activesupport (3.2.16)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
celluloid (0.15.2)
timers (~> 1.1.0)
claide (0.4.0)
cocoapods (0.28.0)
cocoapods (0.29.0)
activesupport (>= 3.2.15, < 4)
claide (~> 0.4.0)
cocoapods-core (= 0.28.0)
cocoapods-downloader (~> 0.2.0)
cocoapods-core (= 0.29.0)
cocoapods-downloader (~> 0.3.0)
cocoapods-try-release-fix (~> 0.1.1)
colored (~> 1.2)
escape (~> 0.0.4)
json_pure (~> 1.8)
nap (~> 0.5)
open4 (~> 1.3)
xcodeproj (~> 0.14.1)
cocoapods-core (0.28.0)
cocoapods-core (0.29.0)
activesupport (>= 3.2.15, < 4)
fuzzy_match (~> 2.0.4)
json (~> 1.8)
json_pure (~> 1.8)
nap (~> 0.5)
cocoapods-downloader (0.2.0)
cocoapods-downloader (0.3.0)
cocoapods-try-release-fix (0.1.1)
coderay (1.1.0)
colored (1.2)
escape (0.0.4)
Expand All @@ -38,10 +41,9 @@ GEM
guard-bundler (2.0.0)
bundler (~> 1.0)
guard (~> 2.2)
guard-shell (0.5.2)
guard-shell (0.6.0)
guard (>= 1.1.0)
i18n (0.6.5)
json (1.8.1)
i18n (0.6.9)
json_pure (1.8.1)
listen (2.4.0)
celluloid (>= 0.15.2)
Expand All @@ -56,8 +58,8 @@ GEM
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
rake (10.1.0)
rb-fsevent (0.9.3)
rake (10.1.1)
rb-fsevent (0.9.4)
rb-inotify (0.9.3)
ffi (>= 0.5.0)
slop (3.4.7)
Expand All @@ -68,7 +70,7 @@ GEM
activesupport (~> 3.0)
colored (~> 1.2)
rake
xcpretty (0.0.6)
xcpretty (0.0.9)

PLATFORMS
ruby
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Test Failures typically indicate a bug that has been flagged, but not yet fixed.

# Core Team

* <a href="http://ph.linkedin.com/pub/jasper-blues/8/163/778">Jasper Blues</a> - <a href="mailto:[email protected]?Subject=Typhoon">[email protected]</a>
* <a href="http://ph.linkedin.com/pub/jasper-blues/8/163/778">Jasper Blues</a> (Instigator and Project Lead) - <a href="mailto:[email protected]?Subject=Typhoon">[email protected]</a>
* <a href="https://github.com/rhgills">Robert Gilliam</a> - <a href="mailto:[email protected]?Subject=Typhoon">[email protected]</a>
* <a href="https://github.com/drodriguez">Daniel Rodríguez Troitiño</a>
* <a href="https://github.com/eriksundin">Erik Sundin</a>
Expand All @@ -216,7 +216,7 @@ is not the same as heavy.

# Apps Using Typhoon

In the months since release, there have been scores app built with Typhoon. Here are some of them:
Here's a few apps built with Typhoon:

* Mod Productions' ACO Virtual <a href="http://vimeo.com/75451558">iPad controller</a> and <a href="https://itunes.apple.com/au/app/aco-virtual/id623225640?mt=8">companion AR app.</a> (Awarded ***AppStore Best New Apps***).
* <a href="http://itunes.com/apps/GonnaGo">GonnaGo</a> - a social travel app.
Expand Down
2 changes: 1 addition & 1 deletion Scripts/typhoon-docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body {
font-weight: 400;
font-style: normal;
font-size: 13px;
line-height: 1;
line-height: 1.4;
color: #48494b;
position: relative;
-webkit-font-smoothing: antialiased;
Expand Down
115 changes: 114 additions & 1 deletion Source/Definition/Initializer/TyphoonInitializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ typedef enum
SEL _selector;
}

/**
* The selector used to initialize the component.
*/
@property(nonatomic) SEL selector;

- (id)initWithSelector:(SEL)initializer;
Expand All @@ -58,24 +61,134 @@ typedef enum
/* ====================================================================================================================================== */
#pragma mark - Block assembly

/**
* Injects with the given definition.
*/
- (void)injectWithDefinition:(TyphoonDefinition*)definition;

/**
* Injects with the value represented by the given text. The text will be used to create an instance of a class matching the
* required type.
*
* @see TyphoonTypeConverterRegistry for details on declaring your own type converters.
*/
- (void)injectWithValueAsText:(NSString*)text;

/**
* Injects with the value represented by the given text. The text will be used to create an instance of the given requiredType.
*/
- (void)injectWithValueAsText:(NSString*)text requiredTypeOrNil:(id)requiredTypeOrNil;

/**
* Injects with an object instance.
*/
- (void)injectWithObject:(id)value;

/**
* Injects with a collection of the given type.
*/
- (void)injectWithCollection:(void (^)(TyphoonParameterInjectedAsCollection*))collectionValues requiredType:(id)requiredType;

/**
* Injects with an int.
*/
- (void)injectWithInt:(int)intValue;

/**
* Injects with an unsigned int.
*/
- (void)injectWithUnsignedInt:(unsigned int)unsignedIntValue;

/**
* Injects with a short.
*/
- (void)injectWithShort:(short)shortValue;

/**
* Injects with an unsigned short.
*/
- (void)injectWithUnsignedShort:(unsigned short)unsignedShortValue;

/**
* Injects with a long.
*/
- (void)injectWithLong:(long)longValue;

/**
* Injects with an unsigned long.
*/
- (void)injectWithUnsignedLong:(unsigned long)unsignedLongValue;

/**
* Injects with a long long.
*/
- (void)injectWithLongLong:(long long)longLongValue;

/**
* Injects with an unsigned long long.
*/
- (void)injectWithUnsignedLongLong:(unsigned long long)unsignedLongLongValue;

/**
* Injects with an unsigned char.
*/
- (void)injectWithUnsignedChar:(unsigned char)unsignedCharValue;

/**
* Injects with a float.
*/
- (void)injectWithFloat:(float)floatValue;

/**
* Injects with a double.
*/
- (void)injectWithDouble:(double)doubleValue;

/**
* Injects with a boolean.
*/
- (void)injectWithBool:(BOOL)boolValue;

/**
* Injects with an integer.
*/
- (void)injectWithInteger:(NSInteger)integerValue;

/**
* Injects with an unsigned integer.
*/
- (void)injectWithUnsignedInteger:(NSUInteger)unsignedIntegerValue;

/**
* Injects with a class.
*/
- (void)injectWithClass:(Class)classValue;

/**
* Injects with a selector.
*/
- (void)injectWithSelector:(SEL)selectorValue;

/**
* Injects the parameter matched by the given name with the given definition.
*/
- (void)injectParameterNamed:(NSString*)name withDefinition:(TyphoonDefinition*)definition;

- (void)injectParameterAtIndex:(NSUInteger)index1 withDefinition:(TyphoonDefinition*)definition;
/**
* Injects the parameter at the given index with the given definition.
*/
- (void)injectParameterAtIndex:(NSUInteger)index withDefinition:(TyphoonDefinition*)definition;

/**
* Injects the parameter at the given index as a collection of the given requiredType.
*/
- (void)injectParameterAtIndex:(NSUInteger)index
asCollection:(void (^)(TyphoonParameterInjectedAsCollection*))collectionValues
requiredType:(id)requiredType;

/**
* Injects the parameter matched by the given name as a collection of the given requiredType.
*/
- (void)injectParameterNamed:(NSString*)name
asCollection:(void (^)(TyphoonParameterInjectedAsCollection*))collectionValues
requiredType:(id)requiredType;
Expand Down
80 changes: 80 additions & 0 deletions Source/Definition/Initializer/TyphoonInitializer.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,86 @@ - (void)injectWithCollection:(void (^)(TyphoonParameterInjectedAsCollection*))co
[self injectParameterAtIndex:[_injectedParameters count] asCollection:collectionValues requiredType:requiredType];
}

- (void)injectWithInt:(int)intValue
{
[self injectWithValueAsText:[@(intValue) stringValue]];
}

- (void)injectWithUnsignedInt:(unsigned int)unsignedIntValue
{
[self injectWithValueAsText:[@(unsignedIntValue) stringValue]];
}

- (void)injectWithShort:(short)shortValue
{
[self injectWithValueAsText:[@(shortValue) stringValue]];
}

- (void)injectWithUnsignedShort:(unsigned short)unsignedShortValue
{
[self injectWithValueAsText:[@(unsignedShortValue) stringValue]];
}

- (void)injectWithLong:(long)longValue
{
[self injectWithValueAsText:[@(longValue) stringValue]];
}

- (void)injectWithUnsignedLong:(unsigned long)unsignedLongValue
{
[self injectWithValueAsText:[@(unsignedLongValue) stringValue]];
}

- (void)injectWithLongLong:(long long)longLongValue
{
[self injectWithValueAsText:[@(longLongValue) stringValue]];
}

- (void)injectWithUnsignedLongLong:(unsigned long long)unsignedLongLongValue
{
[self injectWithValueAsText:[@(unsignedLongLongValue) stringValue]];
}

- (void)injectWithUnsignedChar:(unsigned char)unsignedCharValue
{
[self injectWithValueAsText:[@(unsignedCharValue) stringValue]];
}

- (void)injectWithFloat:(float)floatValue
{
[self injectWithValueAsText:[NSString stringWithFormat:@"%f", floatValue]];
}

- (void)injectWithDouble:(double)doubleValue
{
[self injectWithValueAsText:[NSString stringWithFormat:@"%f", doubleValue]];
}

- (void)injectWithBool:(BOOL)boolValue
{
[self injectWithValueAsText:[@(boolValue) stringValue]];
}

- (void)injectWithInteger:(NSInteger)integerValue
{
[self injectWithValueAsText:[@(integerValue) stringValue]];
}

- (void)injectWithUnsignedInteger:(NSUInteger)unsignedIntegerValue
{
[self injectWithValueAsText:[@(unsignedIntegerValue) stringValue]];
}

- (void)injectWithClass:(Class)classValue
{
[self injectWithValueAsText:NSStringFromClass(classValue)];
}

- (void)injectWithSelector:(SEL)selectorValue
{
[self injectWithValueAsText:NSStringFromSelector(selectorValue)];
}

/* ====================================================================================================================================== */
#pragma mark - Block assembly

Expand Down
Loading

0 comments on commit 05703a6

Please sign in to comment.