db-query-matchers 0.6.0 → 0.7.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95a7dbce55af1450143055370ec8f9f6e548ca30
|
4
|
+
data.tar.gz: 3ddfd633ca17134412362f08f0b0f613b836698d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a23f027609da8ae60d2418d15bf1eca492e6565c18f5d8cef5b1d702948b3bce0b86d626241c34cbee0247ab15d253b165c0723239d9dbd48af2f3dd0791e1f3
|
7
|
+
data.tar.gz: d094c63dcea97bb75b84860cbb08b744cf49886c3f57cc589d9cf0b42764747b3d6b467a1695776f7642cc2423d1dde6718fe275a0dfec8645ebf62b65939d9d
|
data/lib/db_query_matchers.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
module DBQueryMatchers
|
2
2
|
# Configuration for the DBQueryMatcher module.
|
3
3
|
class Configuration
|
4
|
-
attr_accessor :ignores, :on_query_counted, :schemaless, :log_backtrace, :backtrace_filter
|
4
|
+
attr_accessor :ignores, :on_query_counted, :schemaless, :log_backtrace, :backtrace_filter, :db_event
|
5
5
|
|
6
6
|
def initialize
|
7
|
+
@db_event = "sql.active_record"
|
7
8
|
@ignores = []
|
8
9
|
@on_query_counted = Proc.new { }
|
9
10
|
@schemaless = false
|
@@ -58,7 +58,7 @@ RSpec::Matchers.define :make_database_queries do |options = {}|
|
|
58
58
|
end
|
59
59
|
@counter = DBQueryMatchers::QueryCounter.new(counter_options)
|
60
60
|
ActiveSupport::Notifications.subscribed(@counter.to_proc,
|
61
|
-
|
61
|
+
DBQueryMatchers.configuration.db_event,
|
62
62
|
&block)
|
63
63
|
if absolute_count = options[:count]
|
64
64
|
absolute_count === @counter.count
|
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
|
+
version: 0.7.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-
|
13
|
+
date: 2016-10-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|