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: 925bff06ef9935be2331dd9b77a65ad752562f48
4
- data.tar.gz: 360c88c71a9579b16962bba539feee9100deeaba
3
+ metadata.gz: 95a7dbce55af1450143055370ec8f9f6e548ca30
4
+ data.tar.gz: 3ddfd633ca17134412362f08f0b0f613b836698d
5
5
  SHA512:
6
- metadata.gz: f07ed0ee62f115735a0d446c2e5274e5104fc60987bf733ff0d45e74e3acb6d7c945e7f290bb3e86e4d72335daa9bb198fa8fefb8a5261e94089bf132adc3393
7
- data.tar.gz: fd6999559fee12c8d1e6c1941c8e79bf3f0e29cd4ecb0f7b9ce20c2b3fdb7e895b692e50a2772554416b3c7f46d017e44ad3509c8d02ecc45a9e9e00860f7dd4
6
+ metadata.gz: a23f027609da8ae60d2418d15bf1eca492e6565c18f5d8cef5b1d702948b3bce0b86d626241c34cbee0247ab15d253b165c0723239d9dbd48af2f3dd0791e1f3
7
+ data.tar.gz: d094c63dcea97bb75b84860cbb08b744cf49886c3f57cc589d9cf0b42764747b3d6b467a1695776f7642cc2423d1dde6718fe275a0dfec8645ebf62b65939d9d
@@ -3,7 +3,6 @@ require 'db_query_matchers/make_database_queries'
3
3
  require 'db_query_matchers/query_counter'
4
4
  require 'db_query_matchers/configuration'
5
5
  require 'active_support'
6
- require 'active_record'
7
6
 
8
7
  # Main module that holds global configuration.
9
8
  module DBQueryMatchers
@@ -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
- 'sql.active_record',
61
+ DBQueryMatchers.configuration.db_event,
62
62
  &block)
63
63
  if absolute_count = options[:count]
64
64
  absolute_count === @counter.count
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module DBQueryMatchers
3
- VERSION = '0.6.0'
3
+ VERSION = '0.7.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.6.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-07-08 00:00:00.000000000 Z
13
+ date: 2016-10-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec