rspec-sqlimit 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/rspec/sqlimit/counter.rb +1 -0
- data/lib/rspec/sqlimit/reporter.rb +1 -2
- data/rspec-sqlimit.gemspec +2 -2
- data/spec/dummy/db/schema.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 430ddd2f25464d5b5b597070188f8e835c8d59eac0ae8499807489564f30de66
|
4
|
+
data.tar.gz: 5a6d41c2e66fc3622eede41bdb875b590b67c97a8483eedfeb7ecb25969cd237
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc551ec1aa6702756382a5b77bb7201d0d9562351b5ae5414913222082379010f46108e3c31485c3bf014d4e5c24a2395203fbb00a81ec09f4138d8d5b40b6c
|
7
|
+
data.tar.gz: 3fbe3342aaf7762278c122b092d1d43ea3fb02a5f5a655dea5bdfcdf60f23d6b1a381d6e08c5e000424d4669782c48a93810e1d029fb2a74be21133d18709657
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
7
7
|
|
8
|
+
## [0.0.4] - [2021-03-21]
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
- Issue #10 about safe processing of blank :binding key (following @blackst0ne)
|
12
|
+
|
8
13
|
## [0.0.3] - [2019-10-02]
|
9
14
|
|
10
15
|
### Added
|
@@ -23,3 +28,4 @@ This is a first public release (@nepalez)
|
|
23
28
|
[0.0.1]: https://github.com/nepalez/rspec-sqlimit/releases/tag/v0.0.1
|
24
29
|
[0.0.2]: https://github.com/nepalez/rspec-sqlimit/compare/v0.0.1...v0.0.2
|
25
30
|
[0.0.3]: https://github.com/nepalez/rspec-sqlimit/compare/v0.0.2...v0.0.3
|
31
|
+
[0.0.4]: https://github.com/nepalez/rspec-sqlimit/compare/v0.0.3...v0.0.4
|
@@ -11,7 +11,6 @@ module RSpec::SQLimit
|
|
11
11
|
|
12
12
|
def call
|
13
13
|
suffix = " among others (see mark ->)" if @matcher
|
14
|
-
|
15
14
|
return "No queries were invoked" if @queries.empty?
|
16
15
|
|
17
16
|
<<-MESSAGE.gsub(/ +\|/, "")
|
@@ -28,7 +27,7 @@ module RSpec::SQLimit
|
|
28
27
|
|
29
28
|
def line(query, index)
|
30
29
|
prefix = (matcher && query[:sql] =~ matcher) ? "->" : " "
|
31
|
-
binds = query[:binds]
|
30
|
+
binds = query[:binds]&.any? ? "; #{query[:binds]} " : ""
|
32
31
|
"#{prefix} #{index + 1}) #{query[:sql]}#{binds}" \
|
33
32
|
" (#{query[:duration].round(3)} ms)"
|
34
33
|
end
|
data/rspec-sqlimit.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "rspec-sqlimit"
|
3
|
-
gem.version = "0.0.
|
3
|
+
gem.version = "0.0.4"
|
4
4
|
gem.author = "Andrew Kozin (nepalez)"
|
5
5
|
gem.email = "andrew.kozin@gmail.com"
|
6
6
|
gem.homepage = "https://github.com/nepalez/rspec-sqlimit"
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
|
14
14
|
gem.required_ruby_version = ">= 2.3"
|
15
15
|
|
16
|
-
gem.add_runtime_dependency "
|
16
|
+
gem.add_runtime_dependency "activerecord", "> 4.2", "< 7.0"
|
17
17
|
gem.add_runtime_dependency "rspec", "~> 3.0"
|
18
18
|
|
19
19
|
gem.add_development_dependency "appraisal", "~> 2.2"
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 20170211104800) do
|
14
14
|
|
15
15
|
create_table "users", force: :cascade do |t|
|
16
16
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-sqlimit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin (nepalez)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">"
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
- !ruby/object:Gem::Version
|
189
189
|
version: '0'
|
190
190
|
requirements: []
|
191
|
-
rubygems_version: 3.0.
|
191
|
+
rubygems_version: 3.0.8
|
192
192
|
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: RSpec matcher to control SQL queries made by block of code
|