-
Notifications
You must be signed in to change notification settings - Fork 26
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
Bump supported Ruby versions #57
Conversation
7023337
to
8dba176
Compare
return unless certs | ||
OpenSSL::X509::Certificate.new(extract_der(certs[0])).freeze | ||
end | ||
|
||
private | ||
|
||
def extract_der(cert) | ||
stringio = StringIO.new | ||
cert.derEncode(stringio.to_outputstream) | ||
stringio.string | ||
return if certs.nil? || certs.empty? | ||
OpenSSL::X509::Certificate.new(certs[0].get_encoded).freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change backwards compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it uses a more generic java.security.cert.Certificate
abstract class to get the encoding (which has been around in Java for a looong time), rather than expect the instance of sun.security.x509.X509CertImpl
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks!
b1f923f
to
3b12228
Compare
env: JRUBY_OPTS="--debug" # for simplecov | ||
- rvm: jruby-9.1 | ||
env: JRUBY_OPTS="--debug" # for simplecov | ||
- rvm: jruby |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drcapulet After reading JRuby Roadmap, I think we should only support jruby-9.2
here (which is equivalent to jruby
for now). Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable!
df66dc8
to
de7b23a
Compare
rails-auth.gemspec
Outdated
@@ -29,6 +29,6 @@ Gem::Specification.new do |spec| | |||
|
|||
spec.add_runtime_dependency "rack" | |||
|
|||
spec.add_development_dependency "bundler", "~> 1.10" | |||
spec.add_development_dependency "bundler", [">= 1.10", "< 3"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: make this just spec.add_development_dependency "bundler", ">= 1.10", "< 3"
return unless certs | ||
OpenSSL::X509::Certificate.new(extract_der(certs[0])).freeze | ||
end | ||
|
||
private | ||
|
||
def extract_der(cert) | ||
stringio = StringIO.new | ||
cert.derEncode(stringio.to_outputstream) | ||
stringio.string | ||
return if certs.nil? || certs.empty? | ||
OpenSSL::X509::Certificate.new(certs[0].get_encoded).freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks!
env: JRUBY_OPTS="--debug" # for simplecov | ||
- rvm: jruby-9.1 | ||
env: JRUBY_OPTS="--debug" # for simplecov | ||
- rvm: jruby |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable!
- Bumped MRI Rubies to the ones that are still supported - Bumped JRuby to the last release (as it's recommended by JRuby's Roadmap). This also required a change to how Java certificates are created in test (sun.security.x509.X509CertImpl can no longer be directly instantiated). - Allowed the use of Bundler 2
de7b23a
to
0634380
Compare
Java certificates are created in test (sun.security.x509.X509CertImpl
can no longer be directly instantiated).