Bump to ruby 3 and bump testing internals to Rails 6.1#82
Open
riyengar8 wants to merge 1 commit intofractaledmind:masterfrom
Open
Bump to ruby 3 and bump testing internals to Rails 6.1#82riyengar8 wants to merge 1 commit intofractaledmind:masterfrom
riyengar8 wants to merge 1 commit intofractaledmind:masterfrom
Conversation
|
|
||
| str = MATCHER_TRANSFORMER.call(sql: sql, type: type, **ctx) | ||
| next str if ['boolean'].include? type.to_s | ||
| next str if ['boolean', 'decimal'].include? type.to_s |
There was a problem hiding this comment.
Style/WordArray: Use %w or %W for an array of words.
|
|
||
| str = MATCHER_TRANSFORMER.call(sql: sql, type: type, **ctx) | ||
| next str if ['boolean'].include? type.to_s | ||
| next str if ['boolean', 'decimal'].include? type.to_s |
There was a problem hiding this comment.
Style/WordArray: Use %w or %W for an array of words.
|
|
||
| str = MATCHER_TRANSFORMER.call(sql: sql, type: type, **ctx) | ||
| next str if ['boolean'].include? type.to_s | ||
| next str if ['boolean', 'decimal'].include? type.to_s |
There was a problem hiding this comment.
Style/WordArray: Use %w or %W for an array of words.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Stephen. Hope you are well.
My main intention with this PR is to be able to use this gem with Ruby 3. The single Ruby 3 fix in here is in
lib/active_set/filtering/active_record/query_value.rb, explicitly dereferencing the hash into keyword arguments.The rest of this is to bump the testing internals to Rails 6 since Rails 5 isn't Ruby 3 compatible.
I made the changes you see in
lib/active_set/filtering/active_record/operators.rbbecause Arel started casting decimal values after the Rails bump in the BLANK and MATCHER transformers in an unhelpful way, such that clauses like "decimal LIKE '%3.14%'" would become "decimal LIKE 0". Bypassing these matchers for the decimal type was the fastest way I could get the specs passing.