Permalink
Browse files

Expose parsed features from Cucumberish

These can be used to do neat things, like logic based on all of the tags that will be run.
  • Loading branch information...
brentleyjones committed Jul 19, 2017
1 parent e944236 commit 312538c842ca72458c2b9f1fe03612ed5d4918e3
View
@@ -18,14 +18,16 @@ Pod::Spec.new do |s|
s.source_files = 'Cucumberish/*.{h,m}', 'Cucumberish/Core/Managers/*.{h,m}', 'Cucumberish/Core/Models/*.{h,m}', 'Cucumberish/Utils/*.{h,m}', 'Cucumberish/Dependencies/Gherkin', 'Cucumberish/Core/CCIBlockDefinitions.h'
s.public_header_files =
'Cucumberish/Cucumberish.h',
'Cucumberish/Core/Managers/CCIStepsManager.h',
'Cucumberish/Core/CCIBlockDefinitions.h',
'Cucumberish/Core/CCILogManager.h',
'Cucumberish/Core/Models/CCIScenarioDefinition.h',
'Cucumberish/Core/Managers/CCIStepsManager.h',
'Cucumberish/Core/Models/CCIArgument.h',
'Cucumberish/Core/Models/CCIBackground.h',
'Cucumberish/Core/Models/CCIExample.h',
'Cucumberish/Core/Models/CCIStep.h',
'Cucumberish/Core/Models/CCIFeature.h',
'Cucumberish/Core/Models/CCILocation.h',
'Cucumberish/Core/Models/CCIArgument.h'
'Cucumberish/Core/Models/CCIScenarioDefinition.h',
'Cucumberish/Core/Models/CCIStep.h'
s.resource_bundles = {
'GherkinLanguages' => ['Cucumberish/Dependencies/Gherkin/gherkin-languages.json'],
}
@@ -28,6 +28,7 @@
#import <XCTest/XCTest.h>
#import "CCIStepsManager.h"
#import "CCIBlockDefinitions.h"
#import "CCIFeature.h"
typedef NS_ENUM(NSInteger, CCILanguage) {
CCILanguageSwift = 0,
@@ -112,6 +113,11 @@ typedef NS_ENUM(NSInteger, CCILanguage) {
*/
@property (nonatomic, assign) CCILanguage dryRunLanguage;
/**
After executing parserFeaturesInDirectory:fromBundle:includeTags:excludeTags: this array will contain all the parsed features.
*/
@property (nonatomic, readonly) NSArray<CCIFeature *> * features;
/**
Retuans a singleton instance of Cucumberish
@@ -96,6 +96,11 @@ - (instancetype)init
}
- (NSArray<CCIFeature *> *)features
{
return [[CCIFeaturesManager instance] features];
}
- (Cucumberish *)parserFeaturesInDirectory:(NSString *)directory fromBundle:(NSBundle *)bundle includeTags:(NSArray<NSString *> *)includeTags excludeTags:(NSArray<NSString *> *)excludeTags
{
NSArray * featureFiles = [self recursivelyFindFeatureFilesInBundle:bundle subDirectory:directory];
@@ -65,9 +65,9 @@
607EEA241E50EE1000F2E8B6 /* CCIStepsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F0B1E16BA280042D98D /* CCIStepsManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
607EEA251E50EE1000F2E8B6 /* CCIArgument.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F0E1E16BA280042D98D /* CCIArgument.h */; settings = {ATTRIBUTES = (Public, ); }; };
607EEA261E50EE1000F2E8B6 /* CCIAroundHock.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F101E16BA280042D98D /* CCIAroundHock.h */; };
607EEA271E50EE1000F2E8B6 /* CCIBackground.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F121E16BA280042D98D /* CCIBackground.h */; };
607EEA271E50EE1000F2E8B6 /* CCIBackground.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F121E16BA280042D98D /* CCIBackground.h */; settings = {ATTRIBUTES = (Public, ); }; };
607EEA281E50EE1000F2E8B6 /* CCIExample.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F141E16BA280042D98D /* CCIExample.h */; settings = {ATTRIBUTES = (Public, ); }; };
607EEA291E50EE1000F2E8B6 /* CCIFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F161E16BA280042D98D /* CCIFeature.h */; };
607EEA291E50EE1000F2E8B6 /* CCIFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F161E16BA280042D98D /* CCIFeature.h */; settings = {ATTRIBUTES = (Public, ); }; };
607EEA2A1E50EE1000F2E8B6 /* CCIHock.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F181E16BA280042D98D /* CCIHock.h */; };
607EEA2B1E50EE1000F2E8B6 /* CCIJSONDumper.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F1A1E16BA280042D98D /* CCIJSONDumper.h */; };
607EEA2C1E50EE1000F2E8B6 /* CCILocation.h in Headers */ = {isa = PBXBuildFile; fileRef = C5E80F1C1E16BA280042D98D /* CCILocation.h */; settings = {ATTRIBUTES = (Public, ); }; };

0 comments on commit 312538c

Please sign in to comment.