niceql 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: b0cb7604922e98c794a7e66646a944901fc72766
4
- data.tar.gz: 9ad7596c09e9bc271d03f60bce089d860f7ed27c
3
+ metadata.gz: 5ae74ab563688b94a264e8c45e2a3e5c3dece293
4
+ data.tar.gz: 0e5a2483d97b90b1e70b08111c4147a9fb0fd7ac
5
5
  SHA512:
6
- metadata.gz: 38911d649bfb64ce25599b97964d99739ed7b56999a01239a0c43bb78738f98cfe33d59e105e2ac5aef794d3c10ec7ac049b608f9bc0cd510606a435d46c514c
7
- data.tar.gz: bf01b839683f82e1a4ad2eca29b8f27b4958b8b07c7aeab04b019444a2f88b28b8fcae197e1616aa3ba89a1340f55e663ade7a7f2abf5356433d63d45239f348
6
+ metadata.gz: 770ae4357fac9c7e89ac576310ae6ee27fb2253d68b38de97d3c5056b8ca20f1a57c8922e99d3811b0d1bc2175dd19b9334424e3f96a15115b6de35715ec2be3
7
+ data.tar.gz: 6120635b333b050f4ea1f4bd2a7942bcb97a3f569ca4d78c3eb9cc016cd50b7f11d91c1c9c6f44b3eee5639c3bf7898365cb476097d9232fda06afbc6e792ae8
data/README.md CHANGED
@@ -59,7 +59,7 @@ Or install it yourself as:
59
59
  #=> FROM ( VALUES(1), (2) ) AS tmp
60
60
 
61
61
  # rails combines err with query, so don't forget to do it yourself
62
- # to get real nice result you should execute on your DB prettified_sql!
62
+ # to get real nice result you should executeprettified version (i.e. execute( prettified_sql ) !) of query on your DB!
63
63
  # otherwise you will not get such a nice output
64
64
 
65
65
  puts Niceql::Prettifier.prettify_pg_err(<<-ERR )
@@ -1,3 +1,3 @@
1
1
  module Niceql
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/lib/niceql.rb CHANGED
@@ -52,7 +52,7 @@ module Niceql
52
52
 
53
53
  def self.prettify_pg_err(err)
54
54
  err_line_num = err[/LINE \d+/][5..-1].to_i
55
- start_sql_line = err.lines[3][/HINT/] ? 4 : 3
55
+ start_sql_line = err.lines[3][/HINT|DETAIL/] ? 4 : 3
56
56
  err_body = err.lines[start_sql_line..-1]
57
57
  err_line = StringColorize.colorize_err( err_body[err_line_num-1] )
58
58
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niceql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl