adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://libera.irclog.whitequark.org/ruby/
cocalero has joined #ruby
cocalero has quit [Client Quit]
Linux_Kerio has quit [Ping timeout: 268 seconds]
wra1th has quit [Quit: wra1th]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
walez has quit [Ping timeout: 256 seconds]
crax23 has joined #ruby
ur5us has joined #ruby
Y05hito__ has quit [Ping timeout: 256 seconds]
sixpiece has joined #ruby
<sixpiece> can someone help me to use rspec?
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
<adam12> sixpiece: I suggest just asking, with the realization that it's Saturday night and not many people might be about :)
<sixpiece> I installed it lol
<sixpiece> and now I don't really know what to do
<sixpiece> I mean I am watching this video and the guy is so fast and somewhere else and everything I search is so vague and
<sixpiece> wrong area
va5c0 has joined #ruby
<sixpiece> what do I do to like get started ?
<sixpiece> is there a simple test I can do?
va5c0 has quit [Quit: WeeChat 3.7.1]
<sixpiece> for example one says install then run rspec --init
<sixpiece> but then I get command not found
<weaksauce> you need to install rspec first
va5c0 has joined #ruby
<sixpiece> I did
<sixpiece> I did gem install rspec
<sixpiece> you're right it wasn't installed
<sixpiece> thanks weaksauce
va5c0 has quit [Quit: WeeChat 3.7.1]
va5c0 has joined #ruby
va5c0 has quit [Client Quit]
va5c0 has joined #ruby
va5c0 has quit [Client Quit]
va5c0 has joined #ruby
va5c0 has quit [Client Quit]
_73 has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
Rounin has quit [Ping timeout: 260 seconds]
<sixpiece> any hint how to set it up
<sixpiece> ?
<weaksauce> set up what?
<weaksauce> i am not in love with rspec but it's used a lot
<sixpiece> thanks
<sixpiece> I am just wondering how to run a basic test
<sixpiece> which one do you recommend if not rspec?
<sixpiece> sorry I didn't notice you were here, weaksauce
<weaksauce> sixpiece rspec is fine or minitest
<weaksauce> rspec just has a lot of "magic" and a lot of extra syntax
<weaksauce> it's fine but a bit much
<sixpiece> how can I make a test with rspec?
<sixpiece> I did the rspec --init
<sixpiece> this is kind of helping
Al2O3 has quit [Ping timeout: 268 seconds]
<sixpiece> I have a file called main.rb
<sixpiece> is there a way I can perform a test on that?
<sixpiece> with a seperate file
moldorcoder7 has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 256 seconds]
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #ruby
Milos has quit [Ping timeout: 248 seconds]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
Milos has joined #ruby
Al2O3 has joined #ruby
sixpiece has quit [Remote host closed the connection]
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #ruby
Sankalp has quit [Ping timeout: 256 seconds]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
Sankalp has joined #ruby
reset has quit [Ping timeout: 268 seconds]
Sankalp has quit [Ping timeout: 268 seconds]
grokify has joined #ruby
Sankalp has joined #ruby
grokify has quit [Ping timeout: 256 seconds]
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #ruby
<sam113101> guys
Aminda has quit [Ping timeout: 255 seconds]
Aminda has joined #ruby
gr33n7007h has quit [Ping timeout: 252 seconds]
D_A_N has quit [Quit: leaving]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
gschanuel0 has joined #ruby
gschanuel has quit [Ping timeout: 252 seconds]
gschanuel0 is now known as gschanuel
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
cxl has quit [Quit: bye]
gschanuel has quit [Quit: The Lounge - https://thelounge.chat]
<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]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 268 seconds]
gr33n7007h has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
<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
<gr33n7007h> mac OS users, you lucky people xD
crax23 has quit [Ping timeout: 260 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
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]
ruby[bot] has joined #ruby
lagash has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]