Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sufleR/sql_query
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: sufleR/sql_query
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix/multiline-erb-template-handling
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Dec 19, 2025

  1. Fix whitespace normalization to preserve SQL quoted strings in ERB te…

    …mplates
    
    The previous implementation of prepare_query used a simple regex to normalize
    whitespace, which incorrectly modified content inside SQL quoted strings when
    preparing queries for logs. This caused issues with multiline ERB templates
    where string literals could be corrupted.
    
    Changes:
    - Refactored prepare_query to render ERB first, then normalize whitespace
    - Added regex pattern to match quoted strings and preserve their content
    - Only whitespace outside of quotes is normalized to single spaces
    - Simplified test database configuration to use consistent postgres setup
    - Added test coverage for multiline ERB templates with quoted strings
    
    This fix ensures that SQL string literals remain intact while still providing
    clean, single-line output for logging purposes.
    sufleR committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    bfc09d6 View commit details
    Browse the repository at this point in the history
  2. Fix RuboCop style violations in prepare_query method

    - Replace Perl-style backreference $1 with ::Regexp.last_match(1)
    - Remove extra spacing before inline comment
    sufleR committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    36cd2d7 View commit details
    Browse the repository at this point in the history
Loading