-
Notifications
You must be signed in to change notification settings - Fork 66
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
Problems with JRuby? #60
Comments
Hi, sorry for my late reply. Instead of a monkey patch, Passbook::PKPass support a custom signer as second argument. That would give you something like this require 'jruby_signer'
my_signer = Passbook::JRubySigner.new
my_pass = Passbook::PKPass.new 'data', my_signer
... Hope this will help |
Good to know, thanks. I guess the gem could detect the platform and use a different default signer if its java? |
Detecting ruby version could be tricky, what could be possible would be to add a new configuration var which would let you choose which signer to use in the initializer. But one question would remain, I saw your issue on jruby-openssl, does this behavior is consistant across all version of jruby-openssl? And will it still be? |
Detecting JRuby is very simple:
But yes, I'm not sure about whether things may change between JRuby releases. The correct solution is to have JRuby behave the same as MRI. I may revisit this with the JRuby guys. Thanks! |
I hit problems using this Gem with latest JRuby 9.1.8.0 and latest JRuby-OpenSSL.
This monkey-patch may be useful - it addresses a bug in JRuby-OpenSSL (by explicitly passing
pk7.data
as a second argument to thewrite_smime
method), as well as problems withstr_debut
andstr_end
being in a slightly different format in the JRuby output.Hope its useful to someone :)
The text was updated successfully, but these errors were encountered: