Skip to content
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

Changes to maintain ruby 1.8.7 compatability #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lstephen
Copy link

@lstephen lstephen commented Jun 4, 2018

This PR suggests the following changes:

  • Those to allow ruby 1.8.7 compatability
  • Adds construi.yml, a tool that makes use of docker-compose to allow running against multiple containers. (Similar to what CircleCI is doing, but can be run locally)

@rwdaigle
Copy link
Contributor

rwdaigle commented Jun 4, 2018

Thanks @lstephen. Would it be possible to isolate the Ruby version part of this PR from the consrui.yml addition? I'm sympathetic to build tools, but also don't want to have everybody's preferred tool config in the repo either. Sorry!

@lstephen
Copy link
Author

lstephen commented Jun 4, 2018

Sure, I will do that.

The reason for including it was for ease of testing (e.g., rbenv struggles to install ruby 1.8.7 on OS X)

Copy link
Contributor

@rwdaigle rwdaigle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lstephen Thanks for this!

Quick question, mainly as it relates to future plans. Given that Ruby 1.8.7 is no longer supported, I'd be hesitant to introduce a fork where we now have to maintain two paths of development.

How do you see future updates happening - do you think backwards compatibility can be maintained in a single line of dev or will we need to fork? Also, are you planning on upgrading Ruby anytime soon :) ?

@@ -57,7 +57,6 @@ def decrypt_message(encrypted_data, symmetric_key)
decipher = OpenSSL::Cipher::AES128.new(:CTR)
decipher.decrypt
decipher.key = symmetric_key
decipher.auth_data = ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will, I believe, break forward Ruby compatibility?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current tests in place all pass with this line removed. I must admit I didn't look any further than that. If it does break forward ruby compatibility we should be able to put together a test that confirms this.

Copy link
Contributor

@bdewater bdewater Jun 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is safe to remove, AES-CTR is not an AEAD mode so it didn't make sense anyway. Older OpenSSL gems just didn't complain about it. Starting with OpenSSL gem 2.0 (bundled with Ruby 2.4) it started getting stricter (e.g. raising error on too long keys instead of truncating).

rescue LoadError
# Ignore, byebug is not installed for older ruby versions
end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to see dev/debug-specific tooling like pry removed all together. Any thoughts on that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this, because I'm used to working with older ruby versions where we can't use these tools anyway.

@lstephen
Copy link
Author

lstephen commented Jun 6, 2018

Regarding Ruby 1.8.7, I don't think a fork should be necessary. When we have upgraded services we've found we can maintain a code base that works with older and newer versions.

I certainly wouldn't hold dropping Ruby 1.8.7 support against you and couldn't even call it a bad decision. We do have plans to upgrade and we have done some work towards Ruby 2.2.5. But, we do not have a deadline or schedule for this change.

@rwdaigle
Copy link
Contributor

rwdaigle commented Jun 6, 2018

Regarding Ruby 1.8.7, I don't think a fork should be necessary

👍

We have a few things in flight currently, mainly #13. My recommendation, @deedeelavinder, would be for us to consider 1.8.7 support after Google Pay support has settled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants