rails_sql_prettifier 6.0.2 → 6.1.1

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: dc8698d2cb6da1287057ee6d57f4fa1d494efa19bcc013157012d0a055176243
4
- data.tar.gz: 6e41b147fd207cc2ad6afcd48508b1ebb0e6cf183d5d3829b61fffff71e1ed30
3
+ metadata.gz: 459c1f20e82eb14b0130418cb1161272383ae9f9f902164100b2a4d81bbabb9c
4
+ data.tar.gz: db5ee936e31bd470ac74940b2fa086e4a1aec84004cb05971c6434e8f5cb2ea1
5
5
  SHA512:
6
- metadata.gz: 4b2da81bae482d9269ae444ceb7c58b73c0d769755b45d2455656169c117bfe22a18ec0288989689479c385afa5c86f00ae826f3c477d5b987e04e3da97acdcf
7
- data.tar.gz: 6030b09100f99471a4874b4f30ccea42184a76eda6f6a7d8a1cb89233498f2b403766ef14981fdfaef15cca1413cdbeb9e5f17fb31e91e07729d779dd609a470
6
+ metadata.gz: a159e5b627abaa4ac80c70092668aad54f11f871c13a57e83585e38851d2f522273653d79871b2b087d1bce83de00c9119b6b2d7c28b60d7b75c8b13b1e3dde1
7
+ data.tar.gz: 4feabc414ccf282a7462c44527514449735b8bcdf9b2b84afe3b873735176cecbe1dcc40dfa6745b67af114391a1a38808cc3658bae4e45e8b242267932e32ce
data/.byebug_history ADDED
@@ -0,0 +1,34 @@
1
+ exit
2
+ ActiveRecord::Base.connection_db_config.adapter
3
+ ActiveRecord::Base.connection_db_config.adpter
4
+ ActiveRecord::Base.connection_db_config
5
+ c
6
+ exit
7
+ si.sql
8
+ si
9
+ c
10
+ sql_body
11
+ n
12
+ s
13
+ original_sql_query
14
+ err
15
+ s
16
+ up
17
+ s
18
+ up
19
+ s
20
+ up
21
+ s
22
+ super
23
+ try(:sql)
24
+ Niceql.config.prettify_pg_errors
25
+ c
26
+ exit
27
+ err_template
28
+ si.to_s
29
+ exit
30
+ err_caret_line
31
+ err_quote_caret_offset
32
+ c
33
+ err.lines[1].index( '...' ).to_i
34
+ err_caret_line
data/.gitignore CHANGED
@@ -8,5 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /inspectionProfiles/
11
- .idea
12
- .byebug_history
11
+ .idea
data/.ruby-gemset CHANGED
@@ -1 +1 @@
1
- rails_sql_prettifier_ar_6_0
1
+ rails_sql_prettifier_ar_6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
- # 6.0.2
1
+ # 6.1.0
2
2
 
3
3
  * This a active record prior to 7.0 version and >= 6.1 compatible niceql integration
4
- ar < 6.0 breaking change:
5
- * StatementInvalid initialization has a breaking change: starting version 6 it has named param sql: for original query )
4
+ ar < 6.0:
5
+ * StatementInvalid initialization, starting version 6 it has named param sql: for original query )
6
6
 
7
+ ar <= 6.1:
8
+ * Starting from 6.1 connection_db_config used as standalone object instead of connection_config
@@ -1,3 +1,3 @@
1
1
  module RailsSQLPrettifier
2
- VERSION = '6.0.2'
2
+ VERSION = '6.1.1'
3
3
  end
@@ -55,7 +55,7 @@ module RailsSQLPrettifier
55
55
 
56
56
 
57
57
  def ar_using_pg_adapter?
58
- ActiveRecord::Base.try(:connection_config)&.with_indifferent_access&.dig(:adapter) == 'postgresql'
58
+ ActiveRecord::Base.connection_db_config.adapter == 'postgresql'
59
59
  end
60
60
 
61
61
  def initialize
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.required_ruby_version = '>= 2.4'
34
34
  spec.add_dependency "niceql", '~> 0.5'
35
35
 
36
- spec.add_development_dependency "activerecord", '>= 6.0', '< 6.1'
36
+ spec.add_development_dependency "activerecord", '>= 6.1', '< 7'
37
37
 
38
38
  spec.add_development_dependency "bundler", ">= 1"
39
39
  spec.add_development_dependency "rake", ">= 12.3.3"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_sql_prettifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
@@ -30,20 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '6.0'
33
+ version: '6.1'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '6.1'
36
+ version: '7'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '6.0'
43
+ version: '6.1'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '6.1'
46
+ version: '7'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -135,6 +135,7 @@ executables: []
135
135
  extensions: []
136
136
  extra_rdoc_files: []
137
137
  files:
138
+ - ".byebug_history"
138
139
  - ".gitignore"
139
140
  - ".ruby-gemset"
140
141
  - ".ruby-version"