@Provides @Named("installChefGems") @Singleton final Statement installChefGems(BootstrapProperties bootstrapProperties) { InstallRubyGems installRubyGems = InstallRubyGems.builder() .version(bootstrapProperties.gemSystemVersion().orNull()) .updateSystem(bootstrapProperties.updateGemSystem(), bootstrapProperties.gemSystemVersion().orNull()) .updateExistingGems(bootstrapProperties.updateGems()) // .build(); Statement installChef = InstallChefGems.builder().version(bootstrapProperties.chefVersion().orNull()).build(); return new StatementList(InstallRuby.builder().build(), installRubyGems, installChef); }
@Provides @Named("installChefGems") @Singleton final Statement installChefGems(BootstrapProperties bootstrapProperties) { InstallRubyGems installRubyGems = InstallRubyGems.builder() .version(bootstrapProperties.gemSystemVersion().orNull()) .updateSystem(bootstrapProperties.updateGemSystem(), bootstrapProperties.gemSystemVersion().orNull()) .updateExistingGems(bootstrapProperties.updateGems()) // .build(); Statement installChef = InstallChefGems.builder().version(bootstrapProperties.chefVersion().orNull()).build(); return new StatementList(InstallRuby.builder().build(), installRubyGems, installChef); }
@Provides @Named("installChefGems") @Singleton Statement installChef(BootstrapProperties bootstrapProperties) { InstallRubyGems installRubyGems = InstallRubyGems.builder() .version(bootstrapProperties.gemSystemVersion().orNull()) .updateSystem(bootstrapProperties.updateGemSystem(), bootstrapProperties.gemSystemVersion().orNull()) .updateExistingGems(bootstrapProperties.updateGems()) // .build(); Statement installChef = InstallChefGems.builder().version(bootstrapProperties.chefVersion().orNull()).build(); return new StatementList(InstallRuby.builder().build(), installRubyGems, installChef); }
public void installRubyGemsForcingVersion() throws IOException { assertEquals(InstallRubyGems.builder().version("1.8.25").build().render(OsFamily.UNIX), installRubyGems("1.8.25")); }
public void installRubyGemsUpdatingSystemAndGems() throws IOException { assertEquals(InstallRubyGems.builder().version("1.2.3").updateSystem(true, "1.2.4").updateExistingGems(true) .build().render(OsFamily.UNIX), installRubyGems("1.2.3") + updateSystem("1.2.4") + updateGems()); }
public void installRubyGemsForcingVersion() throws IOException { assertEquals(InstallRubyGems.builder().version("1.8.25").build().render(OsFamily.UNIX), installRubyGems("1.8.25")); }
@Provides @Named("installChefGems") @Singleton Statement installChef(BootstrapProperties bootstrapProperties) { InstallRubyGems installRubyGems = InstallRubyGems.builder() .version(bootstrapProperties.gemSystemVersion().orNull()) .updateSystem(bootstrapProperties.updateGemSystem(), bootstrapProperties.gemSystemVersion().orNull()) .updateExistingGems(bootstrapProperties.updateGems()) // .build(); Statement installChef = InstallChefGems.builder().version(bootstrapProperties.chefVersion().orNull()).build(); return new StatementList(InstallRuby.builder().build(), installRubyGems, installChef); }
public void installRubyGemsUpdatingSystemAndGems() throws IOException { assertEquals(InstallRubyGems.builder().version("1.2.3").updateSystem(true, "1.2.4").updateExistingGems(true) .build().render(OsFamily.UNIX), installRubyGems("1.2.3") + updateSystem("1.2.4") + updateGems()); }