marginalia 1.10.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/marginalia.rb +17 -12
  3. data/marginalia.gemspec +1 -1
  4. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d87c1e1a9f2c0653a979e4bc598c686c8fb7e7af4281f6571c915cb76eee2742
4
- data.tar.gz: 18b9c7227dc0fedf7fc74954023274484a79a30fe8d9cc47d09c6ecb46010538
3
+ metadata.gz: 8dba7f58a767008578f36af3a2bedc77139f11b62025e1dcd022c1ebd3658c3c
4
+ data.tar.gz: 9d4728cbc7b673514cce7076a60c28592646fbc68ac59d8310c7ebe3aa71eac6
5
5
  SHA512:
6
- metadata.gz: 88df0c3b95e116f53a63f6acb1dd6ba63baba048b11e09b47e723d394588c20bab9fadd7035da5a5183fa120fc6871dc2d04205f6397744669f564f684a9f8d5
7
- data.tar.gz: d91e987e20e1d6a9c257cd5c68b2251b3ced7194f20c38b35e28711088ad030823b0f7018667ce5cb9e02015f472c0fe0a0a34d4ff614dac38194f78e191327b
6
+ metadata.gz: 35dfdc97e0745484719266a9c616c257072dfbdf0ee8ff6b4c7055d051510a562bf12d863eae670c382f14eda7ba895f4a988baa031ea43904fd9a2a31fd7c0e
7
+ data.tar.gz: 3fbfdeacc57e3a8e78490e991527610a3249c0b3e748de7410a427e9e085e6b420a12d916b0c15d87a7240743a81e9be14727508743d25d7cc82d850924ad126
data/lib/marginalia.rb CHANGED
@@ -67,33 +67,38 @@ module Marginalia
67
67
  sql
68
68
  end
69
69
 
70
- def execute_with_marginalia(sql, name = nil)
71
- execute_without_marginalia(annotate_sql(sql), name)
70
+ def execute_with_marginalia(sql, *args)
71
+ execute_without_marginalia(annotate_sql(sql), *args)
72
72
  end
73
+ ruby2_keywords :execute_with_marginalia if respond_to?(:ruby2_keywords, true)
73
74
 
74
- def exec_query_with_marginalia(sql, name = 'SQL', binds = [])
75
- exec_query_without_marginalia(annotate_sql(sql), name, binds)
75
+ def exec_query_with_marginalia(sql, *args)
76
+ exec_query_without_marginalia(annotate_sql(sql), *args)
76
77
  end
78
+ ruby2_keywords :exec_query_with_marginalia if respond_to?(:ruby2_keywords, true)
77
79
 
78
80
  if ActiveRecord::VERSION::MAJOR >= 5
79
- def exec_query_with_marginalia(sql, name = 'SQL', binds = [], **options)
81
+ def exec_query_with_marginalia(sql, *args, **options)
80
82
  options[:prepare] ||= false
81
- exec_query_without_marginalia(annotate_sql(sql), name, binds, **options)
83
+ exec_query_without_marginalia(annotate_sql(sql), *args, **options)
82
84
  end
83
85
  end
84
86
 
85
- def exec_delete_with_marginalia(sql, name = 'SQL', binds = [])
86
- exec_delete_without_marginalia(annotate_sql(sql), name, binds)
87
+ def exec_delete_with_marginalia(sql, *args)
88
+ exec_delete_without_marginalia(annotate_sql(sql), *args)
87
89
  end
90
+ ruby2_keywords :exec_delete_with_marginalia if respond_to?(:ruby2_keywords, true)
88
91
 
89
- def exec_update_with_marginalia(sql, name = 'SQL', binds = [])
90
- exec_update_without_marginalia(annotate_sql(sql), name, binds)
92
+ def exec_update_with_marginalia(sql, *args)
93
+ exec_update_without_marginalia(annotate_sql(sql), *args)
91
94
  end
95
+ ruby2_keywords :exec_update_with_marginalia if respond_to?(:ruby2_keywords, true)
92
96
 
93
97
  if ActiveRecord::VERSION::MAJOR >= 5
94
- def execute_and_clear_with_marginalia(sql, *args, **kwargs, &block)
95
- execute_and_clear_without_marginalia(annotate_sql(sql), *args, **kwargs, &block)
98
+ def execute_and_clear_with_marginalia(sql, *args, &block)
99
+ execute_and_clear_without_marginalia(annotate_sql(sql), *args, &block)
96
100
  end
101
+ ruby2_keywords :execute_and_clear_with_marginalia if respond_to?(:ruby2_keywords, true)
97
102
  else
98
103
  def execute_and_clear_with_marginalia(sql, *args, &block)
99
104
  execute_and_clear_without_marginalia(annotate_sql(sql), *args, &block)
data/marginalia.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.test_files = `git ls-files -- {test}/*`.split("\n")
9
9
  gem.name = "marginalia"
10
10
  gem.require_paths = ["lib"]
11
- gem.version = "1.10.0"
11
+ gem.version = "1.10.1"
12
12
  gem.license = "MIT"
13
13
 
14
14
  gem.add_runtime_dependency "actionpack", ">= 2.3"
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marginalia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Lorang
8
8
  - Nick Quaranto
9
9
  - Taylor Weibley
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-01-04 00:00:00.000000000 Z
13
+ date: 2021-02-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionpack
@@ -168,7 +168,7 @@ homepage: https://github.com/basecamp/marginalia
168
168
  licenses:
169
169
  - MIT
170
170
  metadata: {}
171
- post_install_message:
171
+ post_install_message:
172
172
  rdoc_options: []
173
173
  require_paths:
174
174
  - lib
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  requirements: []
186
186
  rubygems_version: 3.0.3
187
- signing_key:
187
+ signing_key:
188
188
  specification_version: 4
189
189
  summary: Attach comments to your ActiveRecord queries.
190
190
  test_files: []