<depesz>
hi. so, i installed vscode, and in it Ruby extension, which installed also vscode ruby extension.
<depesz>
but it doesn't seem to suggest anything - created new .rb file, editor sees it as ruby, but when i types req - it doesn't suggest any completion (like for require), even after pressing ctrl-space.
<depesz>
any idea on what I could have done wrong?
Linux_Kerio has joined #ruby
cxl has joined #ruby
teclator has joined #ruby
ur5us has joined #ruby
walez has joined #ruby
andrea[m] has quit [Quit: You have been kicked for being idle]
<cxl>
Hi all, how do I remove line returns in a ruby HEREDOC? I tried <<~STR{,.chomp,.strip} but none work. I want to remove indentation AND new lines.
<gr33n7007h>
cxl: <<~STR.gsub(/\p{Space}/, '')
<gr33n7007h>
but this will remove all whitespace
<sam113101>
isn't there a type of heredoc that removes indentation automatically?
<sam113101>
I never remember which one is which, I have to look it up every time
<gr33n7007h>
sam113101: <<~ the squiggly one xD
<sam113101>
I wish =begin and =end could be indented
<gr33n7007h>
sam113101: jesus, don't use those for crying out loud lol
<sam113101>
gr33n7007h: why not? lol
<gr33n7007h>
sam113101: of course, it's just style choice xD
<sam113101>
gr33n7007h: how do you comment multiple lines?
<gr33n7007h>
# on multiple lines like 99.9% of the populace
<sam113101>
gr33n7007h: I take it your editor does it for you?
<gr33n7007h>
sam113101: it's set it my editors config for sure
crax23 has joined #ruby
<sam113101>
gr33n7007h: which editor do you use?
_ht has joined #ruby
<gr33n7007h>
i typically use vim or nano
<gr33n7007h>
i'm old skool lol
cartdrige has quit [Ping timeout: 240 seconds]
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
<sam113101>
I use vscode with a vim plugin
<gr33n7007h>
visual studio seems like a great choice within the ruby community
<gr33n7007h>
i should try it out some day
<gr33n7007h>
https://www.warp.dev/ this looks incredible. i'm patiently waiting for linux support
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
John_Ivan_ has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
John_Ivan has quit [Ping timeout: 256 seconds]
grokify has joined #ruby
cartdrige has joined #ruby
grokify has quit [Remote host closed the connection]
szkl has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
D_A_N has joined #ruby
dionysus69 has quit [Quit: dionysus69]
___nick___ has quit [Ping timeout: 268 seconds]
___nick___ has joined #ruby
crax23 has quit [Ping timeout: 260 seconds]
Davidian has joined #ruby
<cxl>
If I have a call to `system(...)` in an object, where does `system` come from? I though it'd be Kernel, but in my test, if I use `allow(Kernel).to receive(:system).and_return(false)`, the `system()` call still uses the original implementation and not my mock.
<cxl>
with RSpec
<adam12>
cxl: It does come from Kernel, but I believe Kernel is mixed into Object.
<cxl>
I'm struggling so much with mocking, it feels like it's the wrong way to go.
<cxl>
In one instance, I have an ActiveJob, when I pass an MyModel id to it, it updates one of its properties to a new value. So I'm trying to have MyModel#update return false, to test the behavior in that case. For the last two hours I haven't been able to actually have #update return false. It's either the original implementation that is called, or the whole MyModel is stubbed and I'd have to mock all the other
<cxl>
methods that are used from it.
<cxl>
And in that other case, I can't figure out how to mock `system` so that it returns false, and I can test the job's behavior when the command fails.
<cxl>
So... how do you test these things while remaining sane?
c10l has quit [Quit: See ya! o/]
jhass has quit [Quit: Bye]
<adam12>
cxl: I pass in my dependency.
<adam12>
Share code.
graywolf has joined #ruby
c10l has joined #ruby
jhass has joined #ruby
moldorcoder7 has joined #ruby
c10l has quit [Client Quit]
graywolf has quit [Quit: WeeChat 3.5]
c10l has joined #ruby
vk has joined #ruby
walez has quit [Ping timeout: 260 seconds]
comet23 has joined #ruby
vk has quit [Quit: Client closed]
graywolf has joined #ruby
comet23 has quit [Quit: Client closed]
weaksauc_ has joined #ruby
desnudopenguino has quit [Ping timeout: 256 seconds]
desnudopenguino has joined #ruby
weaksauce has quit [Ping timeout: 260 seconds]
walez has joined #ruby
comet23 has joined #ruby
graywolf has quit [Quit: WeeChat 3.5]
cartdrige has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
donofrio has joined #ruby
<kinduff>
I need to transmit a 30MB payload to the browser that comes from a background job. I've been trying to use Sidekiq + TurboStreams but my Redis instance is being killed due to high RSS. I'm looking for alternatives. Does anyone have a suggestion?
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
crax23 has joined #ruby
grokify has quit [Remote host closed the connection]
cartdrige has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
comet23 has quit [Quit: Client closed]
<adam12>
kinduff: What kind of payload is 30MB?
<adam12>
kinduff: I'd write it somewhere maybe.
grokify has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.7.1]
crax23 has quit [Ping timeout: 268 seconds]
Davidian has quit [Quit: Connection closed for inactivity]
goldfish has joined #ruby
jetchisel has joined #ruby
ur5us has joined #ruby
grokify has quit [Remote host closed the connection]
cartdrige has joined #ruby
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 268 seconds]
_ht has quit [Remote host closed the connection]
___nick___ has quit [Ping timeout: 256 seconds]
FetidToot has quit [Ping timeout: 256 seconds]
lagash has quit [Ping timeout: 246 seconds]
FetidToot has joined #ruby
walez has quit [Ping timeout: 260 seconds]
kiwi_36 has joined #ruby
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
crax23 has quit [Ping timeout: 268 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 268 seconds]
ruby[bot] has quit [Remote host closed the connection]