Examples of Templater


Examples of limelight.io.Templater

    final String projectPath = args.get("path");
    String testsPath = fs().join(projectPath, getArgOrDefault(args, "test-path", "spec"));
    String sceneName = getArgOrDefault(args, "scene-name", "default_scene");

    String projectName = fs().filename(projectPath);
    Templater templater = createTemplater(fs().parentPath(projectPath));

    templater.addToken("LLP_NAME", projectName);

    templater.file(fs().join(projectName, "features/step_definitions/limelight_steps.rb"), "features/step_definitions/limelight_steps.rb.template");
    templater.file(fs().join(projectName, "features/support/env.rb"), "features/support/env.rb.template");
    templater.file(fs().join(projectName, "Rakefile"), "project/Rakefile.template");

    createProduction(templater, fs().join(projectName, "production"), projectName, sceneName, testsPath);
  }
View Full Code Here

Examples of limelight.io.Templater

  {
    String productionPath = args.get("path");
    String testsPath = fs().join(productionPath, getArgOrDefault(args, "test-path", "spec"));
    String sceneName = getArgOrDefault(args, "scene-name", "default_scene");

    Templater templater = createTemplater(fs().parentPath(productionPath));

    String productionName = fs().filename(productionPath);
    productionPath = productionName;
    createProduction(templater, productionPath, productionName, sceneName, testsPath);
  }
View Full Code Here

Examples of limelight.io.Templater

  {
    final String path = args.get("path");
    final String productionPath = getArgOrDefault(args, "production-path", ".");
    final String testsPath = getArgOrDefault(args, "test-path", "spec");

    Templater templater = createTemplater(productionPath);

    final String scenePath = fs().filename(path);
    createScene(templater, scenePath, testsPath);
  }
View Full Code Here

Examples of limelight.io.Templater

    templater.file(fs().join(testsPath, sceneName, sceneName + "_spec.rb"), "scene_spec/scene_spec.rb.template");
  }

  private Templater createTemplater(String path)
  {
    Templater templater = new Templater(path, fs().join(Context.instance().limelightHome, "ruby", "lib", "limelight", "templates", "sources"));
    if(logger != null)
      templater.setLogger(logger);
    templater.setFs(fs());
    return templater;
  }
View Full Code Here

Examples of org.stringtree.template.Templater

      Object template = findTemplate(context);
    if (template != null) {
      if (content != null) {
        context = new FetcherStringFinder(new WrappedFetcher(content, underlying));
      }
      Templater templater = (Templater)context.getObject(Templater.TEMPLATER);
      autoTemplate(context, templater, collector, MojasefConstants.PROLOGUE_TEMPLATE);
      templater.expandTemplate(context, template, collector);
            autoTemplate(context, templater, collector, MojasefConstants.EPILOGUE_TEMPLATE);
    } else if (token == Token.CONTINUE && dfl != null) {
            delegateAndExpand(collector, context, dfl, null);
    } else {
      collector.write(content);
View Full Code Here

Examples of org.stringtree.template.Templater

            source = this;
          }
            put(MojasefConstants.TEMPLATE_SOURCE, source);
        }

        Templater templater = new ContextTemplater();

        if (null != getObject(MojasefConstants.MOJASEF_OUTPUT_ESCAPER)) {
            ObjectToString converter = (ObjectToString)getObject(MojasefConstants.MOJASEF_OUTPUT_ESCAPER);
            templater.setStringConverter(converter);
        }

        put(Templater.TEMPLATE, new ContextTemplateFetcher(this));
        put(Templater.TEMPLATER, templater);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.