These are chat archives for opal/opal

31st
Mar 2015
Vitor Capela
@dodecaphonic
Mar 31 2015 19:12
I'm writing a wrapper for PouchDB and there's something to which I don't have the answer. I'm briding their responses wrapped in Natives, but I was wondering if it would be better to convert them to Hashes. Is there a consensus on what to do? Is there a standard way to perform that conversion?
Vitor Capela
@dodecaphonic
Mar 31 2015 19:20
A user can store documents with different shapes, so I'm not quite sure how to proceed.
Mitch VanDuyn
@catmando
Mar 31 2015 20:30
@elia (or anybody else, that knows) we are using opal-rspec, and /opal_spec is visible in our production app... is there a simple way to turn this off, that we just missed in the docs? (I had been sending this by mistake over in the volt room, sorry about that!)
Forrest Chang
@fkchang
Mar 31 2015 21:07
@dodecaphonic if you don't return hashes, document. I think the principle of least surprise would dictate that when coding in opal, objects are opal objects (i.e. we just code in Ruby), as being more comfortable and requiring less divergent thought, .i.e. "oh yeah, what this returns isn't really a Hash, so I can only use these 2 operators".
Vitor Capela
@dodecaphonic
Mar 31 2015 21:08
@fkchang That's what I think as well, for sure. That said, is there a helper to go from nested js.Object to a Hash already in place?
Forrest Chang
@fkchang
Mar 31 2015 21:08
@catmando /opal_spec is implemented as a rails engine, at the moment, I don't believe you can turn it off. That being said, I'm going to be doing some work on opal-rails and running specs, I could probably make it so it doesn't respond on production if you set some config value while I'm in there
Adam Beynon
@adambeynon
Mar 31 2015 21:11
@catmando @fkchang It used to be the case where the specs did not run in production. There must have been a regression some where (so at least the fix should be a simple one)
Vitor Capela
@dodecaphonic
Mar 31 2015 21:14
@fkchang Great, thank you!
Forrest Chang
@fkchang
Mar 31 2015 21:15
wow, github assets are running slow for me ..
@dodecaphonic did that link come through for you?
Vitor Capela
@dodecaphonic
Mar 31 2015 21:15
@fkchang Yes, perfect.
Forrest Chang
@fkchang
Mar 31 2015 21:16
hit ctrl-p to go back 1 line, and ctrl-m to do multi line edit on that code snippet, play around
assets won't load for me
Elia Schito
@elia
Mar 31 2015 23:10
@catmando I'll get it fixed tomorrow, …unless someone comes up with a PR in the meanwhile (9hrs left 😁)