sql_matchers 1.0.0.pre.rc.1 → 1.0.0.pre.rc.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f5583348852121bc9ee574e0e49d9de9dc236775b4cf1866add7764441daa43
4
- data.tar.gz: 919504f62d430ce28d581b46d85db5dc1343f1183dc3bf2f8a61ef720ecb6106
3
+ metadata.gz: ea820ab15f14da9e85e40d721cc0744edfabf5cf6b42dfbc89eebf714acbf74c
4
+ data.tar.gz: 60d94b0722065797839159faf66e985f0f3b85c1f317858a9b04a9b52e82f0e3
5
5
  SHA512:
6
- metadata.gz: 4fc9a5fcf7dbcd8f781d2ec262c5794356f44731f8196c9cbddad3678c614cd739dd2c5b8055b3487c8626dc038fd5d27d13d536e052e345a4ddd8aae9ddd23d
7
- data.tar.gz: 622ef54ecd313324d49c1e10ecf95fafcb81382d8006a205f1657cb499e4619b21fd1e2cc122ec353e26f30df028fbd62c7c338b3fea8bfa7668a440597a19a8
6
+ metadata.gz: '092790d059e6d1c066acd87b8c3a23b8bf59eb2677a8abf8bc554e754e358ff37440722a4625fbed7f1bd08518603756050e193a849dfb775653386109cb8576'
7
+ data.tar.gz: e1788fe82defea276dac318dd158afd96ba9a5551f79d2628428c5a26778868c95a80b5754db43a3e0fe2bfb536e91ed739f9f8d7db18c5effb279df134d0b61
@@ -5,6 +5,8 @@ require 'anbt-sql-formatter/formatter'
5
5
  module SqlMatchers
6
6
  module Matchers
7
7
  class Sql
8
+ QUOTED_IDENT_RE = /[`"](\w+)[`"]/
9
+
8
10
  attr_reader :actual, :expected
9
11
 
10
12
  def initialize(expected)
@@ -21,7 +23,10 @@ module SqlMatchers
21
23
  def diffable? = true
22
24
  def matches?(actual)
23
25
  @expected = formatter.format(+expected.to_s.strip)
24
- @actual = formatter.format(+actual.to_s.strip)
26
+ .gsub(QUOTED_IDENT_RE, '\1')
27
+
28
+ @actual = formatter.format(+actual.to_s.strip)
29
+ .gsub(QUOTED_IDENT_RE, '\1')
25
30
 
26
31
  @actual == @expected
27
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SqlMatchers
4
- VERSION = '1.0.0-rc.1'
4
+ VERSION = '1.0.0-rc.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sql_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.rc.1
4
+ version: 1.0.0.pre.rc.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeke Gabrielse