These are chat archives for jruby-gradle/jruby-gradle-plugin

12th
Oct 2015
R. Tyler Croy
@rtyler
Oct 12 2015 16:30
moin moin
Schalk W. Cronjé
@ysb33r
Oct 12 2015 17:25
?
rtyler @rtyler shrugs
Schalk W. Cronjé
@ysb33r
Oct 12 2015 18:38
Started at cloudbees?
Blane Dabney
@raelik
Oct 12 2015 18:41
So, the embedded server doesn't work with rubygem repository urls with usernames & passwords in them, regardless of what characters are in them
trying to track down the cause
Blane Dabney
@raelik
Oct 12 2015 18:47
I'm guessing it's really an issue with https://github.com/torquebox/rubygems-servlets
Either that, or there's a whole bunch of code for the proxy that I'm not finding :P
R. Tyler Croy
@rtyler
Oct 12 2015 18:54
@ysb33r today's the first day
@raelik yeah, that sounds like an issue with rubygems-servlets unfortunately
Blane Dabney
@raelik
Oct 12 2015 19:14
Actually, I managed to track the problem down deeper than that
the issue is in the nexus-ruby-tools
It doesn't support basic auth properly
More accurately, doesn't support it at all
Blane Dabney
@raelik
Oct 12 2015 19:37
that's where the actual fetching of the gem files occurs.
Blane Dabney
@raelik
Oct 12 2015 19:49
needs to have this added before that line:
String basicAuth = "BASIC " + javax.xml.bind.DatatypeConverter.printBase64Binary(url.getURL().getUserInfo());
url.setRequestProperty ("Authorization", basicAuth);
basically. It would need additional logic to only do that if they set a username and password in the URL
Blane Dabney
@raelik
Oct 12 2015 19:58
Not sure how to even report that to them though, the sonatype github repos are beyond confusing.
R. Tyler Croy
@rtyler
Oct 12 2015 20:24
@raelik indeed according to @mkristian some of their repos have gone private o_O
great find though!
Blane Dabney
@raelik
Oct 12 2015 20:28
@rtyler Thanks! There's a better way to Base64 encode, but it's Java 8 only I think
R. Tyler Croy
@rtyler
Oct 12 2015 20:30
o_O
@raelik if you submit an issue against jruby/gradle, that's something at the very least would be useful and traceable for @mkristian
since I really have no idea where to submit nexus-ruby-tools issues
Blane Dabney
@raelik
Oct 12 2015 20:32
No prob!
yeah, they added a java.util.Base64 class in Java 8
so you don't have to use external libraries, or an xml converter method...
String encoded = Base64.getEncoder().encodeToString("string to encode".getBytes(StandardCharsets.US_ASCII));
Blane Dabney
@raelik
Oct 12 2015 21:26
jruby-gradle/jruby-gradle-plugin#254
rtyler @rtyler nods