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,128 +0,0 @@
1
- //
2
- // CCIExample.m
3
- //
4
- // Created by Ahmed Ali on 17/1/2016
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. Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
25
-
26
-
27
-
28
- #import "CCIExample.h"
29
-
30
- @interface CCIExample ()
31
- @end
32
-
33
-
34
- @implementation CCIExample
35
-
36
-
37
- /**
38
- * Instantiate the instance using the passed dictionary values to set the properties values
39
- */
40
-
41
- -(instancetype)initWithDictionary:(NSDictionary *)dictionary
42
- {
43
- self = [super init];
44
-
45
- if(dictionary[@"location"] != nil && ![dictionary[@"location"] isKindOfClass:[NSNull class]]){
46
- self.location = [[CCILocation alloc] initWithDictionary:dictionary[@"location"]];
47
- }
48
- if(dictionary[@"exampleData"] != nil){
49
- self.exampleData = dictionary[@"exampleData"];
50
- }else{
51
- NSMutableDictionary * exampleData = [NSMutableDictionary dictionary];
52
- NSMutableArray * headers = [NSMutableArray array];
53
- if(dictionary[@"tableHeader"] != nil && ![dictionary[@"tableHeader"] isKindOfClass:[NSNull class]]){
54
- NSArray * cells = dictionary[@"tableHeader"][@"cells"];
55
- for(NSDictionary * cell in cells){
56
- NSString * cellValue = cell[@"value"];
57
- [headers addObject:cellValue];
58
- exampleData[cellValue] = [NSMutableArray array];
59
- }
60
-
61
- }
62
- if(dictionary[@"tableBody"] != nil && [dictionary[@"tableBody"] isKindOfClass:[NSArray class]]){
63
- NSArray * rows = dictionary[@"tableBody"];
64
-
65
- for(NSDictionary * row in rows){
66
- NSArray * columns = row[@"cells"];
67
- for(int i = 0; i < columns.count; i++){
68
- NSString * header = headers[i];
69
- NSMutableArray * tableColumn = exampleData[header];
70
- NSDictionary * column = columns[i];
71
- [tableColumn addObject:column[@"value"]];
72
- }
73
- }
74
-
75
- }
76
-
77
- self.exampleData = exampleData;
78
- }
79
-
80
- return self;
81
- }
82
-
83
-
84
- /**
85
- * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
86
- */
87
- -(NSDictionary *)toDictionary
88
- {
89
- NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
90
-
91
- if(self.location != nil){
92
- dictionary[@"location"] = [self.location toDictionary];
93
- }
94
-
95
- dictionary[@"exampleData"] = self.exampleData;
96
-
97
- return dictionary;
98
-
99
- }
100
-
101
- /**
102
- * Implementation of NSCoding encoding method
103
- */
104
- /**
105
- * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
106
- */
107
- - (void)encodeWithCoder:(NSCoder *)aCoder
108
- {
109
- if(self.location != nil){
110
- [aCoder encodeObject:self.location forKey:@"location"];
111
- }
112
- [aCoder encodeObject:self.exampleData forKey:@"exampleData"];
113
-
114
-
115
- }
116
-
117
- /**
118
- * Implementation of NSCoding initWithCoder: method
119
- */
120
- - (instancetype)initWithCoder:(NSCoder *)aDecoder
121
- {
122
- self = [super init];
123
- self.location = [aDecoder decodeObjectForKey:@"location"];
124
- self.exampleData = [aDecoder decodeObjectForKey:@"exampleData"];
125
- return self;
126
-
127
- }
128
- @end
@@ -1,49 +0,0 @@
1
- //
2
- // CCIFeature.h
3
- //
4
- // Created by Ahmed Ali on 2/1/2016
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
- // Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
27
-
28
- #import <Foundation/Foundation.h>
29
- #import "CCIBackground.h"
30
- #import "CCILocation.h"
31
- #import "CCIScenarioDefinition.h"
32
-
33
- /**
34
- Reperesents a feautre information
35
-
36
- Checkout the Feaure wiki for more information: https://github.com/Ahmed-Ali/Cucumberish/wiki/Feature
37
-
38
- */
39
- @interface CCIFeature : NSObject
40
-
41
- @property (nonatomic, strong) CCIBackground * background;
42
- @property (nonatomic, strong) CCILocation * location;
43
- @property (nonatomic, copy) NSString * name;
44
- @property (nonatomic, strong) NSArray<CCIScenarioDefinition *> * scenarioDefinitions;
45
- @property (nonatomic, strong) NSArray <NSString *> * tags;
46
- -(instancetype)initWithDictionary:(NSDictionary *)dictionary;
47
-
48
- -(NSDictionary *)toDictionary;
49
- @end
@@ -1,174 +0,0 @@
1
- //
2
- // CCIFeature.m
3
- //
4
- // Created by Ahmed Ali on 2/1/2016
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. Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
25
-
26
-
27
-
28
- #import "CCIFeature.h"
29
-
30
- @interface CCIFeature ()
31
- @end
32
- @implementation CCIFeature
33
-
34
-
35
-
36
-
37
- /**
38
- * Instantiate the instance using the passed dictionary values to set the properties values
39
- */
40
-
41
- -(instancetype)initWithDictionary:(NSDictionary *)dictionary
42
- {
43
- self = [super init];
44
-
45
-
46
- if(dictionary[@"location"] != nil && ![dictionary[@"location"] isKindOfClass:[NSNull class]]){
47
- self.location = [[CCILocation alloc] initWithDictionary:dictionary[@"location"]];
48
- }
49
-
50
- if(dictionary[@"name"] != nil && ![dictionary[@"name"] isKindOfClass:[NSNull class]]){
51
- self.name = dictionary[@"name"];
52
- }
53
-
54
- if(dictionary[@"parsedTags"] != nil){
55
- self.tags = dictionary[@"parsedTags"];
56
- }else if(dictionary[@"tags"] != nil && [dictionary[@"tags"] isKindOfClass:[NSArray class]]){
57
- NSArray * tagsDictionaries = dictionary[@"tags"];
58
- NSMutableArray * tagsItems = [NSMutableArray array];
59
- for(NSDictionary * tagDictionary in tagsDictionaries){
60
- NSString * tagName = tagDictionary[@"name"];
61
- if([tagName hasPrefix:@"@"]){
62
- tagName = [tagName stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:@""];
63
- }
64
- [tagsItems addObject:tagName];
65
-
66
- }
67
- self.tags = tagsItems;
68
- }
69
- if(dictionary[@"children"] != nil && [dictionary[@"children"] isKindOfClass:[NSArray class]]){
70
- NSArray * scenarioDefinitionsDictionaries = dictionary[@"children"];
71
- NSMutableArray * scenarioDefinitionsItems = [NSMutableArray array];
72
- for(NSDictionary * scenarioDefinitionsDictionary in scenarioDefinitionsDictionaries){
73
- NSMutableDictionary * scenarioData = [scenarioDefinitionsDictionary mutableCopy];
74
- if(self.location.filePath.length > 0){
75
- scenarioData[@"location"][@"filePath"] = self.location.filePath;
76
- }
77
- if([[scenarioData[@"keyword"] lowercaseString] isEqualToString:@"background"]){
78
- self.background = [[CCIBackground alloc] initWithDictionary:scenarioData];
79
- }
80
- CCIScenarioDefinition * scenarioDefinitionsItem = [[CCIScenarioDefinition alloc] initWithDictionary:scenarioData];
81
- if(scenarioDefinitionsItem.tags.count > 0 && self.tags.count > 0){
82
- NSMutableArray * allTags = [scenarioDefinitionsItem.tags mutableCopy];
83
- [allTags addObjectsFromArray:self.tags];
84
- scenarioDefinitionsItem.tags = allTags;
85
- }else if(self.tags.count > 0){
86
- scenarioDefinitionsItem.tags = self.tags;
87
- }
88
- [scenarioDefinitionsItems addObject:scenarioDefinitionsItem];
89
- }
90
- self.scenarioDefinitions = scenarioDefinitionsItems;
91
- }
92
-
93
-
94
-
95
- return self;
96
- }
97
-
98
-
99
- /**
100
- * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
101
- */
102
- -(NSDictionary *)toDictionary
103
- {
104
- NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
105
- if(self.background != nil){
106
- dictionary[@"background"] = [self.background toDictionary];
107
- }
108
-
109
- if(self.location != nil){
110
- dictionary[@"location"] = [self.location toDictionary];
111
- }
112
- if(self.name != nil){
113
- dictionary[@"name"] = self.name;
114
- }
115
- if(self.scenarioDefinitions != nil){
116
- NSMutableArray * dictionaryElements = [NSMutableArray array];
117
- for(CCIScenarioDefinition * scenarioDefinitionsElement in self.scenarioDefinitions){
118
- [dictionaryElements addObject:[scenarioDefinitionsElement toDictionary]];
119
- }
120
- dictionary[@"scenarioDefinitions"] = dictionaryElements;
121
- }
122
- if(self.tags.count > 0){
123
- dictionary[@"parsedTags"] = self.tags;
124
- }
125
-
126
-
127
- return dictionary;
128
-
129
- }
130
-
131
- /**
132
- * Implementation of NSCoding encoding method
133
- */
134
- /**
135
- * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
136
- */
137
- - (void)encodeWithCoder:(NSCoder *)aCoder
138
- {
139
- if(self.background != nil){
140
- [aCoder encodeObject:self.background forKey:@"background"];
141
- }
142
-
143
- if(self.location != nil){
144
- [aCoder encodeObject:self.location forKey:@"location"];
145
- }
146
- if(self.name != nil){
147
- [aCoder encodeObject:self.name forKey:@"name"];
148
- }
149
- if(self.scenarioDefinitions != nil){
150
- [aCoder encodeObject:self.scenarioDefinitions forKey:@"scenarioDefinitions"];
151
- }
152
- if(self.tags != nil){
153
- [aCoder encodeObject:self.tags forKey:@"tags"];
154
- }
155
-
156
-
157
- }
158
-
159
- /**
160
- * Implementation of NSCoding initWithCoder: method
161
- */
162
- - (instancetype)initWithCoder:(NSCoder *)aDecoder
163
- {
164
- self = [super init];
165
- self.background = [aDecoder decodeObjectForKey:@"background"];
166
- self.location = [aDecoder decodeObjectForKey:@"location"];
167
- self.name = [aDecoder decodeObjectForKey:@"name"];
168
- self.scenarioDefinitions = [aDecoder decodeObjectForKey:@"scenarioDefinitions"];
169
- self.tags = [aDecoder decodeObjectForKey:@"tags"];
170
- return self;
171
-
172
- }
173
-
174
- @end
@@ -1,36 +0,0 @@
1
- //
2
- // CCIHock.h
3
- // Created by Ahmed Ali on 19/1/2016
4
- // Copyright © 2016 Ahmed Ali. All rights reserved.
5
- //
6
- //
7
- // Permission is hereby granted, free of charge, to any person obtaining a copy
8
- // of this software and associated documentation files (the "Software"), to deal
9
- // in the Software without restriction, including without limitation the rights
10
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- // copies of the Software, and to permit persons to whom the Software is
12
- // furnished to do so, subject to the following conditions:
13
- //
14
- // The above copyright notice and this permission notice shall be included in
15
- // all copies or substantial portions of the Software.
16
- //
17
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- // THE SOFTWARE.
24
-
25
- #import <Foundation/Foundation.h>
26
- #import "CCIBlockDefinitions.h"
27
- @class CCIScenarioDefinition;
28
-
29
-
30
- @interface CCIHock : NSObject
31
-
32
- @property (nonatomic, copy) CCIScenarioHockBlock block;
33
- @property (nonatomic, strong) NSArray * tags;
34
-
35
- + (instancetype)hockWithTags:(NSArray *)tags block:(CCIScenarioHockBlock)block;
36
- @end
@@ -1,34 +0,0 @@
1
- //
2
- // CCIHock.m
3
- // Created by Ahmed Ali on 19/1/2016
4
- // Copyright © 2016 Ahmed Ali. All rights reserved.
5
- //
6
- //
7
- // Permission is hereby granted, free of charge, to any person obtaining a copy
8
- // of this software and associated documentation files (the "Software"), to deal
9
- // in the Software without restriction, including without limitation the rights
10
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- // copies of the Software, and to permit persons to whom the Software is
12
- // furnished to do so, subject to the following conditions:
13
- //
14
- // The above copyright notice and this permission notice shall be included in
15
- // all copies or substantial portions of the Software.
16
- //
17
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- // THE SOFTWARE.
24
- #import "CCIHock.h"
25
-
26
- @implementation CCIHock
27
- + (instancetype)hockWithTags:(NSArray *)tags block:(CCIScenarioHockBlock)block
28
- {
29
- CCIHock * hock = [CCIHock new];
30
- hock.block = block;
31
- hock.tags = tags;
32
- return hock;
33
- }
34
- @end
@@ -1,61 +0,0 @@
1
- //
2
- // CCILocation.h
3
- //
4
- // Created by Ahmed Ali on 2/1/2016
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
- // Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
27
-
28
- #import <Foundation/Foundation.h>
29
-
30
- /**
31
- Represents a location of a step, scenario or a feature
32
- */
33
- @interface CCILocation : NSObject
34
-
35
- /**
36
- The line where the associate node (step, scenario or a feature) is located
37
- */
38
- @property (nonatomic, assign) NSInteger line;
39
-
40
- /**
41
- The exact file path where the node exists
42
- */
43
- @property (nonatomic, strong) NSString * filePath;
44
-
45
-
46
- /**
47
- Creates an instance with properties filled from the passed dictionary
48
-
49
- @param dictionary the dictionary that contains all the location data
50
-
51
- @return location instance
52
- */
53
- -(instancetype)initWithDictionary:(NSDictionary *)dictionary;
54
-
55
- /**
56
- Creates a dictionary from the class properties
57
-
58
- @return the created dictionary
59
- */
60
- -(NSDictionary *)toDictionary;
61
- @end