havenwood changed the topic of #ruby to: Ruby 3.3.0, 3.2.3, 3.1.4 https://www.ruby-lang.org | Rules https://ruby-community.com | Logs https://libera.irclog.whitequark.org/ruby
jenrzzz has joined #ruby
infernix has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz_ has quit [Ping timeout: 264 seconds]
Obsdark has quit [Quit: Nettalk6 - www.ntalk.de]
jenrzzz has joined #ruby
Munto has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
Munto has joined #ruby
<adam12> Na_Klar: Share some code.
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 256 seconds]
axsuul_ has joined #ruby
away has joined #ruby
legahc- has joined #ruby
mretka_weechat has joined #ruby
polishdu1 has joined #ruby
pavelz has joined #ruby
<Na_Klar> nvm, I decided to go a different route.
<Na_Klar> thx tho
Na_Klar has left #ruby [https://quassel-irc.org - Komfortabler Chat. Überall. ]
axsuul has quit [Ping timeout: 264 seconds]
mange has quit [Ping timeout: 264 seconds]
trillion_exabyte has quit [Ping timeout: 264 seconds]
polishdub has quit [Ping timeout: 264 seconds]
mx has quit [Ping timeout: 264 seconds]
legahc has quit [Ping timeout: 264 seconds]
splud has quit [Ping timeout: 264 seconds]
leftylink has quit [Ping timeout: 264 seconds]
mretka has quit [Ping timeout: 264 seconds]
pavelz_ has quit [Ping timeout: 264 seconds]
legahc- is now known as legahc
trillion_exabyte has joined #ruby
leftylink has joined #ruby
splud has joined #ruby
reset has joined #ruby
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
johnjaye has quit [Ping timeout: 256 seconds]
johnjaye has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
Munto has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
Munto has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
brokkoli_origina has quit [Ping timeout: 255 seconds]
fercell has quit [Ping timeout: 264 seconds]
fercell_ has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
brokkoli_origin has joined #ruby
Linux_Kerio has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
reset has quit [Quit: reset]
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
ruby[bot] has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
fercell_ has quit [Quit: ZNC - https://znc.in]
fercell has joined #ruby
pavelz has quit [Ping timeout: 255 seconds]
Vonter has quit [Ping timeout: 255 seconds]
Vonter has joined #ruby
pavelz has joined #ruby
brokkoli_origin has quit [Remote host closed the connection]
brokkoli_origin has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
llua has quit [Ping timeout: 256 seconds]
llua has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
llua has joined #ruby
jenrzzz has joined #ruby
_ht has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
grenierm has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
grenierm has quit [Quit: Client closed]
mange has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
ih8u has quit [Quit: ih8u]
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
graywolf has joined #ruby
otisolsen70 has joined #ruby
osc4rpt has quit [Ping timeout: 264 seconds]
osc4rpt has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz_ has quit [Ping timeout: 246 seconds]
Aminda has quit [Remote host closed the connection]
kerunaru has joined #ruby
Aminda has joined #ruby
infinity_fye has joined #ruby
infinityfye has quit [Ping timeout: 255 seconds]
crivic has joined #ruby
infinityfye_ has joined #ruby
graywolf has quit [Ping timeout: 255 seconds]
infinityfye_ has quit [Remote host closed the connection]
infinity_fye has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
cek has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
mretka_weechat is now known as mretka
mretka has quit [Changing host]
mretka has joined #ruby
osc4rpt has quit [Ping timeout: 264 seconds]
osc4rpt has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz_ has quit [Ping timeout: 268 seconds]
mange has quit [Quit: Zzz...]
osc4rpt has quit [Ping timeout: 264 seconds]
osc4rpt has joined #ruby
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz_ has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
Aminda has quit [Remote host closed the connection]
user71 has joined #ruby
Aminda has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
infinityfye has joined #ruby
jenrzzz has joined #ruby
Doc_X has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
graywolf has joined #ruby
cek has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
polishdu1 has quit [Ping timeout: 256 seconds]
polishdub has joined #ruby
hiepph9 has joined #ruby
jenrzzz has joined #ruby
Doc_IX has joined #ruby
Doc_X has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
otisolsen70_ has joined #ruby
otisolsen70 has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
user71 has quit [Quit: Leaving]
user71 has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
<[0x1eef_]> rapha: I've always used database_cleaner. It does the job.
jenrzzz has quit [Ping timeout: 264 seconds]
<[0x1eef_]> IME it's not a good idea to use seeds in your tests. I've tried that and it's just a headache. Probably better to use factory_bot.
osc4rpt has quit [Ping timeout: 252 seconds]
osc4rpt has joined #ruby
polishdub has quit [Quit: leaving]
jenrzzz_ has joined #ruby
jenrzzz has joined #ruby
hiepph9 has quit [Quit: Client closed]
hiepph9 has joined #ruby
hiepph9 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
ox is now known as oz
graywolf has quit [Quit: WeeChat 4.0.4]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
Vonter has quit [Ping timeout: 264 seconds]
reset has joined #ruby
Vonter has joined #ruby
gthank has quit [Quit: Textual IRC Client: www.textualapp.com]
<adam12> With Sequel, I usually open a transaction around the test that always rolls back.
<adam12> I've used "fixtures" in the last, but lately I just make an `Examples` namespace inside the object and some simple setup code there.
<adam12> So I might `User::Example.active` which returns an instance of User, or `User::Example.admin`. etc.
<adam12> It's nice that they are usable outside of the test too, such as if I'm futzing around at the console.
jenrzzz has joined #ruby
otisolsen70_ has quit [Read error: Connection reset by peer]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
crivic is now known as crivic-away
crivic-away has quit [Quit: crivic was here]
osc4rpt has quit [Remote host closed the connection]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
osc4rpt has joined #ruby
<adam12> $ sudo zfs list -o compressratio -H tank/gemdocs/yard
<adam12> 5.50x
<adam12> It's beautiful.
jenrzzz_ has joined #ruby
polishdub has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
szkl has quit [Quit: Connection closed for inactivity]
Pixi__ has joined #ruby
Pixi` has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
jenrzzz_ has joined #ruby
___nick___ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
osc4rpt has quit [Ping timeout: 255 seconds]
___nick___ has quit [Client Quit]
osc4rpt has joined #ruby
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
osc4rpt has quit [Ping timeout: 260 seconds]
osc4rpt has joined #ruby
jenrzzz_ has joined #ruby
<rapha> [0x1eef_]: it does the job of keeping rails from removing seeds before testing? because its name would kinda like imply the opposite lol
jenrzzz_ has quit [Ping timeout: 255 seconds]
___nick___ has quit [Ping timeout: 264 seconds]
<[0x1eef_]> IIRC there's a specific setting for that. But I only know it via rspec as: 'global fixtures'. I've found that to be the most problematic. There's implicit state that's not declared in the tests but somewhere else, and you usually have to know that implicit state pretty well. I think it's at odd withs good testing practices.
donofrio has quit [Read error: Connection reset by peer]
donofrio has joined #ruby
_ht has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 264 seconds]
<henk> rubocop is not happy about the complexity of the function (or method?) in https://git.netwichtig.de/cgit/user/henk/code/ruby/macir.git/tree/macir.rb?h=feature/challenges_per_apex&id=e3a206b8484ef7919053a38e4e6b92492c8a8642#n162 it says "Metrics/AbcSize: Assignment Branch Condition size for wait_for_challenge_on_ns is too high. [<7, 18, 4> 19.72/17]" among other things. I’m unsure what would be a
<henk> good way to split it up further. it all seems so tightly related. any advice? and if it’s "ignore rubocop, it’s fine in this case"
jenrzzz has joined #ruby
<[0x1eef_]> rapha: Probably you want to 'fixture :something' in the superclass of your tests. Maybe subclass ActiveSupport::TestCase, and then call the fixture name you want to be ever-present. That's how I understood how 'global fixtures' work in a vanilla Rails environment.
jenrzzz has quit [Ping timeout: 264 seconds]
<[0x1eef_]> henk: Can you shorten that link?
jenrzzz has joined #ruby
<adam12> henk: Maybe there's a method in there called `get_one_answer` or something.
<adam12> or maybe it's called `propogated?`
<rapha> not using any fixtures [0x1eef_] ... i would have understood if it emptied the DB once you load (a) fixture(s). but it's just doing it anyways. it's alright though, i don't need whatever rails/test_help is offering.
<adam12> henk: (I'm saying Extract Method for the inside of `loop` that does a singular fetch of something)
<[0x1eef_]> Don't go against the grain :) It is normal for the database to be tore down and set back up before every test. You can have the equivalent to the seeds. They're known as 'global fixtures' or maybe just fixtures in vanilla Rails.
<rapha> henk: fwiw i think rubocop is a nazi
<adam12> I'm not sure if this is a good method to break down tho. Rubocop might be off it's rails a bit.
<henk> [0x1eef_]: errr, I guess … I heard there are "short url services" but I have never used one. do you have a preferred one?
<adam12> I'd maybe try running `flog` on it and see if it has the same complaints.
<[0x1eef_]> Any is good. My screen is small and using urxvt so if it spans across two lines I usually can't open it.
<rapha> [0x1eef_]: sure, if this wasn't a legacy app with lots of seeds. also, if i didn't intensely dislike the indirection introduced by fixtures.
jenrzzz_ has joined #ruby
<[0x1eef_]> rapha: Fair enough. I'd still try to stay within conventions /best practices as much as I could. The next Rails developer that comes along will probably have a hard time understanding why it works that way.
<henk> [0x1eef_]: which client?
<[0x1eef_]> weechat
<henk> [0x1eef_]: do you know about "raw mode" I think it’s called, by default mapped to meta-l ? works nicely for me for long links.
<henk> adam12: yeah, I was thinking the same but that singular fetch is only one line anyway, then checking its value is also only 3 lines. so at most I could reduce it by 3 lines AFAICT. is that worth it?
<adam12> henk: I normally like to "unroll" my loops so I'd be looking to extract method anyways.
nmollerup has joined #ruby
<rapha> i'm that developer already, [0x1eef_]. right now, anything that lets me get the test coverage up quickly and without much effort, that's a good thing. otherwise the refactoring that needs to happen would just break my neck.
<rapha> (aside from that i'd agree with you)
<henk> rapha: yeah, some things are a bit much, seems to me … I’ll figure it out over time (:
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
<rapha> henk: fwiw i really like standard.rb (which uses rubocop internally). you can't configure it (that's the point), but you can disable everything and then enable things bit by bit, the ones you feel ready for.
<adam12> henk: Definitely lower flog scores if you extract method. https://gist.github.com/adam12/18eccb55272c5500388c313947056092
user71 has quit [Quit: Leaving]
<rapha> btw [0x1eef_] thanks for sharing database cleaner! that'll be a real gem in any non-rails app :)
<adam12> Could Extract Method the resolver setup too.
<adam12> Again, this could be a bad metric from Rubocop and would ultimately need a judgement call. Sometimes there's methods that make sense to extract, and sometimes it just makes a call order that is undecipherable.
<henk> rapha: I had heard about it but it’s not in debian, so I’m not using it d-:
<rapha> henk: what about gems you really need and which are not in debian? (which, in the case of debian, is an awful lot)
<henk> adam12: is "Extract Method" something special? some function in some tool?
<henk> rapha: I’ll deal with that when I have to (; so far I didn’t
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
<henk> thanks
jenrzzz has quit [Ping timeout: 255 seconds]
mange has joined #ruby
Linux_Kerio has quit [Quit: Konversation terminated!]
Linux_Kerio has joined #ruby
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
Linux_Kerio has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
<[0x1eef_]> rapha: I've always used it with Rails. :) Usually with factory_bot. Easy to define associations, and traits for specific states. Your approach makes sense but one day you'll probably want to get closer to being a 'normal' rails application.
jenrzzz_ has quit [Ping timeout: 260 seconds]
<[0x1eef_]> henk: I haven't heard of that. I'll probably take a look :) I think there could be something I can set in .Xresources as well.
<henk> [0x1eef_]: not much to "take a look", just press alt-l and see whether that fixes the url (: it’s just toggle, click url, toggle back. at least for me … not perfect but good enough for me and less added complexity and stuff to remember and/or lost screen space than some url bar or whatever …
kerunaru has quit [Quit: Iridium IRC Client]
kerunaru has joined #ruby
<[0x1eef_]> Ah I see! The URL is still too long to copy. That's the less cool side of 1368x768.
<[0x1eef_]> 1366x768 *
jenrzzz_ has joined #ruby
jenrzzz has joined #ruby
ruby[bot] has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
howdoi has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby