active_record-comments 0.7.0 → 0.9.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5647f74def91a735d09ad9ba1f4216e13db28cd2591460dfe6aea8d48cdf7f00
|
4
|
+
data.tar.gz: 54ca149282b5512666a6cbcb843b78fd73dcb64afd6e94ef79fda09354930cec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d72b0ac57d68a354109071d8651e2dd53ce2907ba28170423132b642462f24356a7300e0d978403c89611d53fb72529b50a0179e685f2ee40dc63fabdf74d133
|
7
|
+
data.tar.gz: 4713ee8ff61ceadda255a8721378764637d2872c66df32828ea40854f7621e7f1b96175f5544227507ad7f1b312174fae2bf128aa4b4096d4321ae5d15ac0d02
|
@@ -4,15 +4,20 @@ module ActiveRecord
|
|
4
4
|
class << self
|
5
5
|
def included(base)
|
6
6
|
base.class_eval do
|
7
|
+
# ActiveRecord 7.1
|
8
|
+
if base.method_defined?(:internal_exec_query)
|
9
|
+
alias_method :exec_query_without_comment, :internal_exec_query
|
10
|
+
def internal_exec_query(query, *args, **kwargs, &block)
|
11
|
+
query = ActiveRecord::Comments.with_comment_sql(query)
|
12
|
+
exec_query_without_comment(query, *args, **kwargs, &block)
|
13
|
+
end
|
7
14
|
# ActiveRecord 3.2 vs sqlite, maybe others ...
|
8
|
-
|
15
|
+
elsif base.method_defined?(:exec_query)
|
9
16
|
alias_method :exec_query_without_comment, :exec_query
|
10
|
-
def exec_query(query, *args,
|
17
|
+
def exec_query(query, *args, **kwargs, &block)
|
11
18
|
query = ActiveRecord::Comments.with_comment_sql(query)
|
12
|
-
exec_query_without_comment(query, *args,
|
19
|
+
exec_query_without_comment(query, *args, **kwargs, &block)
|
13
20
|
end
|
14
|
-
|
15
|
-
# 99% case
|
16
21
|
elsif base.method_defined?(:execute)
|
17
22
|
alias_method :execute_without_comment, :execute
|
18
23
|
def execute(query, *args, &block)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record-comments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '7.1'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,10 +24,7 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '5'
|
30
|
-
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '7.1'
|
33
|
-
description:
|
27
|
+
description:
|
34
28
|
email: michael@grosser.it
|
35
29
|
executables: []
|
36
30
|
extensions: []
|
@@ -44,7 +38,7 @@ homepage: https://github.com/grosser/active_record-comments
|
|
44
38
|
licenses:
|
45
39
|
- MIT
|
46
40
|
metadata: {}
|
47
|
-
post_install_message:
|
41
|
+
post_install_message:
|
48
42
|
rdoc_options: []
|
49
43
|
require_paths:
|
50
44
|
- lib
|
@@ -60,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
54
|
version: '0'
|
61
55
|
requirements: []
|
62
56
|
rubygems_version: 3.1.6
|
63
|
-
signing_key:
|
57
|
+
signing_key:
|
64
58
|
specification_version: 4
|
65
59
|
summary: Comments for activerecord
|
66
60
|
test_files: []
|