boberetezeke has quit [Remote host closed the connection]
boberetezeke has joined #opal
fkchang has joined #opal
<fkchang>
adambeynon: ping - want to make some changes to opal-rails, elia suggest we get u involved
<adambeynon>
fkchang: sure thing
<adambeynon>
what are you thinking of?
<fkchang>
I figured out why the rake opal:spec doesn't work 1) s.main somehow gets overriden by the block.call, which I temporarily fixed by setting it after the block (still need to fix this so it can be overriden) 2) the main is opal-rspec's sprockets_runner, which looks for the specs in RAILS_ROOT/spec which isn't where they are, so I temporarily made an opal-rails specific sprockets_runner that looks in app/assets/javascripts, but that brings
<fkchang>
a 3rd problem, //require_tree . forces opal to compile specs -- in my dev project, I stubbed out the specs in application.js but that really sucks. So I think we should put the opal specs elsewhere, and then I can fix the rake task, the new sprockets_runner, the /opal_spec route that compiles in the browser and the matching docs all in 1 PR. Just need to know where stuff should go and if you agree
<fkchang>
adambeynon: ^^'
<adambeynon>
fkchang: the require_tree thing is really annoying, I agree there. I suppose I have never thought about a better dir structure than having the specs inside app/assets/javascripts/spec
<adambeynon>
maybe we need a recommended solution
<adambeynon>
(and allow that to be overridden if desired)
<adambeynon>
fkchang: also, the rake task was always a bit delicate for me, so I resorted to in browser testing
<adambeynon>
if we can get the rake task working, that would be awesome
<fkchang>
adambeynon: I certainly can get the rake task working, but I'd want to put it so require_tree doesn't always compile it. Elia thought you might've already found a good place
<fkchang>
I might suggest Rails.root/opal/spec
<adambeynon>
fkchang: out of interest, does your app code go into app/assets/javascripts/*
elia has joined #opal
<fkchang>
adambeynon: yeah, my app code goes in app/assets/javascripts/* -- I thought I remembered an app/assets/opal/* in one of the previous incarnations of opal-rails