Skip to content

RSpec 3.1/Opal 0.8 Changes #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

RSpec 3.1/Opal 0.8 Changes #19

wants to merge 2 commits into from

Conversation

wied03
Copy link
Contributor

@wied03 wied03 commented May 19, 2015

Shouldn't be merged into master just yet (maybe a new branch), but I managed to get RSpec 3.1 working with Opal 0.8 (master branch right now).

In order to get around the RSpec dynamic require problem, I created a Rake task to try and ease the process of creating the opal/opal/rspec/requires.rb file. Check it out and see what you think.

@wied03
Copy link
Contributor Author

wied03 commented May 19, 2015

And by working, I mean that I can pass the specs (added 1 more) and I don't get any deprecation warnings or uncaught errors in the Javascript console

@elia
Copy link
Member

elia commented Jun 1, 2015

Any reason for not targeting rspec 3.2?

@wied03
Copy link
Contributor Author

wied03 commented Jun 1, 2015

@elia - No good reason. It's just the version I was using on a Ruby project. I could do the upgrade work to 3.2 for this PR. I wanted to get feedback before I went too far with this. The Rake task I setup to derive the requires file (rather than the old way of having to arrange it just right) hopefully will make it easier to stay current.

@elia
Copy link
Member

elia commented Jun 3, 2015

Don't bother, I checked out the branch and working on some cleanup in the util files, so I'll this branch along with those changes.

I'll close the other PR as I see it's included in this one.

@elia elia mentioned this pull request Jun 3, 2015
@wied03
Copy link
Contributor Author

wied03 commented Jun 3, 2015

Ok. In case its not obvious, the Rake task was designed to basically make
all of rspecs dynamic requires static but in a way that's easy to change.
Designed to be more of a developer tool than a CI driven thing.
On Jun 3, 2015 11:37 AM, "Elia Schito" notifications@github.com wrote:

Don't bother, I checked out the branch and working on some cleanup in the
util files, so I'll this branch along with those changes.

I'll close the other PR as I see it's included in this one.


Reply to this email directly or view it on GitHub
#19 (comment).

@elia elia mentioned this pull request Jun 3, 2015
wied03 added 2 commits June 3, 2015 18:15

Verified

This commit was signed with the committer’s verified signature. The key has expired.
ondrejmirtes Ondřej Mirtes
Browser formatter is the more detailed oriented (as compared to text/rake), so go ahead and include stack traces to ease debugging

Verified

This commit was signed with the committer’s verified signature. The key has expired.
ondrejmirtes Ondřej Mirtes
@wied03
Copy link
Contributor Author

wied03 commented Jun 4, 2015

I took a look at RSpec 3.2 just to get an idea. Seems like the easiest way to get over the rubyfeatures/eval problem was to add an 'ignore' capability to the create_requires.rb script I worked on and then put a pre_require version of that in.

The harder problem I ran into was super() crashing in RSpec::Configuration

@wied03
Copy link
Contributor Author

wied03 commented Jun 11, 2015

@elia I also did some work with formatters. Check out https://github.com/wied03/opal-rspec-formatter

I think it probably makes sense to keep this as a separate GEM. I monkey patch Opal::RSpec::RakeTask so that it has "2 mains", one to set the formatter and then whatever the Rake task (default opal-rspec, user, opal-rails) has specified. It's a little goofy, but I didn't want to have to do something special for opal-rails, etc. to work.

Thoughts?

Most of this was getting 'builder' to work, which I eventually did (that's another github repo - https://github.com/wied03/opal-builder). JUnit was the logical choice because most CI systems can read the results from that.

@elia
Copy link
Member

elia commented Jun 11, 2015

Thanks! Too bad I'm struggling to find the time to review and merge properly these PRs :)

@adambeynon
Copy link
Contributor

@wied03 Hey, just saw these two pull requests (been away for a while, but getting back into opal work now!). What's the status with these? The rspec work was always tricky, so I'm glad you were able to make progress with them

@wied03
Copy link
Contributor Author

wied03 commented Jun 23, 2015

@adambeynon , I think @elia was going to create an RSpec 3.1 branch and merge this PR into that. Then there would be a 'cleaner' baseline to evaluate the async PR and work on RSpec 3.2+

@elia
Copy link
Member

elia commented Jun 23, 2015

@adambeynon I started refactoring the files in the utils/ dir which was the only thing that I though needed a review. Can totally push the WIP somewhere if you want to continue from where I left.

Also I think it's notable that the RSpec guys were willing to have an opal-based online demo of RSpec once we updated to the latest release

@adambeynon
Copy link
Contributor

@elia, @wied03 Ah awesome. Yeah, any code would be great. I don't mind putting the shift in to get it all working.

@elia I do recall that - would be quite nifty to have that. Worth the push to get the newest stuff working straight on opal. They might be willing to help out with some of our monkey patching (mutable string fixes etc).

@elia
Copy link
Member

elia commented Jun 23, 2015

@adambeynon yes, they seemed happy to help with mutable string stuff and compat in general, will push in a moment

@elia
Copy link
Member

elia commented Jun 23, 2015

@wied03
Copy link
Contributor Author

wied03 commented Jul 9, 2015

@elia @adambeynon - Anything I can do to help move this along?

@elia elia closed this in #24 Jul 27, 2015
@wied03 wied03 deleted the opal-0.8-other/rspec-3.1 branch July 29, 2015 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants