These are chat archives for opal/opal

19th
Aug 2017
Jamie Gaskins
@jgaskins
Aug 19 2017 04:36
Feel free to submit a PR
Barrie Hadfield
@barriehadfield
Aug 19 2017 05:06
@fkchang I have been thinking about your question. Would it perhaps server us to have a larger number of us all propose talks about Opal/Hyperloop/Clearwater and using Ruby with NPM/Webpack/React, etc - ie just a deluge of “ruby is not just for the backend anymore” proposals?
Tomasz Wegrzanowski
@taw
Aug 19 2017 05:28
i've been checking my old projects, and returning to https://github.com/taw/opal-d3 i'm wondering if there's any way to configure opal-rspec to print proper lines when there's an exception
right now i'm getting this:
1) d3 misc methods d3.version
   Failure/Error: Unable to find matching line from backtrace

   expected: "4.4.3"
        got: "4.5.0"

   (compared using ==)
 # $$handle_matcher@http://localhost:9999/assets/opal/rspec/sprockets_runner.js:36031:203
 #
 #   Showing full backtrace because every line was filtered out.
 #   See docs for RSpec::Configuration#backtrace_exclusion_patterns and
 #   RSpec::Configuration#backtrace_inclusion_patterns for more information.

Finished in 2.78 seconds (files took 5.02 seconds to load)
869 examples, 1 failure, 123 pending
(the error itself is not very relevant, lack of file:line is)
Elia Schito
@elia
Aug 19 2017 07:16

@taw to see ruby line numbers you'd need to link source maps with the js platform in use and do the mapping, I think node has the API needed to do that, in the browser could depend on the vendor. If you just wanted to get the js lines then should be much easier.

@/all Anyway I'm (slowly) progressing on the update of Opal-RSpec to make it work with master. Once that is done I think we can release 0.11. My thought-process has been that many many projects use Opal-RSpec and releasing without proper support would be counterproductive. Please correct me if I'm mistaken or let me know what you think 🤙🏻

Elia Schito
@elia
Aug 19 2017 07:39
@fkchang knowing the talk selection process and the selectors maybe could help in molding the proposal in a way that makes it more appealing for them and touches topics they care about. In theory, Opal should be the perfect fit for rubyconf… I'd be happy to help reviewing the proposals if you want 🙂
Bernhard Weichel
@bwl21
Aug 19 2017 07:40
how can i run a single rspec (upto_spec.rb) ?
I managed to clone opal and run all specs
Bernhard Weichel
@bwl21
Aug 19 2017 07:56
I tried bundle exec rspec spec/ruby/library/date/upto_spec.rb
and got
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin15]


1)
An exception occurred during: loading /Users/beweiche/.rvm/gems/ruby-2.4.1/bin/rspec ERROR
SystemStackError: stack level too deep
/Users/beweiche/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/optparse.rb:827:in `fetch'
Elia Schito
@elia
Aug 19 2017 07:57

$ bundle exec rake mspec_ruby_nodejs PATTERN=spec/ruby/core/string/sub_spec.rb

This should work, see the hacking guide:

https://github.com/opal/opal/blob/master/HACKING.md

Bernhard Weichel
@bwl21
Aug 19 2017 08:05

I did bundle exec rake mspec_ruby_nodejs PATTERN=spec/ruby/library/date/upto_spec.rb

But it says

finished
0 examples, 0 failures (time taken: 0.012000083923339844)
`

is there a filter which I need to turn off?

Bernhard Weichel
@bwl21
Aug 19 2017 08:55
found it, i uncommented the line in filters/bugs/date.rb
Bernhard Weichel
@bwl21
Aug 19 2017 11:13
@JacobEvelyn. Pr will come as i now managed to run the test. I will provide Date#step Date#upto an Date#downto
Tomasz Wegrzanowski
@taw
Aug 19 2017 15:54
@elia Is that setup descriped anywhere? I just bundle exec rake to run opal-rspec specs
Bernhard Weichel
@bwl21
Aug 19 2017 16:13
@JacobEvelyn sorry, I wanted to mention @jgaskins