prosopite 0.1.7 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee716d76f55fb9565d095bccdc3efe3b6a42efed5a54c6234cc3980c5645744d
4
- data.tar.gz: 80f39f64cb6ee4b8498634fe027b9a40cff73b9d56c8cf5e179cdbdb4bf9b94c
3
+ metadata.gz: 56809d2470b99359e6a6399d6814fa430ef1f3e57df935468b23a0c00125dc87
4
+ data.tar.gz: 85bbe7fe09890e1854ca002609af8dba88065bf33b6ac95be3f6bbefb99b3ff8
5
5
  SHA512:
6
- metadata.gz: 84fc5d34a6cefec4a47e093c0ea1d0c87821243feb7b43884b6700b645757147e10a6591f96c8f5d7b60ece6d5aa33b71525b51e229faf613e9c17a965986b6a
7
- data.tar.gz: '096290a4591a43dd98b557b6ef356b2fa87e8f6900f8ed925b906a9705fce6238f60e37664f8734c3eae526bc15d3b687599c6ee154280f5b60f5f5b9d37efbc'
6
+ metadata.gz: d78f71f85256a83f4ca2ee94b4afed69f6b661a9af35b920acee889a7a795c9c360f55ad2dcd4b87bf4403fc6eef832916cb67d27af852fa7e14dc18c3533b44
7
+ data.tar.gz: 89b90cb2c449fc40ce2d09787ec2fa92791633c1474dfd7a5dad472de8ca087dc010c878b8cc26290e9b240feab6b508cf35fcde5cc92e741826dbd8b2b1e62d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prosopite (0.1.6)
4
+ prosopite (0.2.0)
5
5
  pg_query (~> 1.3)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -120,12 +120,14 @@ Prosopite auto-detection can be enabled on all controllers:
120
120
 
121
121
  ```ruby
122
122
  class ApplicationController < ActionController::Base
123
- before_action do
124
- Prosopite.scan
125
- end
126
-
127
- after_action do
128
- Prosopite.finish
123
+ unless Rails.env.production?
124
+ before_action do
125
+ Prosopite.scan
126
+ end
127
+
128
+ after_action do
129
+ Prosopite.finish
130
+ end
129
131
  end
130
132
  end
131
133
  ```
data/lib/prosopite.rb CHANGED
@@ -140,8 +140,8 @@ module Prosopite
140
140
  notifications_str << "\n"
141
141
  end
142
142
 
143
- Rails.logger.warn(notifications_str) if @rails_logger
144
- $stderr.puts(notifications_str) if @stderr_logger
143
+ Rails.logger.warn(red(notifications_str)) if @rails_logger
144
+ $stderr.puts(red(notifications_str)) if @stderr_logger
145
145
 
146
146
  if @prosopite_logger
147
147
  File.open(File.join(Rails.root, 'log', 'prosopite.log'), 'a') do |f|
@@ -152,6 +152,10 @@ module Prosopite
152
152
  raise NPlusOneQueriesError.new(notifications_str) if @raise
153
153
  end
154
154
 
155
+ def red(str)
156
+ "\e[91m#{str}\e[0m\n"
157
+ end
158
+
155
159
  def subscribe
156
160
  @subscribed ||= false
157
161
  return if @subscribed
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prosopite
4
- VERSION = "0.1.7"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prosopite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mpampis Kostas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-07 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg_query