prosopite 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +8 -6
- data/lib/prosopite.rb +6 -2
- data/lib/prosopite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56809d2470b99359e6a6399d6814fa430ef1f3e57df935468b23a0c00125dc87
|
4
|
+
data.tar.gz: 85bbe7fe09890e1854ca002609af8dba88065bf33b6ac95be3f6bbefb99b3ff8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d78f71f85256a83f4ca2ee94b4afed69f6b661a9af35b920acee889a7a795c9c360f55ad2dcd4b87bf4403fc6eef832916cb67d27af852fa7e14dc18c3533b44
|
7
|
+
data.tar.gz: 89b90cb2c449fc40ce2d09787ec2fa92791633c1474dfd7a5dad472de8ca087dc010c878b8cc26290e9b240feab6b508cf35fcde5cc92e741826dbd8b2b1e62d
|
data/Gemfile.lock
CHANGED
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
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
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
|
data/lib/prosopite/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg_query
|