lib/maven/tools/dsl/project_gemspec.rb in maven-tools-1.0.6 vs lib/maven/tools/dsl/project_gemspec.rb in maven-tools-1.0.7
- old
+ new
@@ -42,13 +42,17 @@
con = spec.homepage.sub( /http:/, 'https:' ).sub( /\/?$/, ".git" )
@parent.scm :url => spec.homepage, :connection => con
end
spec.licenses.each do |l|
- lic = Maven::Tools::LICENSES[ l.downcase ]
- @parent.license( :name => lic.short,
- :url => lic.url,
- :comments => lic.name )
+ if Maven::Tools::LICENSES.include?(l.downcase)
+ lic = Maven::Tools::LICENSES[ l.downcase ]
+ @parent.license( :name => lic.short,
+ :url => lic.url,
+ :comments => lic.name )
+ else
+ @parent.license( l )
+ end
end
authors = [ spec.authors || [] ].flatten
emails = [ spec.email || [] ].flatten
authors.zip( emails ).each do |d|
@parent.developer( :name => d[0], :email => d[1] )