pp_sql 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5038184d5f8ed886733d19559eef2b1c053889e4
4
- data.tar.gz: 4cb400cad3c8a5247f9906932a01f308aeeb9e80
3
+ metadata.gz: ef86d80e34ffbcc0571c4ebc6665fcccf7a4334a
4
+ data.tar.gz: 579204bf9e2d3a6ab2cd8e0920ee47708122853b
5
5
  SHA512:
6
- metadata.gz: 916631092c11d88e5b5847b8ff5a87a04975d46c6c84975d54d67c414e7c9f8cf7ee39877d50a5c4bf1fdfe45d793db31ead30ba22cacb79a810f8f6f2fdd385
7
- data.tar.gz: 7b8180e94856428e05fdfb0809b87ffe3aa3d6b636b498847c4c3c60ee23877a5bdc890fd1d9b2de0f12295afea9c0bd79fa623c17f3c1f58ff08eeef80c6588
6
+ metadata.gz: 8182ceb7776fbef62222b9385bd2cdebc83c5989a1100e3b74c047ef4f3dc7e44b3a590ab13554c6656129728e675159ef736c7e108760a30fbb50a02b718581
7
+ data.tar.gz: e77d0e2bfbad68ac272d8a04741550e193fcecbd9bd5d687161262884f3aae5d2eb45f68c4f7107c146030aeaca9f38dbadcedafb82278d18a8bb114412e7754
@@ -1,3 +1,3 @@
1
1
  module PpSql
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
data/lib/pp_sql.rb CHANGED
@@ -22,8 +22,10 @@ module PpSql
22
22
  puts to_sql
23
23
  end
24
24
  end
25
- module Rails5PpSqlPort
25
+ module Rails5PpSqlExtraction
26
26
  # export from Rails 5 with for Rails 4.2+ versions
27
+ private
28
+
27
29
  def colorize_payload_name(name, payload_name)
28
30
  if payload_name.blank? || payload_name == "SQL" # SQL vs Model Load/Exists
29
31
  color(name, ActiveSupport::LogSubscriber::MAGENTA, true)
@@ -85,7 +87,7 @@ module PpSql
85
87
  ActiveSupport.on_load(:active_record) do
86
88
  ActiveRecord::Relation.send(:prepend, ToSqlBeautify)
87
89
  ActiveRecord::LogSubscriber.send(:prepend, LogSubscriberPrettyPrint)
88
- ActiveRecord::LogSubscriber.send(:include, Rails5PpSqlPort) if Rails::VERSION::MAJOR <= 4
90
+ ActiveRecord::LogSubscriber.send(:include, Rails5PpSqlExtraction) if Rails::VERSION::MAJOR <= 4
89
91
  end
90
92
  end
91
93
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pp_sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kvokka