xcfit 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/.swift-version +1 -0
  3. data/.travis.yml +13 -13
  4. data/README.md +57 -35
  5. data/XCFit.podspec +6 -16
  6. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +14 -12
  7. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +16 -15
  8. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +11 -11
  9. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +5 -5
  10. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +9 -8
  11. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +7 -6
  12. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +7 -5
  13. data/XCFit_Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +10 -8
  14. data/homebrew/xcfit +155 -0
  15. data/lib/XCFit/version.rb +1 -1
  16. metadata +15 -177
  17. data/XCFit/Classes/.gitkeep +0 -0
  18. data/XCFit/Classes/CliSwift.swift +0 -87
  19. data/XCFit/Classes/CopyDir.swift +0 -26
  20. data/XCFit/Classes/Cucumberish/Core/CCIBlockDefinitions.h +0 -400
  21. data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.h +0 -72
  22. data/XCFit/Classes/Cucumberish/Core/Managers/CCIFeaturesManager.m +0 -141
  23. data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.h +0 -51
  24. data/XCFit/Classes/Cucumberish/Core/Managers/CCIStepsManager.m +0 -245
  25. data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.h +0 -62
  26. data/XCFit/Classes/Cucumberish/Core/Models/CCIArgument.m +0 -117
  27. data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.h +0 -37
  28. data/XCFit/Classes/Cucumberish/Core/Models/CCIAroundHock.m +0 -37
  29. data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.h +0 -46
  30. data/XCFit/Classes/Cucumberish/Core/Models/CCIBackground.m +0 -117
  31. data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.h +0 -89
  32. data/XCFit/Classes/Cucumberish/Core/Models/CCIExample.m +0 -128
  33. data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.h +0 -49
  34. data/XCFit/Classes/Cucumberish/Core/Models/CCIFeature.m +0 -174
  35. data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.h +0 -36
  36. data/XCFit/Classes/Cucumberish/Core/Models/CCIHock.m +0 -34
  37. data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.h +0 -61
  38. data/XCFit/Classes/Cucumberish/Core/Models/CCILocation.m +0 -91
  39. data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.h +0 -97
  40. data/XCFit/Classes/Cucumberish/Core/Models/CCIScenarioDefinition.m +0 -224
  41. data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.h +0 -85
  42. data/XCFit/Classes/Cucumberish/Core/Models/CCIStep.m +0 -98
  43. data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.h +0 -43
  44. data/XCFit/Classes/Cucumberish/Core/Models/CCIStepDefinition.m +0 -65
  45. data/XCFit/Classes/Cucumberish/Cucumberish.h +0 -133
  46. data/XCFit/Classes/Cucumberish/Cucumberish.m +0 -604
  47. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.h +0 -15
  48. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstBuilder.m +0 -312
  49. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.h +0 -20
  50. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHAstNode.m +0 -79
  51. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.h +0 -12
  52. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHBackground.m +0 -18
  53. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.h +0 -11
  54. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHComment.m +0 -27
  55. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.h +0 -14
  56. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDataTable.m +0 -30
  57. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.h +0 -14
  58. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHDocString.m +0 -29
  59. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.h +0 -24
  60. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHExamples.m +0 -49
  61. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.h +0 -24
  62. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHFeature.m +0 -50
  63. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.h +0 -25
  64. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialect.m +0 -64
  65. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.h +0 -9
  66. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProvider.m +0 -124
  67. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinDialectProviderProtocol.h +0 -10
  68. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.h +0 -9
  69. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageConstants.m +0 -10
  70. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.h +0 -17
  71. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLanguageSetting.m +0 -18
  72. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.h +0 -12
  73. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLine.m +0 -179
  74. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineProtocol.h +0 -64
  75. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.h +0 -9
  76. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHGherkinLineSpan.m +0 -26
  77. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasDescriptionProtocol.h +0 -8
  78. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasLocationProtocol.h +0 -8
  79. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasRowsProtocol.h +0 -8
  80. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasStepsProtocol.h +0 -8
  81. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHHasTagsProtocol.h +0 -8
  82. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.h +0 -12
  83. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHLocation.m +0 -41
  84. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.h +0 -4
  85. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHNode.m +0 -5
  86. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.h +0 -10
  87. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser+Extensions.m +0 -18
  88. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.h +0 -132
  89. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParser.m +0 -2735
  90. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.h +0 -55
  91. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHParserException.m +0 -192
  92. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.h +0 -14
  93. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenario.m +0 -18
  94. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.h +0 -23
  95. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition.m +0 -41
  96. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioDefinition_Private.h +0 -6
  97. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.h +0 -15
  98. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHScenarioOutline.m +0 -26
  99. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.h +0 -16
  100. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStep.m +0 -35
  101. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.h +0 -4
  102. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHStepArgument.m +0 -5
  103. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.h +0 -13
  104. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableCell.m +0 -28
  105. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.h +0 -13
  106. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTableRow.m +0 -29
  107. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.h +0 -13
  108. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTag.m +0 -28
  109. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.h +0 -26
  110. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHToken.m +0 -50
  111. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.h +0 -29
  112. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenMatcher.m +0 -283
  113. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.h +0 -12
  114. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/GHTokenScanner.m +0 -59
  115. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.h +0 -7
  116. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/NSString+Trim.m +0 -28
  117. data/XCFit/Classes/Cucumberish/Dependencies/Gherkin/gherkin-languages.json +0 -2969
  118. data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.h +0 -24
  119. data/XCFit/Classes/Cucumberish/Utils/NSArray+Hashes.m +0 -44
  120. data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.h +0 -7
  121. data/XCFit/Classes/Cucumberish/Utils/NSObject+Dictionary.m +0 -83
  122. data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.h +0 -32
  123. data/XCFit/Classes/Cucumberish/Utils/NSString+Formatter.m +0 -70
  124. data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
  125. data/XCFit_Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
  126. data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
  127. data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
  128. data/XCFit_Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
  129. data/XCFit_Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
  130. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
  131. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -134
  132. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -17
  133. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -13
  134. data/Xcode7-Templates/XCFit/Base Acceptance Testing Bundle.xctemplate/___POD_NAME___.m +0 -25
  135. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/AcceptanceTests-Bridging-Header.h +0 -1
  136. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift +0 -35
  137. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/SlimTables.h +0 -28
  138. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/TemplateInfo.plist +0 -155
  139. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -12
  140. data/Xcode7-Templates/XCFit/Base Acceptance Tests.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -33
  141. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/BaseScreen.swift +0 -41
  142. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/CommonStepDefinitions.swift +0 -92
  143. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Extensions.swift +0 -58
  144. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
  145. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/HomeScreenSteps.swift +0 -28
  146. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/Hooks.swift +0 -26
  147. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
  148. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
  149. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/TemplateInfo.plist +0 -159
  150. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___-Bridging-Header.h +0 -15
  151. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.h +0 -23
  152. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.m +0 -28
  153. data/Xcode7-Templates/XCFit/Cucumberish UI Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___.swift +0 -37
  154. data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateIcon.icns +0 -0
  155. data/Xcode7-Templates/XCFit/Mac Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
  156. data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/Empty.xib +0 -12
  157. data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateIcon.icns +0 -0
  158. data/Xcode7-Templates/XCFit/Mac Acceptance Tests.xctemplate/TemplateInfo.plist +0 -61
  159. data/Xcode7-Templates/XCFit/MacOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
  160. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/BaseScreen.swift +0 -42
  161. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/Extensions.swift +0 -60
  162. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeElements.swift +0 -31
  163. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeProtocol.swift +0 -25
  164. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreen.swift +0 -24
  165. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/HomeScreenTest.swift +0 -30
  166. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/ProtocolOrientedTest.swift +0 -45
  167. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon.png +0 -0
  168. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateIcon@2x.png +0 -0
  169. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/TemplateInfo.plist +0 -141
  170. data/Xcode7-Templates/XCFit/XCUI POM Test Bundle Base.xctemplate/___PACKAGENAMEASIDENTIFIER___TestBase.swift +0 -30
  171. data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon-old.icns +0 -0
  172. data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon.png +0 -0
  173. data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateIcon@2x.png +0 -0
  174. data/Xcode7-Templates/XCFit/iOS Acceptance Testing Bundle.xctemplate/TemplateInfo.plist +0 -40
  175. data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon-old.icns +0 -0
  176. data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon.png +0 -0
  177. data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateIcon@2x.png +0 -0
  178. data/Xcode7-Templates/XCFit/iOS Acceptance Tests.xctemplate/TemplateInfo.plist +0 -59
  179. data/Xcode7-Templates/XCFit/iOS UI Cucumberish Testing Bundle.xctemplate/TemplateInfo.plist +0 -39
  180. data/Xcode7-Templates/XCFit/iOS XCUI POM Test Bundle.xctemplate/TemplateInfo.plist +0 -39
@@ -1,24 +0,0 @@
1
- //
2
- // NSArray+Hashes.h
3
- // CucumberishExample
4
- //
5
- // Created by David Siebecker on 7/26/16.
6
- // Copyright © 2016 Ahmed Ali. All rights reserved.
7
- //
8
-
9
- #import <Foundation/Foundation.h>
10
-
11
- @interface NSArray (Hashes)
12
- /**
13
- * Converts an NSArray<NSArray> to an array of dictionaries where the keys for the dictionary are the elements in the first array in self
14
- * @return the row hashes
15
- */
16
- -(NSArray*)rowHashes;
17
-
18
- /**
19
- * Converts an NSArray<NSArray> to an array of dictionaries where the kesy for the dictionary are the first elements in each array in self
20
- * @return the column hashes
21
- */
22
- -(NSArray*)columnHashes;
23
-
24
- @end
@@ -1,44 +0,0 @@
1
- //
2
- // NSArray+Hashes.m
3
- // CucumberishExample
4
- //
5
- // Created by David Siebecker on 7/26/16.
6
- // Copyright © 2016 Ahmed Ali. All rights reserved.
7
- //
8
-
9
- #import "NSArray+Hashes.h"
10
-
11
- @implementation NSArray (Hashes)
12
-
13
- -(NSArray *)rowHashes
14
- {
15
- NSMutableArray *array = [NSMutableArray arrayWithCapacity:self.count];
16
- NSArray *keys = self[0];
17
- for (NSInteger i = 1; i < self.count; i++) {
18
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
19
- NSArray *values = self[i];
20
- [keys enumerateObjectsUsingBlock:^(NSString * _Nonnull key, NSUInteger idx, BOOL * _Nonnull stop) {
21
- dict[key] = values[idx];
22
- }];
23
- [array addObject:dict];
24
- }
25
- return array;
26
- }
27
-
28
- -(NSArray *)columnHashes
29
- {
30
- NSMutableArray *array = [NSMutableArray arrayWithCapacity:[self[0] count]-1];
31
- NSArray *keys = [self valueForKey:@"firstObject"];
32
- for (NSInteger i = 0; i < keys.count; i++) {
33
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
34
- [self enumerateObjectsUsingBlock:^(NSString * _Nonnull key, NSUInteger idx, BOOL * _Nonnull stop) {
35
- if (idx != 0) {
36
- dict[key] = self[i][idx];
37
- }
38
- }];
39
- [array addObject:dict];
40
- }
41
- return array;
42
- }
43
-
44
- @end
@@ -1,7 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
- @interface NSObject (Dictionary)
4
-
5
- - (NSDictionary *)dictionary;
6
-
7
- @end
@@ -1,83 +0,0 @@
1
- #import "NSObject+Dictionary.h"
2
-
3
- #import "GHHasLocationProtocol.h"
4
-
5
- #import <objc/runtime.h>
6
-
7
- @implementation NSObject (Dictionary)
8
-
9
- static NSDateFormatter * dateFormatter;
10
-
11
- + (NSDateFormatter *)dateFormatter
12
- {
13
- if (!dateFormatter)
14
- {
15
- dateFormatter = [[NSDateFormatter alloc] init];
16
- [dateFormatter setDateFormat: @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"];
17
- [dateFormatter setLocale: [[NSLocale alloc] initWithLocaleIdentifier: @"en_US_POSIX"]];
18
- }
19
- return dateFormatter;
20
- }
21
-
22
- - (NSDictionary *)dictionary
23
- {
24
- NSMutableDictionary * dictionary = [[NSMutableDictionary alloc] init];
25
-
26
- unsigned int count;
27
- Class currentClass = [self class];
28
- while (currentClass != [NSObject class])
29
- {
30
- Ivar * ivars = class_copyIvarList(currentClass, &count);
31
-
32
- for (int i = 0; i < count; i++)
33
- {
34
- NSString * propertyName = [NSString stringWithUTF8String:ivar_getName(ivars[i])];
35
- id object = [self valueForKey: propertyName];
36
-
37
- // Ugly fix to replace "desc" properties by "description" because the ToString() method is named "description" in ObjC...
38
- if ([propertyName isEqualToString: @"desc"])
39
- propertyName = @"description";
40
-
41
- if (object)
42
- {
43
- if ([object isKindOfClass:[NSArray class]] || [object isKindOfClass:[NSSet class]])
44
- {
45
- NSMutableArray * subObjectsBuffer = [[NSMutableArray alloc] init];
46
- for (NSObject * subObject in object)
47
- {
48
- [subObjectsBuffer addObject: [subObject dictionary]];
49
- }
50
- dictionary[propertyName] = [[NSArray alloc] initWithArray: subObjectsBuffer];
51
- }
52
- else if ([object isKindOfClass:[NSDictionary class]])
53
- {
54
- NSMutableDictionary * subObjectsBuffer = [[NSMutableDictionary alloc] init];
55
- for (id key in object)
56
- {
57
- NSObject * subObject = [object objectForKey: key];
58
- [subObjectsBuffer setObject: [subObject dictionary] forKey: key];
59
- }
60
- dictionary[propertyName] = [[NSDictionary alloc] initWithDictionary: subObjectsBuffer];
61
- }
62
- else if ([object isKindOfClass:[NSString class]] || [object isKindOfClass:[NSNumber class]])
63
- dictionary[propertyName] = object;
64
- else if ([object isKindOfClass:[NSDate class]])
65
- dictionary[propertyName] = [[NSObject dateFormatter] stringFromDate:(NSDate *) object];
66
- else if ([object isKindOfClass: [NSObject class]])
67
- dictionary[propertyName] = [object dictionary];
68
- }
69
-
70
- }
71
-
72
- free(ivars);
73
- currentClass = class_getSuperclass(currentClass);
74
- }
75
-
76
- // Add type based on class name to the dictionary
77
- if ([[self class] conformsToProtocol: @protocol(GHHasLocationProtocol)])
78
- [dictionary setObject: [NSStringFromClass([self class]) stringByReplacingOccurrencesOfString: @"GH" withString: @""] forKey: @"type"];
79
-
80
- return dictionary;
81
- }
82
-
83
- @end
@@ -1,32 +0,0 @@
1
- //
2
- // NSString+Formatter.h
3
- //
4
- // Created by Ahmed Ali on 11/01/16.
5
- // Copyright © 2016 Ahmed Ali. All rights reserved.
6
- //
7
- //
8
- // Permission is hereby granted, free of charge, to any person obtaining a copy
9
- // of this software and associated documentation files (the "Software"), to deal
10
- // in the Software without restriction, including without limitation the rights
11
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- // copies of the Software, and to permit persons to whom the Software is
13
- // furnished to do so, subject to the following conditions:
14
- //
15
- // The above copyright notice and this permission notice shall be included in
16
- // all copies or substantial portions of the Software.
17
- //
18
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
- // THE SOFTWARE.
25
-
26
- #import <Foundation/Foundation.h>
27
-
28
- @interface NSString (Formatter)
29
-
30
- - (NSString *)camleCaseStringWithFirstUppercaseCharacter:(BOOL)firstUppercaseCharacter;
31
-
32
- @end
@@ -1,70 +0,0 @@
1
- //
2
- // NSString+Formatter.m
3
-
4
- // Created by Ahmed Ali on 11/01/16.
5
- // Copyright © 2016 Ahmed Ali. All rights reserved.
6
- //
7
- //
8
- // Permission is hereby granted, free of charge, to any person obtaining a copy
9
- // of this software and associated documentation files (the "Software"), to deal
10
- // in the Software without restriction, including without limitation the rights
11
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- // copies of the Software, and to permit persons to whom the Software is
13
- // furnished to do so, subject to the following conditions:
14
- //
15
- // The above copyright notice and this permission notice shall be included in
16
- // all copies or substantial portions of the Software.
17
- //
18
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
- // THE SOFTWARE.
25
-
26
- #import "NSString+Formatter.h"
27
-
28
- @implementation NSString (Formatter)
29
- - (NSString *)camleCaseStringWithFirstUppercaseCharacter:(BOOL)firstUppercaseCharacter
30
- {
31
- static NSString * sep = @"AASSAAAKKKAALLLAL";
32
- NSString * str = [[self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] stringByReplacingOccurrencesOfString:@" " withString:sep];
33
- str = [str stringByReplacingCharactersInSet:[[NSCharacterSet alphanumericCharacterSet] invertedSet] withString:@""];
34
- str = [str stringByReplacingOccurrencesOfString:sep withString:@"_"];
35
- NSMutableString * output = [NSMutableString string];
36
- BOOL makeNextCharacterInUpperCase = firstUppercaseCharacter;
37
- for (int i = 0; i < str.length; i++) {
38
-
39
- NSString * substr = [str substringWithRange:NSMakeRange(i, 1)];
40
- if(i == 0 && !makeNextCharacterInUpperCase){
41
- substr = [substr lowercaseString];
42
- }
43
- if([substr isEqualToString:@"_"]){
44
- makeNextCharacterInUpperCase = YES;
45
- continue;
46
- }else if(makeNextCharacterInUpperCase){
47
- substr = [substr uppercaseString];
48
-
49
- }
50
- [output appendString:substr];
51
- makeNextCharacterInUpperCase = NO;
52
- }
53
-
54
- return output;
55
- }
56
-
57
- - (NSString *)stringByReplacingCharactersInSet:(NSCharacterSet *)charSet withString:(NSString *)aString {
58
- NSMutableString *s = [NSMutableString stringWithCapacity:self.length];
59
- for (NSUInteger i = 0; i < self.length; ++i) {
60
- unichar c = [self characterAtIndex:i];
61
- if (![charSet characterIsMember:c]) {
62
- [s appendFormat:@"%C", c];
63
- } else {
64
- [s appendString:aString];
65
- }
66
- }
67
- return s;
68
- }
69
-
70
- @end
@@ -1,40 +0,0 @@
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>Macros</key>
6
- <dict>
7
- <key>POD_PLATFORM_IDENTIFIER</key>
8
- <string>osx, 10.8</string>
9
- </dict>
10
- <key>Kind</key>
11
- <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
12
- <key>Identifier</key>
13
- <string>io.cleankit.macAcceptanceTestsUnitTestBundle</string>
14
- <key>Name</key>
15
- <string>Acceptance Unit Test Bundle</string>
16
- <key>Description</key>
17
- <string>This target builds an OS X unit test bundle that generates results from your Acceptance Tests target using Fitnesse and then reports them within Xcode using the XCTest framework.</string>
18
- <key>Concrete</key>
19
- <true/>
20
- <key>Platforms</key>
21
- <array>
22
- <string>com.apple.platform.macosx</string>
23
- </array>
24
- <key>Ancestors</key>
25
- <array>
26
- <string>com.apple.dt.unit.osxBase</string>
27
- <string>io.cleankit.baseAcceptanceTestsUnitTestBundle</string>
28
- </array>
29
- <key>Targets</key>
30
- <array>
31
- <dict>
32
- <key>SharedSettings</key>
33
- <dict>
34
- <key>LD_RUNPATH_SEARCH_PATHS</key>
35
- <string>$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks</string>
36
- </dict>
37
- </dict>
38
- </array>
39
- </dict>
40
- </plist>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
3
- <dependencies>
4
- <deployment identifier="macosx"/>
5
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/>
6
- </dependencies>
7
- <objects>
8
- <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/>
9
- <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
10
- <customObject id="-3" userLabel="Application" customClass="NSObject"/>
11
- </objects>
12
- </document>
@@ -1,61 +0,0 @@
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>Macros</key>
6
- <dict>
7
- <key>POD_PLATFORM_IDENTIFIER</key>
8
- <string>osx</string>
9
- </dict>
10
- <key>Name</key>
11
- <string>Acceptance Tests</string>
12
- <key>Kind</key>
13
- <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
14
- <key>Identifier</key>
15
- <string>io.cleankit.macAcceptanceTests</string>
16
- <key>Description</key>
17
- <string>This target builds an OS X Application for Acceptance Testing your App using the Fitnesse framework. Requires a project that uses CocoaPods.</string>
18
- <key>Ancestors</key>
19
- <array>
20
- <string>io.cleankit.baseAcceptanceTests</string>
21
- <string>com.apple.dt.unit.osxBase</string>
22
- </array>
23
- <key>Concrete</key>
24
- <true/>
25
- <key>Targets</key>
26
- <array>
27
- <dict>
28
- <key>SharedSettings</key>
29
- <dict>
30
- <key>LD_RUNPATH_SEARCH_PATHS</key>
31
- <string>$(inherited) @executable_path/../Frameworks</string>
32
- </dict>
33
- </dict>
34
- </array>
35
- <key>Nodes</key>
36
- <array>
37
- <string>Info.plist:MainNib</string>
38
- <string>Info.plist:PrincipalClass</string>
39
- <string>Empty.xib</string>
40
- </array>
41
- <key>Definitions</key>
42
- <dict>
43
- <key>Info.plist:MainNib</key>
44
- <string>&lt;key&gt;NSMainNibFile&lt;/key&gt;
45
- &lt;string&gt;Empty&lt;/string&gt;
46
- </string>
47
- <key>Info.plist:PrincipalClass</key>
48
- <string>&lt;key&gt;NSPrincipalClass&lt;/key&gt;
49
- &lt;string&gt;OCSlimNSApplicationRunner&lt;/string&gt;</string>
50
- <key>Empty.xib</key>
51
- <dict>
52
- <key>Group</key>
53
- <string>Supporting Files</string>
54
- <key>Path</key>
55
- <string>Empty.xib</string>
56
- <key>SortOrder</key>
57
- <integer>101</integer>
58
- </dict>
59
- </dict>
60
- </dict>
61
- </plist>
@@ -1,39 +0,0 @@
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>Kind</key>
6
- <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
7
- <key>Identifier</key>
8
- <string>com.apple.dt.unit.macOSUICucumberishTestingBundle</string>
9
- <key>Ancestors</key>
10
- <array>
11
- <string>com.apple.dt.unit.cucumberishUITestBundleBase</string>
12
- <string>com.apple.dt.unit.osxBase</string>
13
- </array>
14
- <key>Concrete</key>
15
- <true/>
16
- <key>Description</key>
17
- <string>This target builds a BDD style user interface testing bundle that uses the Cucumberish and XCTest framework.</string>
18
- <key>SortOrder</key>
19
- <integer>1</integer>
20
- <key>Targets</key>
21
- <array>
22
- <dict>
23
- <key>TargetIdentifier</key>
24
- <string>com.apple.dt.cocoaUITestBundleTarget</string>
25
- </dict>
26
- </array>
27
- <key>OptionConstraints</key>
28
- <array>
29
- <dict>
30
- <key>Identifier</key>
31
- <string>productName</string>
32
- <key>ConstraintType</key>
33
- <string>DefaultIfAssociatedTarget</string>
34
- <key>Value</key>
35
- <string>___ASSOCIATEDTARGET_bundleName___UITests</string>
36
- </dict>
37
- </array>
38
- </dict>
39
- </plist>
@@ -1,134 +0,0 @@
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>TargetOnly</key>
6
- <true/>
7
- <key>Macros</key>
8
- <dict>
9
- <key>POD_ABBREVIATION</key>
10
- <string>OCSP</string>
11
- <key>POD_PLATFORM_IDENTIFIER</key>
12
- <string>___POD_PLATFORM_IDENTIFIER___</string>
13
- <key>POD_NAME</key>
14
- <string>OCSlimProjectTestBundleSupport</string>
15
- <key>PRINCIPALCLASSNAME</key>
16
- <string>OCSPTestSuite</string>
17
- </dict>
18
- <key>Kind</key>
19
- <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
20
- <key>Identifier</key>
21
- <string>io.cleankit.baseAcceptanceTestsUnitTestBundle</string>
22
- <key>Ancestors</key>
23
- <array>
24
- <string>com.apple.dt.unit.unitTestBundleBase</string>
25
- </array>
26
- <key>Targets</key>
27
- <array>
28
- <dict>
29
- <key>BuildPhases</key>
30
- <array>
31
- <dict>
32
- <key>Name</key>
33
- <string>[___POD_ABBREVIATION___] Generate Fitnesse Test Bundle Resource File</string>
34
- <key>Class</key>
35
- <string>ShellScript</string>
36
- <key>ShellPath</key>
37
- <string>/bin/sh</string>
38
- <key>ShellScript</key>
39
- <string>FITNESSE_SUITE_NAME=&quot;___VARIABLE_fitnesseSuiteName___&quot;
40
- TEST_REPORT_FILE_PATH=&quot;${OCSP_TEST_REPORT_FILE_PATH}&quot;
41
- ${OCSP_SUPPORT_FILE_DIR}/ocsp-generate-fitnesse-test-report.sh $FITNESSE_SUITE_NAME $TEST_REPORT_FILE_PATH</string>
42
- </dict>
43
- </array>
44
- </dict>
45
- </array>
46
- <key>Options</key>
47
- <array>
48
- <dict>
49
- <key>Identifier</key>
50
- <string>languageChoice</string>
51
- <key>Units</key>
52
- <dict>
53
- <key>Objective-C</key>
54
- <dict>
55
- <key>Definitions</key>
56
- <dict>
57
- <key>___PACKAGENAMEASIDENTIFIER___.m</key>
58
- <dict>
59
- <key>Path</key>
60
- <string>___PACKAGENAMEASIDENTIFIER___.m</string>
61
- </dict>
62
- </dict>
63
- <key>Nodes</key>
64
- <array>
65
- <string>___PACKAGENAMEASIDENTIFIER___.m</string>
66
- </array>
67
- </dict>
68
- <key>Swift</key>
69
- <dict>
70
- <key>Definitions</key>
71
- <dict>
72
- <key>___PACKAGENAMEASIDENTIFIER___.swift</key>
73
- <dict>
74
- <key>Path</key>
75
- <string>___PACKAGENAMEASIDENTIFIER___.swift</string>
76
- </dict>
77
- </dict>
78
- <key>Nodes</key>
79
- <array>
80
- <string>___PACKAGENAMEASIDENTIFIER___.swift</string>
81
- </array>
82
- </dict>
83
- </dict>
84
- </dict>
85
- <dict>
86
- <key>SortOrder</key>
87
- <integer>0</integer>
88
- <key>EmptyReplacement</key>
89
- <string>&lt;Required&gt;</string>
90
- <key>Required</key>
91
- <true/>
92
- <key>Name</key>
93
- <string>Fitnesse Suite Page Name:</string>
94
- <key>Identifier</key>
95
- <string>fitnesseSuiteName</string>
96
- <key>Description</key>
97
- <string>Your Fitnesse test suite&apos;s page name (e.g. FrontPage)</string>
98
- <key>Type</key>
99
- <string>text</string>
100
- <key>NotPersisted</key>
101
- <true/>
102
- </dict>
103
- <dict>
104
- <key>SortOrder</key>
105
- <integer>1</integer>
106
- <key>Identifier</key>
107
- <string>fitnesseURL</string>
108
- <key>Name</key>
109
- <string>Fitnesse Suite Test URL:</string>
110
- <key>NotPersisted</key>
111
- <true/>
112
- <key>Description</key>
113
- <string>Your fitnesse test suite URL</string>
114
- <key>Default</key>
115
- <string>http://localhost:8080/___VARIABLE_fitnesseSuiteName___?suite</string>
116
- <key>Type</key>
117
- <string>static</string>
118
- </dict>
119
-
120
- </array>
121
- <key>Nodes</key>
122
- <array>
123
- <string>___POD_NAME___.m</string>
124
- </array>
125
- <key>Definitions</key>
126
- <dict>
127
- <key>___POD_NAME___.m</key>
128
- <dict>
129
- <key>Path</key>
130
- <string>___POD_NAME___.m</string>
131
- </dict>
132
- </dict>
133
- </dict>
134
- </plist>