Merge branch 'master' of https://github.com/jruby-gradle/jruby-gradle-plugin
This commit is contained in:
commit
a7d119e7a4
|
@ -188,6 +188,26 @@ class IvyXmlProxyServerIntegrationSpec extends Specification {
|
|||
findFiles (~/^asciidoctor-pdf.*\.gem$/).size() == 3
|
||||
}
|
||||
|
||||
@Issue('https://github.com/jruby-gradle/jruby-gradle-plugin/issues/380')
|
||||
void 'Resolve transitive which contains a single digit twiddle-wakka'() {
|
||||
setup:
|
||||
withBuildFile '''
|
||||
dependencies {
|
||||
something 'rubygems:asciidoctor-bibtex:0.3.1'
|
||||
something 'rubygems:bibtex-ruby:4.4.7', {
|
||||
force = true
|
||||
}
|
||||
}
|
||||
'''
|
||||
|
||||
when:
|
||||
build()
|
||||
|
||||
then:
|
||||
findFiles ~/^asciidoctor-bibtex-0.3.1.gem$/
|
||||
findFiles ~/^bibtex-ruby-4.4.7.gem$/
|
||||
}
|
||||
|
||||
private List<File> findFiles(Pattern pat) {
|
||||
new File(projectDir, 'build/something').listFiles(new FilenameFilter() {
|
||||
@Override
|
||||
|
|
|
@ -432,11 +432,21 @@ class GemVersion implements Comparable<GemVersion> {
|
|||
private static GemVersion parseTwiddleWakka(String singleRequirement) {
|
||||
String base = getVersionFromRequirement(singleRequirement, TWIDDLE_WAKKA)
|
||||
List<String> parts = base.tokenize(VERSION_SPLIT)
|
||||
if (1 == parts) {
|
||||
if (1 == parts.size()) {
|
||||
if (base =~ ONLY_DIGITS) {
|
||||
return new GemVersion(
|
||||
INCLUSIVE,
|
||||
base,
|
||||
null,
|
||||
OPEN_ENDED
|
||||
)
|
||||
}
|
||||
|
||||
throw new GemVersionException(
|
||||
"'${singleRequirement}' does not look like a correctly formattedGEM twiddle-wakka requirement"
|
||||
"'${singleRequirement}' does not look like a correctly formatted GEM twiddle-wakka"
|
||||
)
|
||||
}
|
||||
|
||||
String lastNumberPart = parts[0..-2].reverse().find {
|
||||
it =~ ONLY_DIGITS
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue