Examples of RakefileInfo


Examples of com.puppetlabs.geppetto.validation.runner.RakefileInfo

    Diagnostic chain = new Diagnostic();
    BuildResult result = vs.validate(chain, root, null, null, SubMonitor.convert(null));
    DiagnosticsAsserter asserter = new DiagnosticsAsserter(chain);
    asserter.assertAll(asserter.issue(IPPDiagnostics.ISSUE__STRING_BOOLEAN).optional().greedy());

    RakefileInfo rakefileInfo = result.getRakefileInfo();
    assertEquals("Should have found a rakefile", 1, rakefileInfo.getRakefiles().size());
    Rakefile rakefile = rakefileInfo.getRakefiles().get(0);
    assertEquals("Should have a relative path of a/Rakefile", "a/Rakefile", rakefile.getPath().toString());
    assertEquals("Should have found 4 tasks", 4, rakefile.getTasks().size());
    assertTask(rakefile.getTasks().get(0), "outer:myspace:mytask", "this is my task");
    assertTask(rakefile.getTasks().get(1), "outer:cucumberTask", "a cucumber task");
    assertTask(rakefile.getTasks().get(2), "outer:rspecTask", "a rspec task");
View Full Code Here

Examples of com.puppetlabs.geppetto.validation.runner.RakefileInfo

    Diagnostic chain = new Diagnostic();
    BuildResult result = vs.validate(chain, root, null, null, SubMonitor.convert(null));
    DiagnosticsAsserter asserter = new DiagnosticsAsserter(chain);
    asserter.assertAll(asserter.issue(IPPDiagnostics.ISSUE__STRING_BOOLEAN).optional().greedy());

    RakefileInfo rakefileInfo = result.getRakefileInfo();
    assertEquals("Should have found a rakefile", 1, rakefileInfo.getRakefiles().size());
    Rakefile rakefile = rakefileInfo.getRakefiles().get(0);
    assertEquals(
      "Should have a relative path of smoketest/Rakefile", "smoketest/Rakefile", rakefile.getPath().toString());
    assertEquals("Should have found 4 tasks", 5, rakefile.getTasks().size());
    assertTask(rakefile.getTasks().get(0), "test0", "");
    assertTask(rakefile.getTasks().get(1), "test1", "");
View Full Code Here

Examples of com.puppetlabs.geppetto.validation.runner.RakefileInfo

    Diagnostic chain = new Diagnostic();
    BuildResult result = vs.validate(chain, root, null, null, SubMonitor.convert(null));
    DiagnosticsAsserter asserter = new DiagnosticsAsserter(chain);
    asserter.assertAll(asserter.issue(IPPDiagnostics.ISSUE__STRING_BOOLEAN).optional().greedy());

    RakefileInfo rakefileInfo = result.getRakefileInfo();
    assertEquals("Should have found one rakefile", 1, rakefileInfo.getRakefiles().size());
    Rakefile rakefile = rakefileInfo.getRakefiles().get(0);
    assertEquals("Should have a relative path of Rakefile", "Rakefile", rakefile.getPath().toString());
    assertEquals("Should have found 8 tasks", 8, rakefile.getTasks().size());
    assertTask(rakefile.getTasks().get(0), "default", "");
    assertTask(rakefile.getTasks().get(1), "spec", "Run all module spec tests (Requires rspec-puppet gem)");
    assertTask(rakefile.getTasks().get(2), "spec_task", "");
View Full Code Here

Examples of com.puppetlabs.geppetto.validation.runner.RakefileInfo

    Diagnostic chain = new Diagnostic();
    BuildResult result = vs.validate(chain, root, null, null, SubMonitor.convert(null));
    DiagnosticsAsserter asserter = new DiagnosticsAsserter(chain);
    asserter.assertAll(asserter.issue(IPPDiagnostics.ISSUE__STRING_BOOLEAN).optional().greedy());

    RakefileInfo rakefileInfo = result.getRakefileInfo();
    assertEquals("Should have found two rakefiles", 2, rakefileInfo.getRakefiles().size());
    Rakefile rakefile = rakefileInfo.getRakefiles().get(0);
    List<String> rakefilePaths = Lists.newArrayList();
    rakefilePaths.add(rakefile.getPath().toString());

    assertEquals("Should have found 4 tasks", 4, rakefile.getTasks().size());
    assertTask(rakefile.getTasks().get(0), "outer:myspace:mytask", "this is my task");
    assertTask(rakefile.getTasks().get(1), "outer:cucumberTask", "a cucumber task");
    assertTask(rakefile.getTasks().get(2), "outer:rspecTask", "a rspec task");
    assertTask(rakefile.getTasks().get(3), "default", "the default task");

    rakefile = rakefileInfo.getRakefiles().get(1);
    rakefilePaths.add(rakefile.getPath().toString());
    assertTrue("Should contain a/Rakefile", rakefilePaths.contains("a/Rakefile"));
    assertTrue("Should contain b/Rakefile", rakefilePaths.contains("b/alternative.rake"));

    assertEquals("Should have found 4 tasks", 4, rakefile.getTasks().size());
View Full Code Here

Examples of com.puppetlabs.geppetto.validation.runner.RakefileInfo

        addExceptionDiagnostic(diagnostics, "Internal Error: Exception while processing file: " + f.getName() +
            ": " + e, e);
        e.printStackTrace();
      }
    }
    RakefileInfo rakefileInfo = new RakefileInfo();
    // System.err.println("Processing Rakefiles count: " + rakeFiles.size());

    for(File f : rakeFiles) {
      // Syntax check ruby file
      // consumes one rakefile tick
      if(isValidationWanted(examinedFiles, f))
        validateRubyFile(rubyHelper, diagnostics, f, root, ticker.newChild(1));
      else
        worked(ticker, 1);

      // parsing adds one rakefile work tick
      rakefileInfo.addRakefile(getRakefileInformation(rubyHelper, f, root, ticker.newChild(1)));

    }
    // Load all pp
    // crosslink and validate all
    Map<File, Resource> ppResources = Maps.newHashMapWithExpectedSize(ppFiles.size());
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.