pp_sql 2.0.0 → 2.1.0
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 +4 -4
- data/README.md +2 -2
- data/lib/pp_sql/version.rb +1 -1
- data/lib/pp_sql.rb +4 -5
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 440b603309167e4817b3d9d2ff322ba2e366b3e769856e79473e549f5861ff08
|
|
4
|
+
data.tar.gz: 969048128509ccd2415d172ce25565cc81bd21b5078acd5f4fb0a0b87cb4eb90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7c0eb0ab3745214a588687ac0e16b2205d7cdc44ce8d887b45a1c95e4e71367e6ab99d2e943932046041bf7d4866bb8c147c08cd695cf979c971c5f35977943
|
|
7
|
+
data.tar.gz: 5c3c1c3f38d42ddcd4c3ec64e68910b9a2d82198e5a433cbc9d37e8a4e4f154b43ff19ffc6c603e5bc131bad7bf6761085f8b3aba5d891553ed7f8a8f928e8d8
|
data/README.md
CHANGED
data/lib/pp_sql/version.rb
CHANGED
data/lib/pp_sql.rb
CHANGED
|
@@ -6,8 +6,7 @@ module PpSql
|
|
|
6
6
|
# if you do not want to rewrite AR native method #to_sql
|
|
7
7
|
# you may switch this setting to false in initializer
|
|
8
8
|
class << self
|
|
9
|
-
attr_accessor :rewrite_to_sql_method
|
|
10
|
-
attr_accessor :add_rails_logger_formatting
|
|
9
|
+
attr_accessor :rewrite_to_sql_method, :add_rails_logger_formatting
|
|
11
10
|
end
|
|
12
11
|
self.rewrite_to_sql_method = true
|
|
13
12
|
self.add_rails_logger_formatting = true
|
|
@@ -42,7 +41,7 @@ module PpSql
|
|
|
42
41
|
puts to_sql
|
|
43
42
|
else
|
|
44
43
|
extend Formatter
|
|
45
|
-
puts _sql_formatter.format(to_sql.
|
|
44
|
+
puts _sql_formatter.format(to_sql.dup)
|
|
46
45
|
end
|
|
47
46
|
end
|
|
48
47
|
end
|
|
@@ -63,8 +62,8 @@ module PpSql
|
|
|
63
62
|
class Railtie < Rails::Railtie
|
|
64
63
|
initializer 'pp_sql.override_to_sql' do
|
|
65
64
|
ActiveSupport.on_load(:active_record) do
|
|
66
|
-
ActiveRecord::Relation.
|
|
67
|
-
ActiveRecord::LogSubscriber.
|
|
65
|
+
ActiveRecord::Relation.prepend ToSqlBeautify
|
|
66
|
+
ActiveRecord::LogSubscriber.prepend LogSubscriberPrettyPrint
|
|
68
67
|
end
|
|
69
68
|
end
|
|
70
69
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pp_sql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kvokka
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-12-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -86,14 +86,14 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
89
|
+
version: '7.0'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '7.0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: sqlite3
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -132,14 +132,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
132
132
|
requirements:
|
|
133
133
|
- - ">="
|
|
134
134
|
- !ruby/object:Gem::Version
|
|
135
|
-
version:
|
|
135
|
+
version: 3.1.0
|
|
136
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
requirements:
|
|
138
138
|
- - ">="
|
|
139
139
|
- !ruby/object:Gem::Version
|
|
140
140
|
version: '0'
|
|
141
141
|
requirements: []
|
|
142
|
-
rubygems_version: 3.1
|
|
142
|
+
rubygems_version: 3.4.1
|
|
143
143
|
signing_key:
|
|
144
144
|
specification_version: 4
|
|
145
145
|
summary: Beautify SQL output of ActiveRecord#to_sql
|