rspec-sqlimit 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17f8ef5a19ac39f9a9a2c67a32a196de82bf9b1764f04f4101b8cb57ff182799
4
- data.tar.gz: 15cd5e3c7c9f8b035240eb0028ff03686f75b1812d6c215b9388f697f0c83423
3
+ metadata.gz: 430ddd2f25464d5b5b597070188f8e835c8d59eac0ae8499807489564f30de66
4
+ data.tar.gz: 5a6d41c2e66fc3622eede41bdb875b590b67c97a8483eedfeb7ecb25969cd237
5
5
  SHA512:
6
- metadata.gz: 3f902b99903af0400fbe4ed04609de1abecfd5c24568eb0a4a65123d115da82de09b1bdbae7b7ec4637a461378f77a939af9aaa9a1fd1db2aabd6232ff824b1d
7
- data.tar.gz: bf775886da70792c4cb468297ce6e85910e26a17a3ce6661d3ddd6177027213d312819309d76f5588bca13b3b1aaffe2dfff04d2c96f0743f506765a60748913
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
@@ -32,6 +32,7 @@ module RSpec::SQLimit
32
32
  @callback ||= lambda do |_name, start, finish, _message_id, values|
33
33
  return if %w[CACHE SCHEMA].include? values[:name]
34
34
  return if cached_query?(values)
35
+
35
36
  queries << {
36
37
  sql: values[:sql],
37
38
  duration: (finish - start) * 1_000,
@@ -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].any? ? "; #{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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "rspec-sqlimit"
3
- gem.version = "0.0.3"
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 "rails", "> 4.2", "< 7.0"
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"
@@ -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: 2017_02_11_104800) do
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.3
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: 2020-03-26 00:00:00.000000000 Z
11
+ date: 2021-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
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.6
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