adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.1, 2.7.3, 2.6.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
al2o3-cr has joined #ruby
Rounin has quit [Ping timeout: 240 seconds]
roshanavand_ has quit [Ping timeout: 265 seconds]
johnny56 has quit [Quit: johnny56]
johnny56 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jetchisel has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
DTZUZU_ has joined #ruby
DTZUZU has quit [Ping timeout: 240 seconds]
jetchisel has quit [Ping timeout: 265 seconds]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Ping timeout: 260 seconds]
DTZUZU has joined #ruby
thinkpad has quit [Ping timeout: 240 seconds]
DTZUZU_ has quit [Ping timeout: 240 seconds]
TomyLobo has quit [Read error: Connection reset by peer]
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
thinkpad has joined #ruby
thinkpad has quit [Ping timeout: 240 seconds]
thinkpad has joined #ruby
bonhoeffer has quit [Remote host closed the connection]
baojg has joined #ruby
cow[moo] has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #ruby
dpl has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
MalkbabY has joined #ruby
jenrzzz has joined #ruby
MalkbabY_ has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
gix has joined #ruby
ChmEarl has quit [Quit: Leaving]
KramerC has quit [Quit: Leaving]
robotbee has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
gix- has quit [Ping timeout: 252 seconds]
Technodrome has joined #ruby
KramerC has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
gix has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
DTZUZU has joined #ruby
neshpion has quit [Remote host closed the connection]
neshpion has joined #ruby
m27frogy has quit [Ping timeout: 260 seconds]
patr0clus has quit [Quit: Textual IRC Client: www.textualapp.com]
electrostat_ has joined #ruby
chamunks- has joined #ruby
lghtstkr has joined #ruby
kktt007 has quit [*.net *.split]
Guest41501___ has quit [*.net *.split]
maxmanders has quit [*.net *.split]
lightstalker has quit [*.net *.split]
Papa has quit [*.net *.split]
chamunks has quit [*.net *.split]
electrostat has quit [*.net *.split]
pelegreno_______ has quit [*.net *.split]
electrostat_ is now known as electrostat
Papa has joined #ruby
pelegreno_______ has joined #ruby
robotbee has joined #ruby
maxmanders has joined #ruby
Guest41501___ has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robotbee has quit [Ping timeout: 260 seconds]
kktt007 has joined #ruby
Tziltzal has joined #ruby
neshpion has quit [Quit: neshpion]
howdoi has joined #ruby
ur5us has quit [Ping timeout: 258 seconds]
Ishido has joined #ruby
Ishido has quit [Quit: Leaving]
Ishido has joined #ruby
robotbee has joined #ruby
hiroaki has quit [Ping timeout: 260 seconds]
hiroaki_ has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
hiroaki_ has joined #ruby
hiroaki has joined #ruby
Ishido has quit [Quit: Leaving]
jenrzzz has joined #ruby
dviola has quit [Quit: WeeChat 3.1]
ua has quit [Ping timeout: 252 seconds]
dpl has joined #ruby
teclator has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
naftilos76 has joined #ruby
ua has joined #ruby
vondruch has joined #ruby
Rounin has joined #ruby
vondruch_ has joined #ruby
vondruch_ has quit [Remote host closed the connection]
vondruch has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
Rudd0 has quit [Ping timeout: 246 seconds]
thinkpad has quit [Ping timeout: 268 seconds]
MalkbabY_ has joined #ruby
thinkpad has joined #ruby
gearnode has joined #ruby
MalkbabY has quit [Ping timeout: 252 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
dviola has joined #ruby
gearnode has quit [Quit: WeeChat 3.1]
gearnode has joined #ruby
robotbee has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sina has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
konsolebox_ has joined #ruby
konsolebox_ has quit [Ping timeout: 268 seconds]
nofxx has joined #ruby
konsolebox_ has joined #ruby
fandre1986 has joined #ruby
konsolebox_ has quit [Quit: .]
konsolebox has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
coniptor has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
AndreYuhai has joined #ruby
<AndreYuhai> Hey there, I've got a Rspec test where I use before(:all) and then inside define an instance varible. But then in my 3rd test case that variable becomes nil, any idea? I can post an example if what I am saying doesn't make sense :D
naftilos76 has quit [Quit: Leaving]
<adam12> AndreYuhai: Show code.
<AndreYuhai> adam12: Here it is https://paste.ofcode.org/XcQwiSm4rvp5sTpLmPDhW2
<AndreYuhai> that before should be before(:all), before(:each) works fine but when it's before(:all) then the @product becomes nil
<adam12> AndreYuhai: Are you sure you ever get a value or is it always nil? I wonder if `before(:all)` ran before fixtures were available.
<AndreYuhai> adam12: Since I am using it only once, it might always be nil. Let me output some value inside before block so I can see whether it's nil
<AndreYuhai> adam12: oh yea it's nil inside the block so fixtures might not be available as you said. Don't know why though
<adam12> AndreYuhai: Me neither. I don’t use Rspec or Rails :)
<AndreYuhai> Alright, at least now we know that there's something wrong with fixtures. Thank you! :)
Tziltzal has quit [Quit: Leaving.]
<adam12> AndreYuhai: In your case I might be inclined to just use `let`. Fixtures are loaded at boot in a Rails app, so there’s not a ton saved by initializing before all.
<adam12> (rather, they _used_ to always be loaded, but that could of changed)
<AndreYuhai> Alright, I will try to use let. I am just new to testing and all. Just following a book called Agile Web Development with Rails 5.1 :D
Rudd0 has joined #ruby
<regent> Using current publically available Ruby NPL stuff, would it be possible to teach Ruby to tell the difference between high quality and low quality products say coming out of my supplier's API?
jenrzzz has joined #ruby
jla has joined #ruby
<adam12> regent: NLP?
<regent> Low quality would be lots of details, multiple objects within a small area, lots of added on typography. Whereas high quality stuff would usually involve fewer objects, cleaner angles, less variance in material or skin, a more distinct foacl point just to think of a few
<regent> Machine learning sorry
<regent> I want to populate my Ruby (Solidus) store with an API from this supplier. Unfortunately they also sell a lot of crap, and it's way too time-consuming to manually sit and sort it all out
<regent> Curious if maybe you guys have heard of something similar having been done before
jenrzzz has quit [Ping timeout: 240 seconds]
<adam12> I’m not sure you could beat a human here. Maybe just integrate with MTurk or something?
<regent> Awesome suggestion
<regent> You always have the best advice adam12, thanks so much!
<adam12> regent: Cheers.
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
gray_-_wolf has quit [Quit: ZNC 1.7.1 - https://znc.in]
<adam12> AndreYuhai: The rspec book is good as well, fyi.
coniptor has joined #ruby
prion has joined #ruby
vondruch has quit [Ping timeout: 252 seconds]
gray_-_wolf has joined #ruby
ur5us has quit [Ping timeout: 258 seconds]
bonhoeffer has joined #ruby
gray_-_wolf has quit [Quit: ZNC 1.7.1 - https://znc.in]
jenrzzz has joined #ruby
cgfbee has quit [Read error: Connection reset by peer]
m27frogy has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
gray_-_wolf has joined #ruby
AndreYuhai has quit [Ping timeout: 240 seconds]
prion has quit [Ping timeout: 240 seconds]
cgfbee has joined #ruby
AndreYuhai has joined #ruby
AndreYuhai has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ruby
thinkpad has quit [Ping timeout: 240 seconds]
AndreYuhai has joined #ruby
thinkpad has joined #ruby
MalkbabY has joined #ruby
alexherbo20 has joined #ruby
MalkbabY_ has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Ping timeout: 252 seconds]
alexherbo20 is now known as alexherbo2
cuerbot has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
gray_-_wolf has quit [Quit: ZNC 1.8.2 - https://znc.in]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
<AndreYuhai> With FactoryBot I would like to have a model that either has or doesn't have a field so I can write test cases for both situations
<AndreYuhai> How would I achieve that?
<AndreYuhai> Like to create a product with a nil title or etc.
<AndreYuhai> I am not sure whether what I am looking for is transient attributes in FactoryBot
gray_-_wolf has joined #ruby
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
nertzy has joined #ruby
cd has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
shtirlic_ has joined #ruby
cow[moo] has joined #ruby
shtirlic has quit [Ping timeout: 265 seconds]
vondruch has joined #ruby
shtirlic has joined #ruby
supercoven has joined #ruby
shtirlic_ has quit [Ping timeout: 240 seconds]
shtirlic_ has joined #ruby
shtirlic has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
weaksauce has quit [Ping timeout: 240 seconds]
thinkpad has quit [Ping timeout: 252 seconds]
NL3limin4t0r_afk is now known as NL3limin4t0r
thinkpad has joined #ruby
akem has joined #ruby
jenrzzz has joined #ruby
thinkpad has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
thinkpad has joined #ruby
nertzy has quit [Quit: Leaving]
dpl has quit [Ping timeout: 240 seconds]
shtirlic has joined #ruby
shtirlic_ has quit [Ping timeout: 260 seconds]
<adam12> AndreYuhai: Probably two different “factories”.
<adam12> AndreYuhai: Or don’t use a factory at all, and just make a model instance manually with what you want. product = Product.new(title: nil); expect(product).to_not be_valid; expect(product.errors.on(:title)).to_not be nil
jla has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
<AndreYuhai> adam12: What I did is actually build one product with let and FactoryBot and then in each example just set the relevant field to nil
<AndreYuhai> But thanks for reminding me that product.errors part as well, I was not testing that.
jimms has joined #ruby
jenrzzz has joined #ruby
<adam12> AndreYuhai: Just remember that overuse of factories is a huge contributor to slow tests.
<AndreYuhai> By the way if I've got 2 different error messages for a specific field
<AndreYuhai> How would I test that?
jenrzzz has quit [Ping timeout: 240 seconds]
<AndreYuhai> It is not nil in either case anyway
<AndreYuhai> Not sure whether I should check .to eq [I18n.translate('errors.messages.taken')] or something like that
<AndreYuhai> adam12: I will keep that in mind, thanks!
<adam12> AndreYuhai: I might check includes. expect().to include(“something”). I think that’s rspec.
jenrzzz has joined #ruby
<AndreYuhai> adam12: That's it! Thank youu!
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby
dpl has joined #ruby
al2o3-cr has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
crankharder has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
AndreYuhai has quit [Quit: leaving]
<crankharder> my app's .bundle/config has BUNDLE_CACHE_ALL: "true" and BUNDLE_CACHE_ALL_PLATFORMS: "true" in it, but `bundle install` will not add `vendor/cache/nokogiri-1.11.3.gem` or any other nokogiri platforms for that matter. any ideas? goal here is to get the generic version and darwin installed in vendor/cache
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
<havenwood> crankharder: bundle package --all-platforms
jenrzzz has joined #ruby
ChmEarl has joined #ruby
akem has quit [Ping timeout: 252 seconds]
jetchisel has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
akem has joined #ruby
jenrzzz has joined #ruby
rapha has joined #ruby
<rapha> hi all
<rapha> is there a way of handing an argument into Process#fork ?
<rapha> (aside from writing it to a file and then reading it again, that is)
<rapha> (or Kernel#fork; not sure where the difference is)
jla has joined #ruby
<rapha> i'm sort of assuming it's got to be possible given that one can also hand in arguments to a command by adding them behind the command in Bash, etc... but perhaps that's a blue-eyed assumption?
MalkbabY_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
<rapha> oh nevermind my variable was out of scope even before the call to fork
MalkbabY has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
<NL3limin4t0r> rapha: Assuming you want to pass data while both processes are running you could create a pipe before hand
<NL3limin4t0r> See the #pipe documentation for an example
jenrzzz has quit [Ping timeout: 240 seconds]
<NL3limin4t0r> However forking a proces is not the same as running a system command. Fork clones the process, whereas a bash command runs a command.
<NL3limin4t0r> If the intention is to run a command you can use #system or backticks
<NL3limin4t0r> or #exec if you want to replace the current process
<havenwood> rapha: Whatcha doing?
<NL3limin4t0r> You can use #spawn if you want the command in a separate process
<havenwood> NL3limin4t0r: I even wonder if this is a job for popen?
<havenwood> I don't quite follow what rapha is doing.
jenrzzz has joined #ruby
<NL3limin4t0r> I forgot about #popen
<NL3limin4t0r> That's a pretty good one if you need to work with stdin/stdout off the command
jenrzzz has quit [Ping timeout: 252 seconds]
<rapha> NL3limin4t0r: only wanted to pass data in at the time of forking.
<rapha> havenwood: being confused by myself, as usual :P
robotbee has joined #ruby
<havenwood> rapha: Zoomed out, what's the purpose?
<havenwood> Running a command and piping to it?
<havenwood> A shell command?
<rapha> havenwood: nono, i just wanted to say "fork{puts(peter)}" and had forgotten to define "peter" before that.
<havenwood> rapha: So you want IPC between two Ruby processes?
<havenwood> Interprocess communication?
<havenwood> Like DRb or on your own with a UnixSocket or IO pipe (like NL3limin4t0r suggested)?
<havenwood> rapha: Have you tried DRb?
<havenwood> Pipes or a UnixSocket are fun too.
<havenwood> Try all three!
crankharder has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
cthulchu_ has joined #ruby
<rapha> nono
<rapha> all these are what NL3limin4t0r suggested
<rapha> i don't need any IPC
<rapha> all i needed was not to forget that a variable must have been declared before it can be read
<rapha> (d'uh!)
crankharder has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
howdoi has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
lockweel has joined #ruby
weaksauce has joined #ruby
Technodrome has joined #ruby
gix has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
lockweel has quit [Quit: Leaving]
Technodrome has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 252 seconds]
patr0clus has joined #ruby
jla has quit [Ping timeout: 240 seconds]
patr0clus has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jimms has quit [Remote host closed the connection]
jimms has joined #ruby
NL3limin4t0r is now known as NL3limin4t0r_afk
jimms has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
patr0clus has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
evdubs has quit [Quit: Leaving]
evdubs has joined #ruby
TCZ has joined #ruby
fandre1986 has quit [Quit: Connection closed]
Rudd0 has quit [Ping timeout: 252 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
hiroaki_ has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
robotbee has quit [Changing host]
robotbee has joined #ruby
hiroaki_ has joined #ruby
hiroaki has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
supercoven has quit [Ping timeout: 268 seconds]
gawlinski has quit [Ping timeout: 252 seconds]
gawlinski has joined #ruby
jenrzzz has joined #ruby
croberts has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jla has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
dpl has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
<dentarg> nevermind
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
MalkbabY has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
MalkbabY_ has quit [Ping timeout: 240 seconds]
ua has quit [Ping timeout: 252 seconds]
araujo has joined #ruby
ua has joined #ruby
jenrzzz has joined #ruby
splud is now known as bodge
bodge is now known as splud
jenrzzz has quit [Ping timeout: 252 seconds]
alexherbo2 has joined #ruby
hiroaki has quit [Quit: Leaving]
jenrzzz has joined #ruby
alexherbo24 has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo24 is now known as alexherbo2
jenrzzz has quit [Ping timeout: 260 seconds]
iNs has quit [Ping timeout: 240 seconds]
iNs has joined #ruby
gearnode has quit [Remote host closed the connection]
gearnode has joined #ruby
jla has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
gearnode has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
neshpion has joined #ruby
TCZ has quit [Quit: Do nothing unless you must, and when you must act -- hesitate.]
ur5us has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Azure has quit [Read error: Connection reset by peer]
fippy has quit [Quit: Leaving]
Azure has joined #ruby
jenrzzz has joined #ruby
cthulchu_ has quit [Ping timeout: 240 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Rudd0 has joined #ruby
e has quit [Quit: edk]
araujo has quit [Quit: My laptop has gone to ZZZzzz…]
crankharder has quit [Ping timeout: 240 seconds]
araujo has joined #ruby
araujo is now known as Guest87551
jetchisel has quit [Ping timeout: 240 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
Guest87551 has quit [Quit: see ya...]
gearnode has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
akem has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
fippy has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jetchisel has joined #ruby
cliluw has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
Rounin has quit [Ping timeout: 240 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
elcuervo has quit [Quit: ZNC 1.7.5 - https://znc.in]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]