These are chat archives for opal/opal

Aug 2017
Jamie Gaskins
Aug 19 2017 04:36 UTC
Feel free to submit a PR
Barrie Hadfield
Aug 19 2017 05:06 UTC
@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
Aug 19 2017 05:28 UTC
i've been checking my old projects, and returning to 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
Aug 19 2017 07:16 UTC

@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
Aug 19 2017 07:39 UTC
@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
Aug 19 2017 07:40 UTC
how can i run a single rspec (upto_spec.rb) ?
I managed to clone opal and run all specs
Bernhard Weichel
Aug 19 2017 07:56 UTC
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]

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
Aug 19 2017 07:57 UTC

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

This should work, see the hacking guide:

Bernhard Weichel
Aug 19 2017 08:05 UTC

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

But it says

0 examples, 0 failures (time taken: 0.012000083923339844)

is there a filter which I need to turn off?

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