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
<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>
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
<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