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

Make pliny compatible with ruby 2.4 #302

Merged
merged 3 commits into from
Feb 15, 2017
Merged

Make pliny compatible with ruby 2.4 #302

merged 3 commits into from
Feb 15, 2017

Conversation

cyberdelia
Copy link
Member

This allow to run Pliny with ruby 2.4 by upgrading the activesupport gem, since it requires a version of the json gem that is incompatible with ruby 2.4.

Sadly this also means we have to drop support for ruby > 2.2.2 since activesupport do not support them.

@brandur
Copy link
Member

brandur commented Jan 10, 2017

@cyberdelia @gudmundur Do you know if the loss of 2.2.2 support is going to be a problem for anyone? It seems like Heroku's generally doing a pretty good job of keeping its Ruby stacks up-to-date.

@brandur
Copy link
Member

brandur commented Jan 10, 2017

@cyberdelia Mind fixing that one canonical line test this way instead?

diff --git a/spec/canonical_log_line_helpers_spec.rb b/spec/canonical_log_line_helpers_spec.rb
index 3509912..0290dec 100644
--- a/spec/canonical_log_line_helpers_spec.rb
+++ b/spec/canonical_log_line_helpers_spec.rb
@@ -22,9 +22,9 @@ describe Pliny::CanonicalLogLineHelpers do
   it "rejects values that are of the wrong type" do
     line = TestCanonicalLogLine.new
     e = assert_raises ArgumentError do
-      line.field_string = 42
+      line.field_string = true
     end
-    assert_equal "Expected field_string to be type String (was Fixnum)",
+    assert_equal "Expected field_string to be type String (was TrueClass)",
       e.message
   end

I think it's a little less janky because it's version agnostic. Thanks!

@cyberdelia
Copy link
Member Author

@brandur I did just that.

@brandur
Copy link
Member

brandur commented Jan 11, 2017

Sweet! Well, as long as we're reasonably sure we're not going to leave too many people around by dropping 2.1, LGTM.

@gudmundur
Copy link
Member

Did a quick search through the Heroku repos and most Ruby projects seem to be 2.3+. I'm bringing this in.

@gudmundur gudmundur merged commit 0ecdd64 into master Feb 15, 2017
@gudmundur gudmundur deleted the ruby-2.4 branch February 15, 2017 09:45
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