emboss/krypt-core-jruby — comment on commit 182ba4bf7e362a1365b09c93b345dff217369241
File:  line 0
By emboss:

That is so cool, thank you! Have to play with this as soon as I'm home!

The parser spec in krypt should work with krypt-core-jruby right away. I first had the specs duplicated for both krypt-core-jruby and krypt-core, but then I figured this would be harder to synchronize. I also felt krypt was the best place to put them because I see the specs as a way to test and specify the behavior of krypt as a whole on the Ruby level, regardless of the implementation being done in native code or in Ruby... From your comments I would take it that you feel the same?

I run the specs locally by running them with -I/lib -I/lib, but I understand that's not an option for automated tests :)

So, regarding your points:

1. If you think it would be better to have the specs also in krypt and krypt-core, too, I would suggest we develop them on krypt, making krypt the master repository for specs and tests and then we simply copy them to krypt-core and krypt-core-jruby as needed for now? It would be nice, of course to have something automated for this process :) Maybe a commit hook could do it?

2. I added a test/unit test for Krypt::Asn1 yesterday, to see whether the basic principle of lazy parsing is working. Right now, some of them fail, because the values are not decoded to Ruby values yet. We could certainly expand these, for example we could merge in the Asn.1 tests from ext/openssl. I wanted to start a spec for Asn.1 today, and I guess it would become rather large. But if you want to, please feel free to start one yourself, or expand the stuff that's present today. I'd appreciate it a lot!

3. That would be awesome, because I have no experience with code coverage for C code! I also thought of maybe using something like Valgrind for krypt-core and maybe Findbugz or something equivalent for krypt-core-jruby. Continuous integration would be another nice to have...

I'm not sure how to prioritize, so please feel free to do the things you like best and that are most interesting to you. I will appreciate anything :)

To give you a short overview of what's missing functionality-wise:
In krypt-core the only thing still missing in is the encoding/decoding of the raw byte values into the appropriate Ruby types. Once I've committed the Asn.1 class for krypt-core-jruby, it will also be missing there. Another thing still missing, but I'll probably add this today, currently "Asn.1 headers" cannot be created from scratch without having parsed them first.

My plan was:

- Add "create headers from scratch" today
- Complete Asn1 class for krypt-core-jruby on Wednesday
- Complete Value en-/decoding by the end of the week

Next week:
- Finish docs, complete tests and specs (as far as is reasonable)
- Benchmarks comparing to OpenSSL::Asn.1, but also to other existing Java and C implementations
- Final report