query_counter 0.2.3 → 0.2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/query_counter.rb +2 -2
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 754ca4bd6e2eb1b7e40223d2c9b19ab0875b387b88060abfc31972a38737ae15
4
- data.tar.gz: a9204b9775d0df87f61443e3f1c6a854dc15e08f002a31fb823a79f09d78855c
3
+ metadata.gz: c2752d6f824016b3770b9b12ac03dfd8c0f4d22403d233faa64e7010b433b381
4
+ data.tar.gz: 6f490457176022a1a06125c910b68a2b4fecacdf53390228433ce3ac89b9c791
5
5
  SHA512:
6
- metadata.gz: 20ac3837354edfa08f7e3f40762a726cf4465fa0cd7d2b2c476b8747efbc4ed7726081c417e497e0adab217fbd9edbf1e8e2fbeddafe758bf8a33d50237869dc
7
- data.tar.gz: 416e004b81186f3327739fb2bed2d0050362cb055233a936604356396d986950298586f03d8b135a220a6b6caddf97db3b6933fc33bac935bf8d8860fdd444e7
6
+ metadata.gz: 18294f1fdbb54fc94e0588ac0d5b1329110f429525dea46615c8c26efb2a78478a7dd86b20a53acbddb20c3daba81799154eae0c62990668cbfb91a0b61c4a7d
7
+ data.tar.gz: 1ff556a83cd44bb9d6a6064ab2f03a8bbe294bc8f8cc4acd1a6bfa3cf15f7938b067316fa0e67d0cf912016437b8a140f829be1bb0c8a214024e11846b013c49
data/lib/query_counter.rb CHANGED
@@ -88,10 +88,10 @@ module QueryCounter
88
88
  original_method_name_with_alias = "#{method_name}_without_instrumentation#{punctuation}"
89
89
  new_method_name = "#{method_name}_with_instrumentation#{punctuation}"
90
90
  kls.class_eval <<STR
91
- def #{new_method_name}(*args)
91
+ def #{new_method_name}(*args, &block)
92
92
  ::QueryCounter.callbacks[#{callback_name.inspect}].call(args) if ::QueryCounter.callbacks.has_key?(#{callback_name.inspect})
93
93
  started_at = Time.now
94
- result = #{original_method_name_with_alias}(*args)
94
+ result = #{original_method_name_with_alias}(*args, &block)
95
95
  ::QueryCounter.record(#{resource.inspect}, (Time.now - started_at) * 1_000.0)
96
96
  result
97
97
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_counter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-12 00:00:00.000000000 Z
11
+ date: 2023-02-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Used for monitoring number of external calls
14
14
  email: dougyouch@gmail.com
@@ -25,7 +25,7 @@ files:
25
25
  homepage: https://github.com/evertrue/query_counter
26
26
  licenses: []
27
27
  metadata: {}
28
- post_install_message:
28
+ post_install_message:
29
29
  rdoc_options: []
30
30
  require_paths:
31
31
  - lib
@@ -40,8 +40,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  requirements: []
43
- rubygems_version: 3.0.3
44
- signing_key:
43
+ rubygems_version: 3.2.3
44
+ signing_key:
45
45
  specification_version: 4
46
46
  summary: Count requests to external systems
47
47
  test_files: []