@Test void it_provides_the_correct_tool_name() { Messages.Meta meta = CreateMeta.createMeta("cucumber-jvm", "3.2.1", new HashMap<>()); assertEquals("cucumber-jvm", meta.getImplementation().getName()); }
public static Messages.Meta createMeta( String toolName, String toolVersion, Map<String, String> env ) { Messages.Meta.Builder metaBuilder = Messages.Meta.newBuilder() .setRuntime(Messages.Meta.Product.newBuilder() .setName(System.getProperty("java.vm.name")) .setVersion(System.getProperty("java.vm.version"))) .setImplementation(Messages.Meta.Product.newBuilder() .setName(toolName) .setVersion(toolVersion)) .setOs(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.name"))) .setCpu(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.arch"))); ProtocolVersion.getVersion() .ifPresent(metaBuilder::setProtocolVersion); Messages.Meta.CI ci = detectCI(env); if (ci != null) { metaBuilder.setCi(ci); } return metaBuilder .build(); }
CreateMeta { public static Messages.Meta createMeta( String toolName, String toolVersion, Map<String, String> env ) { Messages.Meta.Builder metaBuilder = Messages.Meta.newBuilder() .setRuntime(Messages.Meta.Product.newBuilder() .setName(System.getProperty("java.vm.name")) .setVersion(System.getProperty("java.vm.version"))) .setImplementation(Messages.Meta.Product.newBuilder() .setName(toolName) .setVersion(toolVersion)) .setOs(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.name"))) .setCpu(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.arch"))); ProtocolVersion.getVersion() .ifPresent(metaBuilder::setProtocolVersion); Messages.Meta.CI ci = detectCI(env); if (ci != null) { metaBuilder.setCi(ci); } return metaBuilder .build(); } }
CreateMeta { public static Messages.Meta createMeta( String toolName, String toolVersion, Map<String, String> env ) { Messages.Meta.Builder metaBuilder = Messages.Meta.newBuilder() .setRuntime(Messages.Meta.Product.newBuilder() .setName(System.getProperty("java.vm.name")) .setVersion(System.getProperty("java.vm.version"))) .setImplementation(Messages.Meta.Product.newBuilder() .setName(toolName) .setVersion(toolVersion)) .setOs(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.name"))) .setCpu(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.arch"))); ProtocolVersion.getVersion() .ifPresent(metaBuilder::setProtocolVersion); Messages.Meta.CI ci = detectCI(env); if (ci != null) { metaBuilder.setCi(ci); } return metaBuilder .build(); }  }
CreateMeta { public static Messages.Meta createMeta( String toolName, String toolVersion, Map<String, String> env ) { Messages.Meta.Builder metaBuilder = Messages.Meta.newBuilder() .setRuntime(Messages.Meta.Product.newBuilder() .setName(System.getProperty("java.vm.name")) .setVersion(System.getProperty("java.vm.version"))) .setImplementation(Messages.Meta.Product.newBuilder() .setName(toolName) .setVersion(toolVersion)) .setOs(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.name"))) .setCpu(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.arch"))); ProtocolVersion.getVersion() .ifPresent(metaBuilder::setProtocolVersion); Messages.Meta.CI ci = detectCI(env); if (ci != null) { metaBuilder.setCi(ci); } return metaBuilder .build(); }  static Messages.Meta createMeta(
            String toolName,
            String toolVersion,
            Map<String, String> env
    ); static String removeUserInfoFromUrl(String value); }
CreateMeta { public static Messages.Meta createMeta( String toolName, String toolVersion, Map<String, String> env ) { Messages.Meta.Builder metaBuilder = Messages.Meta.newBuilder() .setRuntime(Messages.Meta.Product.newBuilder() .setName(System.getProperty("java.vm.name")) .setVersion(System.getProperty("java.vm.version"))) .setImplementation(Messages.Meta.Product.newBuilder() .setName(toolName) .setVersion(toolVersion)) .setOs(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.name"))) .setCpu(Messages.Meta.Product.newBuilder() .setName(System.getProperty("os.arch"))); ProtocolVersion.getVersion() .ifPresent(metaBuilder::setProtocolVersion); Messages.Meta.CI ci = detectCI(env); if (ci != null) { metaBuilder.setCi(ci); } return metaBuilder .build(); }  static Messages.Meta createMeta(
            String toolName,
            String toolVersion,
            Map<String, String> env
    ); static String removeUserInfoFromUrl(String value);  }