Package br.com.objectos.way.base.io

Examples of br.com.objectos.way.base.io.Directory


  @Override
  protected void execute0(DotsOptions options) {
    User user = etcs.read(User.class);
    Map<String, User> ctx = ImmutableMap.of("user", user);
    Directory userHome = dirs.userHome();

    WayEtc.resourcesAt("/kdo/dots/git")
        .add(".gitconfig")
        .evalWith(ctx)
        .copyTo(userHome);
View Full Code Here


  @Override
  protected void execute0(DotsOptions options) {
    Jdbc jdbc = etcs.read(Jdbc.class);
    Map<String, Object> ctx = ImmutableMap.<String, Object> of("jdbc", jdbc);
    Directory dir = dirs.eclipseUserCoreRuntime();

    WayEtc.resourcesAt("/kdo/dots/eclipse")
        .addFromListAt("/kdo/dots/eclipse.list")
        .evalWith(ctx)
        .only("org.testng.eclipse.prefs")
View Full Code Here

  @Override
  protected void executeCommand(EclipsePrepareOptions options) {
    options.all();

    HttpServer server = options.fileServer();
    Directory eclipseVar = dirs.eclipseVar();
    File eclipseTar = eclipseVar.fileAt("eclipse-jee-kepler-SR1-linux-gtk-x86_64.tar.gz");
    Directory eclipseDir = eclipseVar.dirAt("eclipse");

    infoAction("dirs");
    info("Preparing directories.");

    eclipseDir.deleteContents();

    if (options.download) {
      download(server, eclipseVar);
    }
View Full Code Here

  @Override
  protected void execute0(DotsOptions options) {
    Jdbc jdbc = etcs.read(Jdbc.class);
    Map<String, Object> ctx = ImmutableMap.<String, Object> of("jdbc", jdbc);
    Directory m2 = dirs.mavenSettings();

    WayEtc.resourcesAt("/kdo/dots/maven")
        .add("settings.xml")
        .evalWith(ctx)
        .copyTo(m2);
View Full Code Here

        .add(sheet1)
        .named("way-io.xls");
  }

  public void write_to() throws IOException {
    Directory dir = Directory.JAVA_IO_TMPDIR;

    xls.writeTo(dir);

    List<Entity> res = WayIO.tableReaderOf(Entity.class)
        .xls()
View Full Code Here

  }

  public void execute() {
    execute("dots", "--git");

    Directory userDir = userSettings.userHome();
    File file = userDir.fileAt(".gitconfig");

    assertFileLines(file, "/res/kdo/dots/git/.gitconfig");
  }
View Full Code Here

  }

  public void execute() {
    execute("dots", "--eclipse");

    Directory runtime = userSettings.eclipseRuntime();
    File file = runtime.fileAt("org.testng.eclipse.prefs");

    assertFileLines(file, "/res/kdo/dots/eclipse/org.testng.eclipse.prefs");
  }
View Full Code Here

  }

  public void execute() {
    execute("dots", "--maven");

    Directory maven = userSettings.maven();
    File file = maven.fileAt("settings.xml");

    assertFileLines(file, "/res/kdo/dots/maven/settings.xml");
  }
View Full Code Here

  @Test(dependsOnMethods = "download")
  public void extract() {
    execute("kdo", "eclipse", "prepare", "--extract");

    Directory res = eclipseVar.dirAt("eclipse");
    assertThat(res.exists(), equalTo(true));
  }
View Full Code Here

  @Test(dependsOnMethods = "extract")
  public void plugins() {
    execute("kdo", "eclipse", "prepare", "--plugins");

    Directory eclipse = eclipseVar.dirAt("eclipse");
    List<File> res = eclipse.find()
        .typed()
        .name("org.testng.*")
        .list();
    assertThat(res.size(), greaterThan(0));
  }
View Full Code Here

TOP

Related Classes of br.com.objectos.way.base.io.Directory

Copyright © 2018 www.massapicom. 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.