Change test plugin to a fragment (and some ideas to discuss) #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi David,
most likely you are busy now, but I started doing some work on Rescripter again. Take your time...
The first thing is that I changed the test plugin to be a fragment of the editor plugin. This removed the need to expose internals by exporting it and to require anything but the test dependencies. A small thing. And then, as usual, I removed some warnings in the code (I have a reputation to keep ;-)
This is just the start. I was thinking about some things. Rescripter is in fact 3 things
ad 1)
I thought about generalizing the invioker - as I'm more into Ruby, why not provide the same function to JRuby. First step would be to use the javax.script to call Rhino. I did this on a prototype, because I wanted to do some BDD Prime Factors Code Kata with Jasmine. This works and is not that much work. The only drawback is that javax.script does not offer me a way to provide the script as argument, so the error messages get less meaningful. Next would be to reimplement the system.rs files in Java, so they are available to all scripting languages. Then it should work with JRuby.
ad 3)
I don't know how, but if we factor out the Jasmine test execution and result reporting Java and JavaScript into a separate module, this might be interesting to the Jasmine community. (I hadn't known Jasmine, but after some experiments and trying to implement my own reporter I have to say, it's cooool. See https://bitbucket.org/pkofler/js-katas/src/tip/lib) I will not do that in my katas project, more likely I do a Jasmine-Ant integration. One would also have to separate the runner from the Jasmine specific logic so people could choose: scriptrunner + rhino + jasmine. Whereas a jruby user would select scriptrunner + jruby + rescriptor (AST). Then Jasmine would be integrated in the plugin's globals and would not have to be copied into every project/demo project.
What do you think about that?
Regards, Peter