havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
nertzy has quit [Quit: Leaving]
nertzy has joined #ruby
cthulchu_ has quit [Ping timeout: 240 seconds]
alexherbo2 has quit [Ping timeout: 246 seconds]
cnsvc has quit [Quit: WeeChat 3.0]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx__ has quit [Read error: Connection reset by peer]
nofxx_ has joined #ruby
Technodrome has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
ropeney has quit [Quit: ZNC 1.7.4 - https://znc.in]
queip has quit [Remote host closed the connection]
ropeney has joined #ruby
akem has quit [Ping timeout: 240 seconds]
akem has joined #ruby
cthulchu_ has joined #ruby
queip has joined #ruby
mic_e_ has joined #ruby
fercell has joined #ruby
rigid has quit [Quit: +++ ATH]
rigid has joined #ruby
rzjian has joined #ruby
goepsilongo has joined #ruby
GodFather has joined #ruby
_whitelogger has joined #ruby
gearnode has quit [Ping timeout: 272 seconds]
ropeney_ has joined #ruby
ropeney has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
baojg has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
elcuervo has joined #ruby
cuerbot has quit [Ping timeout: 240 seconds]
CrazyEddy has joined #ruby
m27frogy has quit [Ping timeout: 256 seconds]
m27frogy_ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fercell has quit [Ping timeout: 240 seconds]
Hien has quit [Ping timeout: 264 seconds]
Hien has joined #ruby
goepsilongo has quit [Remote host closed the connection]
goepsilongo has joined #ruby
DaRock has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
m27frogy_ has quit [Ping timeout: 264 seconds]
GodFather has joined #ruby
mehwork has left #ruby [#ruby]
brainfunnel has quit [Quit: thanks, bye!]
weaksauce has quit [Ping timeout: 264 seconds]
DaRock has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Technodrome has joined #ruby
cow[moo] has joined #ruby
Vagabond[m] has joined #ruby
rzjian has quit [Ping timeout: 276 seconds]
rzjian has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
pwnd_sfw5 has joined #ruby
pwnd_sfw has quit [Ping timeout: 256 seconds]
pwnd_sfw5 is now known as pwnd_sfw
rzjian has quit [Ping timeout: 240 seconds]
m27frogy has joined #ruby
rzjian has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
pwnd_sfw9 has joined #ruby
pwnd_sfw has quit [Ping timeout: 246 seconds]
pwnd_sfw9 is now known as pwnd_sfw
duderonomy has joined #ruby
mehwork has joined #ruby
<mehwork> i'm hearing a lot of bad things about bundler, because of how outdated bundler is and how it installs everything into ~/.gem, doesn't use semver etc and would require a rewrite to improve. Is there plans for that or are people just going to live with it forever even as ruby and rails evolve?
Rudd0 has joined #ruby
caminus has joined #ruby
baojg has quit [Remote host closed the connection]
caminus has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has joined #ruby
gix- has quit [Ping timeout: 264 seconds]
weaksauce has joined #ruby
factormystic has quit [Read error: Connection reset by peer]
ByronJohnson has quit [Ping timeout: 256 seconds]
ByronJohnson has joined #ruby
neshpion has quit [Quit: neshpion]
factormystic has joined #ruby
m27frogy has quit [Ping timeout: 246 seconds]
baojg has joined #ruby
<apotheon> note to self: make a note somewhere more permanent to remember that .inputrc is what I want for vi keybindings in irb
<apotheon> "set editing-mode vi"
ChmEarl has quit [Quit: Leaving]
<mehwork> i use vim but can't stand vi mode. Anyway, just put that file in your dotfiles repo and you won't forget
pwnd_sfw has quit [Read error: Connection reset by peer]
pwnd_sfw has joined #ruby
va5c0 has joined #ruby
va5c0 has quit [Ping timeout: 258 seconds]
<JanHebler[m]> Has anybody successfull connected an pseudoterminal from pty.open to an xterm? I don't understand the meaning of the xterm-Options -Sccn. The manpage states: "The option value specifies the last few letters of the name of a pseudo-terminal to use in slave mode, plus the number of the inherited file descriptor." however, i cannot determine the correct number of the inherited file descriptor. If i choose one of the
<JanHebler[m]> descriptors of master or slave xterm fails with "Bad File Descriptor".
coniptor has quit [Read error: Connection reset by peer]
coniptor has joined #ruby
sinan has joined #ruby
cthulchu_ has quit [Ping timeout: 246 seconds]
nofxx__ has joined #ruby
nofxx_ has quit [Ping timeout: 264 seconds]
zacts has joined #ruby
rzjian has quit [Ping timeout: 240 seconds]
rzjian has joined #ruby
vondruch__ has quit [Quit: vondruch__]
goepsilongo has quit [Quit: Konversation terminated!]
vondruch__ has joined #ruby
goepsilongo has joined #ruby
titanbiscuit has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fercell has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
titanbiscuit has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ChewiB has quit [Ping timeout: 256 seconds]
al2o3-cr-tmp has joined #ruby
sinan has quit [Quit: sinan]
sinan has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
gix has quit [Ping timeout: 276 seconds]
weaksauce has quit [Ping timeout: 264 seconds]
factormystic3 has joined #ruby
jla has joined #ruby
<mehwork> What's weird about rails to me is that i don't see it requiring much Ruby code to be written by me. It seems 99% "framework" from the code bases i'm looking at
<mehwork> is that normal? To not write much ruby logic when writing a web app? I mean like functions are 3 lines ling, or are mostly declarative. When I do see an if/else block its like one statement in each if and else
factormystic has quit [Ping timeout: 276 seconds]
factormystic3 is now known as factormystic
totoro2022 has quit [Read error: Connection reset by peer]
schne1der has joined #ruby
totoro2022 has joined #ruby
kevinburke has quit [Quit: Connection closed for inactivity]
cowgomoo has joined #ruby
cowgomoo has quit [Client Quit]
titanbiscuit has quit [K-Lined]
x0n has quit [Ping timeout: 240 seconds]
gearnode has joined #ruby
ChewyB has joined #ruby
al2o3-cr-tmp has quit [Ping timeout: 256 seconds]
x0n has joined #ruby
alexherbo2 has joined #ruby
jla has quit [Ping timeout: 256 seconds]
<alexherbo2> yo o/
serard has joined #ruby
<serard> Hello
<serard> How can I use https://www.rubydoc.info/github/mitchellh/vagrant/Vagrant/Util/DeepMerge in a ruby file ? I'm not ruby :) I have a hash I want to merge, don't know how to call this method
zacts has quit [Ping timeout: 256 seconds]
Rounin has joined #ruby
jenrzzz has joined #ruby
<alexherbo2> serard: I have not tested this method, but the method `.deep_merge` takes 2 argument, one hash and another, and you can pass a block (a lambda), which takes 3 values (key, value_one, value_two), and you return the value to take.
<alexherbo2> the block is used to resolve conflicts
<serard> shall I write "myhash.deep_merge(muotherhash) ?
<alexherbo2> I don't know, it looks it is a class method, so it takes as arguments the hashes
<alexherbo2> Vagrant::Util::DeepMerge.deep_merge(hash_one, hash_two) do |key, value_one, value_two|
<alexherbo2> ...
<alexherbo2> end
pabs has quit [Ping timeout: 240 seconds]
<serard> alexherbo2, thank you very much !
al2o3-cr-tmp has joined #ruby
<alexherbo2> and you return the desired value
<alexherbo2> the block is called only when you have conflict
<alexherbo2> you can click on "View source"
<alexherbo2> is there guy used on testing?
<alexherbo2> I'm pretty new on rspec and want to know if I did it right
pabs has joined #ruby
<alexherbo2> in the https://github.com/alexherbo2/active-record.rb/tree/master/chapters/02-crud-basics directory, you can do `make test` or `make db-setup play`
<alexherbo2> (dependency is the gem sqlite3, and the binary sqlite3)
jenrzzz has quit [Ping timeout: 256 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
pabs has quit [Ping timeout: 276 seconds]
teclator has joined #ruby
cd has quit [Quit: cd]
al2o3-cr-tmp has quit [Quit: WeeChat 3.0]
TomyWork has joined #ruby
rzjian has quit [Quit: WeeChat 3.0]
serard has quit [Read error: Connection reset by peer]
va5c0 has joined #ruby
schne1der has quit [Quit: schne1der]
va5c0 has quit [Ping timeout: 272 seconds]
<phaul> alexherbo2: I don't think you should have multiple subjects in a single context. You can use let, subject should be that one thing "it" refers to in your examples
<phaul> there are some cases you could have used the is_expected shorthand, when subject is the argument of expect like L132-133, L142-143 etc.
coniptor has quit [Ping timeout: 272 seconds]
<phaul> I would also consider adding factory bot, and remove the baked in strings for attribute values like names / id
sinan has quit [Quit: sinan]
coniptor has joined #ruby
va5c0 has joined #ruby
al2o3-cr has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jla has joined #ruby
Furai has quit [Remote host closed the connection]
Furai has joined #ruby
queip has quit [Ping timeout: 246 seconds]
totoro2022 has quit [Ping timeout: 246 seconds]
totoro2022 has joined #ruby
baojg has quit [Remote host closed the connection]
al2o3-cr has quit [Quit: WeeChat 3.0]
baojg has joined #ruby
va5c0 has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
vondruch__ has quit [Quit: vondruch__]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
m27frogy has joined #ruby
coniptor has quit [Ping timeout: 246 seconds]
vondruch has joined #ruby
coniptor has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
akem is now known as akem1
ChewyB is now known as akem
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
somazero has joined #ruby
baojg has quit [Ping timeout: 264 seconds]
baojg has joined #ruby
linoge has joined #ruby
sinan has joined #ruby
al2o3-cr has joined #ruby
sinan has quit [Client Quit]
sinan has joined #ruby
somazero has quit [Quit: Leaving]
dka has quit [Quit: My Ex-Girlfriend once told me: I'm not a slut, I'm just popular]
jenrzzz has joined #ruby
<alexherbo2> phaul: I'm not sure what my subject is on some method, it is the pokemon, or the action "perform" (not sure about the name too)
factormystic2 has joined #ruby
somazero has joined #ruby
factormystic has quit [Ping timeout: 276 seconds]
factormystic2 is now known as factormystic
prepend has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
brainfunnel has joined #ruby
cow[moo] has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NL3limin4t0r_afk is now known as NL3limin4t0r
dka has joined #ruby
TCZ has quit [Quit: Dobranoc]
vondruch_ has joined #ruby
vondruch_ has left #ruby [#ruby]
vondruch has quit [Ping timeout: 240 seconds]
gearnode has quit [Ping timeout: 258 seconds]
gearnode has joined #ruby
hiroaki has quit [Ping timeout: 246 seconds]
somazero has quit [Quit: Leaving]
jla has quit [Ping timeout: 240 seconds]
hiroaki has joined #ruby
vondruch_ has joined #ruby
vondruch_ is now known as vondruch
sinan has quit [Quit: sinan]
serard has joined #ruby
serard has quit [Quit: Leaving]
serard has joined #ruby
duderonomy has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
ritsch_master has joined #ruby
<Cubixusin[m]> guys, when I use `bundle exec sidekiq -r ./worker.rb` it works good. Tasks in sidekiq themselves and they get done. However I would like the application to run together with the application web, so i added line in config.ru -> `require_all worker.rb` . App web works, sidekiq gui works, I see tasks in cron but the tasks do not get done. Any idea?
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 240 seconds]
ritsch_master has quit [Ping timeout: 276 seconds]
Iarfen has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has joined #ruby
factormystic has quit [Read error: Connection reset by peer]
factormystic2 has joined #ruby
Guest14662 has joined #ruby
<havenwood> mehwork: How is Bundler outdated? It's updated all the time and continues to be copied by other languages.
<havenwood> mehwork: Installing into ~/.gem is a RubyGems setting which can and is often changed. What's the criticism?
<havenwood> mehwork: How does Bundler not use semver?
jenrzzz has joined #ruby
<havenwood> mehwork: You can use RubyGems directly without Bundler if you prefer. I have my own nits with Bundler, but the criticisms you list aren't legitimate, just FUD.
<havenwood> mehwork: It's odd to pick a maintained piece of software that Yarn, Cargo, and other best in class new offerings copy from and pose it as a drag on Rails.
<havenwood> It's not.
<havenwood> If you want me to rant about Bundler, happy to, but being maintained and installing to RubyGems default location by default aren't issues.
Guest14662 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
coniptor has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 240 seconds]
<apotheon> I haven't heard "a lot of bad things about Bundler", so I'm a bit confused by that. It looks like havenwood gave a pretty good accounting of my questions regarding what's "wrong" with Bundler, too, so I won't repeat that.
<apotheon> I'm not even sure how one would identify it as "outdated". It Just Works™ with Rails, as far as my experience is concerned.
coniptor has joined #ruby
Technodrome has joined #ruby
GodFather has joined #ruby
croberts has joined #ruby
skryking has joined #ruby
va5c0 has joined #ruby
va5c0 has quit [Ping timeout: 240 seconds]
coniptor has quit [Ping timeout: 258 seconds]
akem has quit [Remote host closed the connection]
akem has joined #ruby
roadie has joined #ruby
coniptor has joined #ruby
ChmEarl has joined #ruby
brainfunnel_ has joined #ruby
brainfunnel has quit [Ping timeout: 256 seconds]
brainfunnel has joined #ruby
brainfunnel_ has quit [Ping timeout: 264 seconds]
jla has joined #ruby
fercell has quit [Ping timeout: 276 seconds]
neshpion has joined #ruby
Iarfen has quit [Ping timeout: 272 seconds]
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
dfucci has quit [Ping timeout: 240 seconds]
akem has quit [Remote host closed the connection]
akem has joined #ruby
dfucci has joined #ruby
Rounin has quit [Ping timeout: 256 seconds]
dfucci has quit [Ping timeout: 276 seconds]
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #ruby
<nakilon> https://dpaste.org/iYNo/slim why is "self" the same object but "@@" does not work the same and throw error? is class_variable_get the only possible way to access it?
akem has quit [Remote host closed the connection]
<nakilon> I mean, by looking at "self" I would feel like "okay I'm now in the same place where I was" but seems like not; and I would like to know the way to "get into the same place" again
akem has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
vondruch has joined #ruby
dfucci has joined #ruby
pabs has joined #ruby
User458764 has quit [Ping timeout: 240 seconds]
akem has quit [Ping timeout: 264 seconds]
User458764 has joined #ruby
dfucci has quit [Ping timeout: 264 seconds]
akem1 has quit [Ping timeout: 246 seconds]
GodFather has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
GodFather has joined #ruby
akem1 has joined #ruby
akem has joined #ruby
pabs has quit [Ping timeout: 276 seconds]
dfucci has joined #ruby
akem has quit [Remote host closed the connection]
va5c0 has joined #ruby
gix has joined #ruby
xf3rno has joined #ruby
<mehwork> havenwood: i was having this conversation in #node.js and #ror after learning bundler yesterday. I don't know if they're valid or not yet. I was just curious because people in node were saying those things
<havenwood> mehwork: Tell them that the Prophet Yahuda forged his steel in the fires of Bundler before bestowing light unto Yarn.
<adam12> lol
<mehwork> i always take things with a grain of salt when someoen attacks something they aren't using and using recently
coniptor has quit [Ping timeout: 276 seconds]
<mehwork> because either the thing has evolved since they last looked at it, or they didn't know about some setting that dismisses their concern
<mehwork> or they're nitpicking way too hard about some edge case
<mehwork> i'm just trying to decide if i want to accept rails work without knowing it yet (people are asking me to). So trying to get up to speed quick about pros/cons
gr33n7007h has joined #ruby
gr33n7007h has quit [Client Quit]
<nakilon> side note: things don't evolve alone -- while something is struggling to fix itself the alternatives keep improving themselves even better
<nakilon> see pithon
<mehwork> the biggest con i'm seeing so far is that i don't see people having to write much code in rails. I know that sounds like a pro, but to me it looks like the framework is doing 99% of the work for you and my programming skills might get weak
* nakilon hides in bunker
<adam12> O_O
al2o3-cr has quit [Ping timeout: 256 seconds]
<adam12> It definitely doens't do the 99%. Take a look at Gitlab. It's an insane number of lines, + Rails.
<adam12> It takes a way a ton of boilerplate tho; and if boilerplate grows your programming skills, you should be having a leg day somewhere too.
<adam12> mehwork: Have you written any Ruby or Rails yet? I wouldn't make a decision just by some nerds on IRC.
<adam12> (havenwood is the nerd btw)
coniptor has joined #ruby
<adam12> havenwood: I didn't know Yehuda had a part in yarn. That makes sense.
<mehwork> adam12: not yet beyond the basic tutorials. But even looking at rails code bases i haven't seen much logic. Is everything mostly declatrive, and with very simple ternaries?
<mehwork> i come from python/javascript so maybe i'm not used to that level of abstraction
<adam12> mehwork: A lot of people like small methods. So a lot of conditionals might live in a method with a name.
<mehwork> most of the rails code i'm seeing everywhere so far is a thousand 1-3 liner def statements
<mehwork> ok
<adam12> mehwork: It's easy to write code. It's much easier to _read_ code.
<mehwork> small methods aren't necessarily a bad thing, though can get daunting
<adam12> For Rails? Maybe the CRUD stuff is small, but that's because it just extracts the boilerplate. Work smarter not harder and all that.
weaksauce has joined #ruby
<adam12> Yeah. Small methods arent' a panecea, and they _can_ become hard to follow. But so can a large method with a ton of branches. So you kinda pick your poison.
<mehwork> true
<mehwork> i'm mostly just trying to find one place where some cool ruby code is being used in a rails code base. By cool i mean stuff i mean "normal" stuff i'm used to seeing like in JS or Python code, like functional stuff, storing stuff in a hash table, and
<mehwork> all that
<adam12> With regards to bundler; it's definitely not perfect and not without it's warts, but it has steady progress, people paid to work on it, etc.
<mehwork> maybe it's too magical for me
<adam12> mehwork: What's magical?
<mehwork> not explicit enough to follow the logic
<mehwork> just a lot of small methods like we said. Having to follow all of them to try to figure out what's going on and how things actually work
<adam12> Do you actually care about all of them tho? A small method means you can care about a small piece.
<mehwork> iow, not seeing many 'if' statements
<mehwork> adam12: normally i can understand an entire code base
<adam12> Branches are evil. Not seeing `if` statements is good, not bad. Sandi Metz has some videos on this topic, but you want to generally see more flat shapes when squinting at code, not huge swaths of indentation.
<mehwork> but i'm looking at a lot of ruby code and not really understanding anything but a tunnel vision idea of what might be going on, but that is a little scary in terms of "am i putting this in the right place?" "what happens if there's a bug with something underlying?"
jla has quit [Ping timeout: 264 seconds]
<mehwork> i just set up a rails json api with the '--api' flag and now i have no idea what to do. The documentation ended at that
<mehwork> https://guides.rubyonrails.org/v6.0/api_app.html it feels like they expect you to already know rails. As do a lot of the tuts i've seen so far
<mehwork> they give you some code generation commands and then stop, almost like it's a secret club. I'm almost waiting for the "now buy my ebook" spam link to actually learn it lol
<mehwork> any pointers to actual learning resources would be appreciated. So far i'm lost
<havenwood> mehwork: I'd recommend starting by taking a few minutes to make a very basic Rack app. (Bonus points for adding a trivial Rack middleware.) Then port your trivial Rack app to Roda and add a plugin or two for something your API might need.
<adam12> mehwork: Everything from the regular guides would still be applicable, sans the usual stuff that would render to a browser (like views). So after doing --api, I'd just circle back to any of the other guides.
<mehwork> see that type of thing is just more complicated. The _only_ reason i was even remotely attracted to rails is that it's supposed to be friendly/easier.
<havenwood> mehwork: Rails is a very complex Rack app that gives you a great head start if you're making something like Basecamp or Hey.
<havenwood> mehwork: Rails is lovely.
<mehwork> and so far it's "learn what 5 billion classes do" and now "use some other framework first"
pgib has joined #ruby
<havenwood> mehwork: Roda might be a better fit for a simple API like it seems you're targeting.
<havenwood> mehwork: https://roda.jeremyevans.net/
<mehwork> i'm already scared off i think
<mehwork> i've at least heard of rack, but not roda. I feel like it's gonna be constant rabit holes
TomyWork has quit [Remote host closed the connection]
ua has quit [Ping timeout: 256 seconds]
<havenwood> mehwork: Maybe take a look at Elixir and Phoenix.
<mehwork> as an alternatrive?
<havenwood> mehwork: If you're looking for a clear correct path, which seems to be the case, that might be a better fit.
<mehwork> yeah
<havenwood> mehwork: It's simple and solid, nice to deploy, great tooling, and easy to test—so an all around good option.
<havenwood> There's a lot borrowed from Ruby, but nice functional influences and the BEAM is great for deployment.
va5c0 has quit [Ping timeout: 264 seconds]
<mehwork> ok thanks i'll take a look
<havenwood> mehwork: Give Roda a try if you'd like to explore Ruby further. It's a joy to write APIs in Roda with Sequel.
duderonomy has joined #ruby
<mehwork> i'm not a fan of ORMs which is anther main blocker for me
<mehwork> i already know sql well, so it feels weirdd having a framework do queries for me
<mehwork> especially not knowing if they're generating decent sql
<havenwood> mehwork: The Ruby ORMs are happy to spit out the SQL they're generating.
<mehwork> i like the ruby language itself though, but since i mostly work in backend/web stuff it seems ruby wants to force these types of magical frameworks on people
<havenwood> mehwork: Sequel can be used pretty close to the metal, but no complaints from me if you prefer writing SQL as the gods intended.
<mehwork> ok, i'll have some more exploring to do first i guess
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
howdoi has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ua has joined #ruby
dhollin3 has joined #ruby
dhollinger has quit [Ping timeout: 264 seconds]
hiroaki has quit [Ping timeout: 246 seconds]
alexherbo23 has joined #ruby
xf3rno has quit [Quit: WeeChat 2.9]
<alexherbo23> when testing a model, creating an instance, do I have to know the property such as the name, etc. for testing?
<alexherbo23> also, factory bot is used for creating, but I need to create instance (not persisted yet in the database), such as testing .new with constructor parameters and block. how can I avoid managing the attributes, like factory bot allows?
alexherbo23 is now known as alexherbo2
<alexherbo2> I'm also not sure how to test my #reload method (the method returns a fresh instance sync from the database (unlike activerecord which modify in place the record))
orbyt_ has joined #ruby
<phaul> alexherbo2: to me this is a closer description of what's being tested https://gist.github.com/phaul/1792c02b6128817da44f07d916ee9c37
<phaul> oh I made a mistake. 1 second...
<alexherbo2> pokemon.reload does not change the object in place, it does (find under the hood), so pokemon.name in change will not work
Iarfen has joined #ruby
coniptor has quit [Ping timeout: 276 seconds]
dfucci has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
<phaul> that's what I was thinking, when I said I made a mistake, but then let defined methods memoize don't they. So second time it will not do find.
<phaul> So actually it's good, i think. I would have to double check that the memoization happens
istrasci has joined #ruby
coniptor has joined #ruby
<phaul> ah nvm. ignore this...
<phaul> I guess to me that's slightly confusing reload semantics.. but ok
<phaul> alexherbo2: how
<phaul> about this latest edit then?
<phaul> It's better not to put too much behaviour in subjects and lets, it can lead to confusions. especially that it memoizes. subject and let should just produce objects for test not behaviour
Rudd0 has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
<nakilon> I don't use and see no point in using "subject" at all
<phaul> nakilon: I think the primary purpose of it is the it { is_expected shorthand
<phaul> otherwise same as let
<nakilon> the race for shortening the code can go infinitely far but should have an end
<phaul> except if it's an "endless" method :)
ritsch_master has joined #ruby
dfucci has joined #ruby
duderonomy has joined #ruby
cthulchu has joined #ruby
pgib has quit [Quit: 00 PC LOAD LETTER]
Danishman has joined #ruby
orbyt_ has joined #ruby
cd has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
istrasci has quit [Quit: Ping timeout (120 seconds)]
istrasci has joined #ruby
Technodrome has joined #ruby
tsrt^ has quit []
jla has joined #ruby
einyoul has quit [Read error: Connection reset by peer]
einyoul has joined #ruby
azerifn has joined #ruby
azerifn has quit [Client Quit]
istrasci has quit [Quit: Connection closed]
jla has quit [Ping timeout: 276 seconds]
gix has quit [Disconnected by services]
gix- has joined #ruby
linoge has quit [Remote host closed the connection]
<mehwork> should i wait until ruby 3.0.1 to try version 3?
<mehwork> s/try/use in production
<havenwood> mehwork: Why would you wait?
<mehwork> using .0.0 releases in things are unstable
<havenwood> mehwork: Yes, that tends to be true.
<havenwood> mehwork: If you don't have good test coverage or ability to roll production to whatever you'd like quickly, you might consider waiting in an abundance of caution.
<mehwork> ok
<havenwood> mehwork: We have various apps already on 3.0 and others still on 2.7, but I don't know of any showstoppers in 3.0 that should prohibit upgrading.
<havenwood> mehwork: Avoid "experimental" features in 3.0 like Ractors if you want stability.
<havenwood> mehwork: I'd recommend the latest stable version, which is 3.0.0 at the moment.
<havenwood> mehwork: If there are issues, a 3.0.1 will be forthcoming shortly.
<havenwood> If there aren't issues, great!
<havenwood> mehwork: There were months and months of prereleases to work out problems. Sometimes tricky ones can linger a point release or two.
dasher00 has joined #ruby
<apotheon> Thus far, my stuff still runs just fine under 3.0 . . .
<apotheon> I must not have been moving fast enough or breaking enough things.
akem1 has quit [Quit: leaving]
akem has joined #ruby
ra66it has joined #ruby
dhollin has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
dhollin3 has quit [Ping timeout: 264 seconds]
neshpion has quit [Quit: neshpion]
va5c0 has joined #ruby
cthulchu has quit [Ping timeout: 256 seconds]
va5c0 has quit [Ping timeout: 246 seconds]
m27frogy has quit [Ping timeout: 272 seconds]
<alexherbo2> re
<alexherbo2> phaul: wow, much more readable
ra66it has quit [Quit: Textual IRC Client: www.textualapp.com]
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
istrasci has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
nertzy has quit [Ping timeout: 246 seconds]
nertzy has joined #ruby
jenrzzz has joined #ruby
m27frogy has joined #ruby
dnadev2 has joined #ruby
<dnadev2> i'm using devise and in the update def of my registrations controller i'm setting a different layout: render :layout => 'no_nav' unless is_owner? - this works, but when there are errors on the form submit it renders the main layout, not the no_nav one. any idea why?
serard has quit [Ping timeout: 272 seconds]
<dnadev2> when loading the edit page logs show the correct layout: Rendered devise/registrations/edit.html.haml within layouts/no_nav - but then on the submit with errors: Rendered devise/registrations/edit.html.haml within layouts/application
dfucci has joined #ruby
<dnadev2> no idea why it's using the layouts/application instead of whats specified in the edit def :/
istrasci has quit [Quit: Connection closed]
coniptor has quit [Ping timeout: 276 seconds]
solo has joined #ruby
solo has quit [Client Quit]
istrasci has joined #ruby
Rudd0 has joined #ruby
gearnode has quit [Ping timeout: 272 seconds]
dfucci has quit [Ping timeout: 276 seconds]
coniptor has joined #ruby
ritsch_master has quit [Ping timeout: 240 seconds]
gearnode has joined #ruby
dfucci has joined #ruby
istrasci has quit [Quit: Connection closed]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mehwork> havenwood: that's good to know
dfucci has quit [Ping timeout: 264 seconds]
gdc_m has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
Danishman has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
vidzmiore has joined #ruby
somazero has joined #ruby
dfucci has joined #ruby
shokohsc has quit [Ping timeout: 256 seconds]
Technodrome has joined #ruby
vidzmiore has quit [Quit: Connection closed]
somazero has quit [Remote host closed the connection]
gdc_m has quit [Quit: gdc_m]
dfucci has quit [Ping timeout: 276 seconds]