예제 #1
0
def matrix(args):
    sdks = omnimax.SDKFactory().sdks
    feature_data = open('features.yaml', 'r').read()
    features = yaml.load(feature_data)
    output_file = 'features/readme.md'
    if not os.path.exists(os.path.dirname(output_file)):
        os.makedirs(os.path.dirname(output_file))
    output = open(output_file, 'w')
    report = StatusReport(output, features, sdks)
    report.report()
    print output_file + " generated!"
예제 #2
0
def render_features(src, target, templateDir):
    sdks = omnimax.SDKFactory().sdks
    for sdk in sdks:
        solution_root = os.path.join(src, sdk, 'solutions')
        solutions = find_solution_files(solution_root)
        templates = map(
            lambda x: template_for_solution(x, solution_root, templateDir, sdk
                                            ), solutions)
        for i in range(len(solutions)):
            template = Template(filename=templates[i])
            solution_src = open(solutions[i], 'r').read()
            output = template.render(language=sdk,
                                     solution=solution_src,
                                     tags=[sdk])
            output_filename = os.path.basename(templates[i]).replace(
                '.feature', '_' + sdk + '.feature')
            output_file = os.path.join(target, output_filename)
            open(output_file, 'w').write(output)
예제 #3
0
def step1(context, sdk_name):
    sdk = omnimax.SDKFactory().factory(sdk_name)
    context.sdk = sdk
    sdk.bootstrap()
예제 #4
0
 def test_factory_returns_basesdk(self):
     factory = omnimax.SDKFactory(self.os)
     sdk = factory.factory('java')
     self.assertEquals(type(sdk), omnimax.sdk.BaseSDK)
예제 #5
0
 def test_sdks(self):
     factory = omnimax.SDKFactory(self.os)
     self.assertEquals(factory.sdks, self.sdks)