db-query-matchers 0.3.0 → 0.3.1
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: e6a8e87485793abed45478133129719d1794c074
|
4
|
+
data.tar.gz: 13c4807b0e84756527044f649a379107db93d0ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9ef241b736e78ebf2d0f1df05448d42418caa5392551830ad6fdfb408dde6108b5bed57b1fb3276031448d91144f06725094e47104107009ffc15b8dc3d2787
|
7
|
+
data.tar.gz: f23c877e9cf641e7915c281ec70cde40df1647e30d81b58154637cd57fefea8cdb5a1eb0ee3e1f69507058be62b56516d97d1774e4aee55983efeb9d9523372c
|
@@ -47,6 +47,15 @@ RSpec::Matchers.define :make_database_queries do |options = {}|
|
|
47
47
|
if options[:manipulative]
|
48
48
|
counter_options[:matches] = [/^\ *(INSERT|UPDATE|DELETE\ FROM)/]
|
49
49
|
end
|
50
|
+
if options[:matching]
|
51
|
+
counter_options[:matches] ||= []
|
52
|
+
case options[:matching]
|
53
|
+
when Regexp
|
54
|
+
counter_options[:matches] << options[:matching]
|
55
|
+
when String
|
56
|
+
counter_options[:matches] << Regexp.new(Regexp.escape(options[:matching]))
|
57
|
+
end
|
58
|
+
end
|
50
59
|
@counter = DBQueryMatchers::QueryCounter.new(counter_options)
|
51
60
|
ActiveSupport::Notifications.subscribed(@counter.to_proc,
|
52
61
|
'sql.active_record',
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db-query-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Brigade Engineering
|
8
8
|
- Henric Trotzig
|
9
9
|
- Joe Lencioni
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-05-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -70,9 +70,9 @@ dependencies:
|
|
70
70
|
version: '0'
|
71
71
|
description:
|
72
72
|
email:
|
73
|
-
- eng@
|
74
|
-
- henric.trotzig@
|
75
|
-
- joe.lencioni@
|
73
|
+
- eng@brigade.com
|
74
|
+
- henric.trotzig@brigade.com
|
75
|
+
- joe.lencioni@brigade.com
|
76
76
|
executables: []
|
77
77
|
extensions: []
|
78
78
|
extra_rdoc_files: []
|
@@ -83,7 +83,7 @@ files:
|
|
83
83
|
- lib/db_query_matchers/make_database_queries.rb
|
84
84
|
- lib/db_query_matchers/query_counter.rb
|
85
85
|
- lib/db_query_matchers/version.rb
|
86
|
-
homepage: https://github.com/
|
86
|
+
homepage: https://github.com/brigade/db-query-matchers
|
87
87
|
licenses:
|
88
88
|
- MIT
|
89
89
|
metadata: {}
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
106
|
+
rubygems_version: 2.4.5
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: RSpec matchers for database queries
|