<leftylink>
hmm, so we have take_while, fine... I sort of have a need for a take_while_and_also_the_first_thing_that_didnt
<leftylink>
maybe I just do a[..a.index { cond }]
<leftylink>
that should be fine?
<leftylink>
I guess that's a more sensible way to describe the thing I actually want anyway
<leftylink>
since before it would be either `a.take_while { cond } + [a.find { !cond }]` or `(prefix = a.take_while { cond }) + [a[prefix.size]]` which if we're going to either of things we might as well just do `a[..a.index { !cond }]`
__DuBPiRaTe__ has quit [Quit: Leaving]
jmcgnh has quit [Ping timeout: 260 seconds]
jmcgnh has joined #ruby
neuroevolutus has joined #ruby
neuroevolutus has quit [Ping timeout: 256 seconds]
neuroevolutus has joined #ruby
Vonter has joined #ruby
u0_a441 has joined #ruby
dvinciguerra has joined #ruby
dvinciguerra has quit [Remote host closed the connection]
dvinciguerra has joined #ruby
dvinciguerra has quit [Remote host closed the connection]
u0_a441 is now known as dvinciguerra
dvinciguerra has quit [Changing host]
dvinciguerra has joined #ruby
cappy has joined #ruby
dvinciguerra has quit [Quit: WeeChat 4.4.2]
dvinciguerra has joined #ruby
neuroevolutus has quit [Ping timeout: 256 seconds]
dvinciguerra has quit [Remote host closed the connection]
cappy has quit [Quit: Leaving]
gaussianblue has joined #ruby
araujo has joined #ruby
neuroevolutus has joined #ruby
grenierm has joined #ruby
BH23 has joined #ruby
neuroevolutus has quit [Quit: Client closed]
___nick___ has joined #ruby
leah2 has quit [Ping timeout: 255 seconds]
cappy has joined #ruby
leah2 has joined #ruby
wyclif has joined #ruby
araujo has quit [Remote host closed the connection]
grenierm has quit [Ping timeout: 256 seconds]
cappy has quit [Quit: Leaving]
konsolebox has joined #ruby
__DuBPiRaTe__ has joined #ruby
donofrio has joined #ruby
gaussianblue has quit [Quit: leaving]
shiru has joined #ruby
shiru has quit [Remote host closed the connection]
wyclif has quit [Quit: leaving]
fmccann has joined #ruby
fmccann has quit [Client Quit]
fmccann has joined #ruby
fmccann has quit [Client Quit]
dvinciguerra2 has joined #ruby
___nick___ has quit [Remote host closed the connection]
___nick___ has joined #ruby
c10l has quit [Ping timeout: 248 seconds]
c10l has joined #ruby
dvinciguerra has joined #ruby
ollysmith_ has quit [Quit: ZNC 1.9.1+deb2 - https://znc.in]
<Common-Lisp>
Is there a way to tell `gem install` to install a gem from a specific source?
<Common-Lisp>
Or said another way, is there a way to tell `gem install` to not try rubygems.org as a gem source, for one invocation only?
dvinciguerra has quit [Remote host closed the connection]
cappy has joined #ruby
<weaksauce>
Common-Lisp gem install --source should do it
<Common-Lisp>
weaksauce: The documentation for that flag indicates that it just *adds* the server to the list of upstream servers, do I have that right?
<weaksauce>
Common-Lisp i'm not sure. you could add a hosts file entry for rubygems.org to localhost to stop it from searching during that command
<weaksauce>
or use bundler and point it at a url
<weaksauce>
it will install it from a location and then you can just use it outside of bundler
<Common-Lisp>
Is there a way to install something using bundler without a separate project and Gemfile?
<weaksauce>
just make a folder, bundle init makesure you have the right ruby version and add the gem to the gemfile
<weaksauce>
what are you trying to accomplish?
<Common-Lisp>
I'm trying to test that my private gem server works in a ci/cd pipeline, basically
<Common-Lisp>
So I'm just writing a script to try and verify that I can install a gem from this server
<weaksauce>
gem install --source http://localhost rails just hangs for me so i don't think it fallsback to rubygems
<weaksauce>
make a gem that doesn't exist on rubygems.org and install it from your server to test
<Common-Lisp>
oh ok interesting, maybe the docs are misleading then, which is actually good for me!
<Common-Lisp>
thank you!
<weaksauce>
actually it was on my system ruby so that might not work Common-Lisp
<weaksauce>
i just installed fish and hadn't setup rbenv yet
<Common-Lisp>
oh no
<weaksauce>
you could try `GEM_SOURCE=someserver gem install --verbose somegem` to see if it avoids rubygems.org
<Common-Lisp>
it looks like it only hits rubygems.org, never my private server
tuxcrafter has joined #ruby
<Common-Lisp>
Ok I guess there's a way to do this by manually deleting ~/.gemrc, which works in CI but makes it scary to test locally, lol