private File generateRubyMetaStub(final GemSpecification gemspec, final MavenArtifact artifact) throws IOException { final VelocityContext context = new VelocityContext(); context.put("gemVersion", gemspec.getVersion().getVersion()); context.put("groupId", artifact.getCoordinates().getGroupId()); context.put("artifactId", artifact.getCoordinates().getArtifactId()); context.put("type", artifact.getPom().getPackaging()); context.put("version", artifact.getCoordinates().getVersion()); if (artifact.getArtifactFile() != null) { context.put( "filename", createJarfileName( artifact.getCoordinates().getGroupId(), artifact.getCoordinates().getArtifactId(), artifact.getCoordinates().getVersion())); } final List<String> packageParts = new ArrayList<String>(); for (final String part : artifact.getCoordinates().getGroupId().split("\\.")) { packageParts.add(titleize(part)); } packageParts.add(titleize(artifact.getCoordinates().getArtifactId())); context.put("packageParts", packageParts); return generateRubyFile("metafile", context, "rubyMetaStub"); }
protected String getGemFileName(final GemSpecification gemspec) { return Gem.constructGemFileName( gemspec.getName(), gemspec.getVersion().getVersion(), gemspec.getPlatform()); }