db-query-matchers 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b45613ee84973873b23bb383766dce4da1f459a6
4
- data.tar.gz: e4e7cbba52908ee07e6e2c8977246834e20a656b
3
+ metadata.gz: b13241f75531009aac9480f467cf9849bdd5662e
4
+ data.tar.gz: 5a376d1a5644be97711acf93e80a54ffee517b2b
5
5
  SHA512:
6
- metadata.gz: 2dafe4a71a44399f557768515918e1fd15873063c5037b61e188e849a2888b834969400c4bb68ce7bbb0e56ef7cbd139878e890f35064effcd9f551aef7e40c9
7
- data.tar.gz: ae1f9040dc1c12fd308691cf269f14c6aeaa30311c8ab73c45bedfa85533b1deb1c636ed63723424a3b0a7675f100c91074c44da372e396746b2c81b9fbe8106
6
+ metadata.gz: bf6a832bb56db03a4a6d65fd4e637307511a891ddf3a0686afeb9b6383bd43bc37fd6bd64273f8e8f9c88ad9abf7356c141fab4b78a793158284a2e1386aece7
7
+ data.tar.gz: bdf68f005f05a44b2b4e55777df4aff4ab7eadcdc287def9d54e9dc42e344b8d0e157732a8fd6806e63d70a98f317f19f671c8cce6654b6b4c4712cde00582ff
@@ -1,11 +1,12 @@
1
1
  module DBQueryMatchers
2
2
  # Configuration for the DBQueryMatcher module.
3
3
  class Configuration
4
- attr_accessor :ignores, :on_query_counted
4
+ attr_accessor :ignores, :on_query_counted, :schemaless
5
5
 
6
6
  def initialize
7
7
  @ignores = []
8
8
  @on_query_counted = Proc.new { }
9
+ @schemaless = false
9
10
  end
10
11
  end
11
12
  end
@@ -41,6 +41,7 @@ module DBQueryMatchers
41
41
  def callback(_name, _start, _finish, _message_id, payload)
42
42
  return if @matches && !any_match?(@matches, payload[:sql])
43
43
  return if any_match?(DBQueryMatchers.configuration.ignores, payload[:sql])
44
+ return if DBQueryMatchers.configuration.schemaless && payload[:name] == "SCHEMA"
44
45
  @count += 1
45
46
  @log << payload[:sql]
46
47
  DBQueryMatchers.configuration.on_query_counted.call(payload)
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module DBQueryMatchers
3
- VERSION = '0.4.2'
3
+ VERSION = '0.5.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-query-matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brigade Engineering
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-03-07 00:00:00.000000000 Z
13
+ date: 2016-05-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec