jessedoyle / duktape.cr

Evaluate JavaScript from Crystal!
MIT License
137 stars 17 forks source link

runtime interface implementation #8

Closed jessedoyle closed 8 years ago

jessedoyle commented 8 years ago

After working with the Duktape API calls for some time, I've noticed that many use-cases don't require the low-level usage of many Duktape calls.

This pull request implements a higher level Duktape::Runtime class that takes inspiration from the ExecJS API.

The entire Runtime API is as follows:

I expect this Travis build to fail as the bug that is causing the failure was just fixed in Crystal master.

jessedoyle commented 8 years ago

I've tested all the specs on OS X 10.11 with the current latest Crystal master branch and everything passes. I'd really like to get a passing TravisCI build, but I think that's going to have to wait for the next release of Crystal.