Esempio n. 1
0
  private void createScene(Templater templater, String scenePath, String testsPath) {
    final String sceneName = fs().filename(scenePath);
    templater.addToken("SCENE_NAME", sceneName);
    templater.addToken("SCENE_TITLE", StringUtil.titleCase(sceneName));

    templater.file(fs().join(scenePath, "props.rb"), "scene/props.rb.template");
    templater.file(fs().join(scenePath, "styles.rb"), "scene/styles.rb.template");
    templater.directory(fs().join(scenePath, "players"));
    templater.file(
        fs().join(testsPath, sceneName, sceneName + "_spec.rb"),
        "scene_spec/scene_spec.rb.template");
  }
Esempio n. 2
0
  private void createProduction(
      Templater templater,
      String productionPath,
      String productionName,
      String sceneName,
      String testsPath) {
    templater.addToken("DEFAULT_SCENE_NAME", sceneName);
    templater.addToken("PRODUCTION_NAME", StringUtil.titleCase(productionName));
    templater.addToken("CURRENT_VERSION", About.version.toString());

    templater.file(fs().join(productionPath, "production.rb"), "production/production.rb.template");
    templater.file(fs().join(productionPath, "stages.rb"), "production/stages.rb.template");
    templater.file(fs().join(productionPath, "styles.rb"), "production/styles.rb.template");
    templater.file(
        fs().join(testsPath, "spec_helper.rb"), "production/spec/spec_helper.rb.template");

    createScene(templater, fs().join(productionPath, sceneName), testsPath);
  }