db-query-matchers 0.4.1 → 0.4.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
  SHA1:
3
- metadata.gz: 0db5e0e3db1bce0dfd497c4cb85f0c7e10908759
4
- data.tar.gz: badedf857b95b37096ea22136a8f426793ed87f4
3
+ metadata.gz: b45613ee84973873b23bb383766dce4da1f459a6
4
+ data.tar.gz: e4e7cbba52908ee07e6e2c8977246834e20a656b
5
5
  SHA512:
6
- metadata.gz: b2b32a60342d332c264aed50312a9513f8cdb7625a39ec6c57e3c79f583a7c0475fdaa5994c0a98f53d897cbf84aed3f4ae3ceab87d4103c7107314890105572
7
- data.tar.gz: f795c89c60c35f62a8c700b955ed377e72747a383afbb3492bd0b435e6d15aef6cb325a077f6b46e492dc867044b4dd5b02d104ce38bc0d07cb93449d65f5771
6
+ metadata.gz: 2dafe4a71a44399f557768515918e1fd15873063c5037b61e188e849a2888b834969400c4bb68ce7bbb0e56ef7cbd139878e890f35064effcd9f551aef7e40c9
7
+ data.tar.gz: ae1f9040dc1c12fd308691cf269f14c6aeaa30311c8ab73c45bedfa85533b1deb1c636ed63723424a3b0a7675f100c91074c44da372e396746b2c81b9fbe8106
@@ -1,10 +1,11 @@
1
1
  module DBQueryMatchers
2
2
  # Configuration for the DBQueryMatcher module.
3
3
  class Configuration
4
- attr_accessor :ignores
4
+ attr_accessor :ignores, :on_query_counted
5
5
 
6
6
  def initialize
7
7
  @ignores = []
8
+ @on_query_counted = Proc.new { }
8
9
  end
9
10
  end
10
11
  end
@@ -43,6 +43,7 @@ module DBQueryMatchers
43
43
  return if any_match?(DBQueryMatchers.configuration.ignores, payload[:sql])
44
44
  @count += 1
45
45
  @log << payload[:sql]
46
+ DBQueryMatchers.configuration.on_query_counted.call(payload)
46
47
  end
47
48
 
48
49
  private
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module DBQueryMatchers
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
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.1
4
+ version: 0.4.2
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-01-21 00:00:00.000000000 Z
13
+ date: 2016-03-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec