Skip to content

Instantly share code, notes, and snippets.

@stepheneb
Created April 18, 2009 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stepheneb/97636 to your computer and use it in GitHub Desktop.
Save stepheneb/97636 to your computer and use it in GitHub Desktop.
patch for ruby maven gem
diff -ur /Users/stephen/dev/ruby/src/jruby.git/lib/ruby/gems/1.8/gems/maven_gem-0.0.1/lib/pom2gem.rb ./lib/pom2gem.rb
--- /Users/stephen/dev/ruby/src/jruby.git/lib/ruby/gems/1.8/gems/maven_gem-0.0.1/lib/pom2gem.rb 2009-04-17 22:59:32.000000000 -0400
+++ ./lib/pom2gem.rb 2009-04-17 21:12:49.000000000 -0400
@@ -39,13 +39,8 @@
when "groupId"
group = element.text
when "version"
+ spec.version = element.text
version = element.text
- # Unless the maven version string is a valid Gem version string create a substitute
- # by prefixing '0.1.' to whatever numbers are in the maven version string.
- unless Gem::Version.correct?(version)
- version = '0.1.' + version.gsub(/\D/, '')
- end
- spec.version = version
when "description"
spec.description = element.text
when "dependencies"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment