Code Monkey home page Code Monkey logo

Comments (4)

frozon avatar frozon commented on June 26, 2024

Hi, sorry for my late reply.

Instead of a monkey patch, Passbook::PKPass support a custom signer as second argument.
So you could create a specific Signer let's say JRubySigner which would include your patch to get it working with JRuby and pass a new instance to it when you initialize your pkpass.

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

from passbook.

mungler avatar mungler commented on June 26, 2024

Good to know, thanks. I guess the gem could detect the platform and use a different default signer if its java?

from passbook.

frozon avatar frozon commented on June 26, 2024

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?
What if we issue a new signer for jruby which would only work for the current release and won't on the next one.

from passbook.

mungler avatar mungler commented on June 26, 2024

Detecting JRuby is very simple:

RUBY_PLATFORM == "java"

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!

from passbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.